MediaInfoLib icon indicating copy to clipboard operation
MediaInfoLib copied to clipboard

macOS: libmediainfo problem with 25.03

Open mlaggner opened this issue 8 months ago • 5 comments

I saw that the macOS .dylib of libmediainfo is half the size compared to other versions. After digging a bit deeper, I saw that the x86_64 part is not completely available in the .dylib itself:

otool -vf libmediainfo.0.dylib
Fat headers
fat_magic FAT_MAGIC
nfat_arch 2
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    capabilities 0x0
    offset 16384
    size 22832
    align 2^14 (16384)
architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    capabilities 0x0
    offset 49152
    size 8477280
    align 2^14 (16384)

Have a look at the size of the x86_64 part and compare it to the arm64 part.

When analyzing the 24.12 version, this looks quite different:

otool -vf libmediainfo.0.dylib
Fat headers
fat_magic FAT_MAGIC
nfat_arch 2
architecture x86_64
    cputype CPU_TYPE_X86_64
    cpusubtype CPU_SUBTYPE_X86_64_ALL
    capabilities 0x0
    offset 16384
    size 9084928
    align 2^14 (16384)
architecture arm64
    cputype CPU_TYPE_ARM64
    cpusubtype CPU_SUBTYPE_ARM64_ALL
    capabilities 0x0
    offset 9109504
    size 8438896
    align 2^14 (16384)

And looking at the project tinyMediaManager I also see that there are problems on x86_64 loading libmediainfo - the error Failed to load mediainfo - 'Error looking up function 'MediaInfo_Option': dlsym(0x471b8b80, MediaInfo_Option): symbol not found' appears in the x86_64 version, but in the arm64 version everything works as expected

mlaggner avatar Apr 18 '25 11:04 mlaggner

The one from MediaArea build farm is too small for the x86_64 part but the one built on GitHub Actions seems okay.

I made a test run here: https://github.com/cjee21/MediaInfo/actions/runs/14535214318 Look at the Check libmediainfo.0.dylib and Test CLI steps output for both arm64 (macos-latest) and x86_64 (macos-13).

cjee21 avatar Apr 18 '25 12:04 cjee21

Yeah - looks like the test run did the build correctly. The file sizes are similar to the version 24.12

Do you plan to re-release 25.03 or is a new release just around the corner?

mlaggner avatar Apr 18 '25 18:04 mlaggner

or is a new release just around the corner?

End of month. Not sure it is worth it to rebuild the previous version.

JeromeMartinez avatar Apr 18 '25 20:04 JeromeMartinez

Should be fixed in latest snapshot

The libtool script generated in our Linux build environment seems to be causing this problem with recent versions of Xcode.

g-maxime avatar Apr 18 '25 22:04 g-maxime

Thanks - since the end of the month is just around the corner (and I will not release a new release in the next days), I will just wait for the new release of libmediainfo 👍

mlaggner avatar Apr 20 '25 08:04 mlaggner