Menu

libMXF Merge Request #4: Add ability to build MXFDump on/for Apple Silicon (merged)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Fredrik Lundkvist wants to merge 2 commits from /u/lunkers/bmxlib/ to master, 2022-07-15

Due to the preprocessor definitions in MXFDump.cpp, the libMXF project does not build on apple silicon. The preprocessor throws an "Unknown compiler" error due to the combination of MacOS + 64 bit ARM CPU not being among the define checks from row 50-100.

This MR adds the needed macros to build libMXF on a mac with Apple Silicon.

Commit Date  
[d3545b] (HEADmaster) by Fredrik Lundkvist Fredrik Lundkvist

Fix macro, type definitions for ARM MacOS

2022-07-15 07:07:22 Tree
[b3a0df] by Fredrik Lundkvist Fredrik Lundkvist

Add ability to compile MXFDump for Apple Silicon

2022-07-14 12:44:17 Tree

Discussion

  • Philip de Nier

    Philip de Nier - 2022-07-14

    I had a look at the AAF SDK, which is where MXFDump originates from, and it does something different:
    https://sourceforge.net/p/aaf/code2/ci/a4a578fa0dca53126d0f6925ee11039ec402c9e7/#diff-6

    The name is different but more importantly the typedef for mxfUInt32 is "unsigned int" in the AAF SDK change, whereas your change uses "unsigned long int". Based on the other 64-bit definitions I would guess that "unsigned int" is the correct one.

    Could you confirm whether the definitions in the AAF SDK are correct? If so then please change it here to how the AAF SDK does it so that the code doesn't diverge.

    Thanks.
    Philip

     
  • Fredrik Lundkvist

    Ah yes, I had missed that the AAF SDK is publically available and did not double-check, that's my bad. Thank you for letting me know!
    I'm not quite sure what you are referring to when saying " the name is different", are you referring to the MXF_COMPILER_GCC_ARM_MACOSX macro?
    As for the type definitions, you are correct; I've pushed a change to fix this error. If you'd like, I could rename the macro and switch __aarch64__ for __arm64__ to align with the SDK as well, though these changes are already equivalent to what's done in the SDK. In fact, the CPU macros are interchangeable.

    Thanks for you time!
    /Fredrik

     
  • Philip de Nier

    Philip de Nier - 2022-07-15

    Yes I meant the macro name. Your changes look good as-is and so I've pushed.

    Thanks.
    Philip

     
  • Philip de Nier

    Philip de Nier - 2022-07-15
    • Status: open --> merged
     
MongoDB Logo MongoDB