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.
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
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_MACOSXmacro?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
Yes I meant the macro name. Your changes look good as-is and so I've pushed.
Thanks.
Philip