Hi all,
I'm using the prebuilt binaries from
https://github.com/bblanchon/pdfium-binaries in a .NET MAUI application that targets Mac. When the build system tries to change the install_name of libpdfium.dylib using install_name_tool, I get this error:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
changing install names or rpaths can't be redone for: obj/Debug/net9.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle/pdfm.dylib.tmp
(for architecture arm64) because larger updated load commands do not fit
(the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
It seems like this might be due to the binaries being linked without headerpad_max_install_names, which means there’s no room in the Mach-O header to update the install name.
What’s odd is that the ARM version of the V8-enabled build seems to have enough space for install name changes, while the x64 version, and the non-V8 ARM and x64 versions, does not. So this might be a build config difference between architectures and versions.
The maintainer of pdfium-binaries mentioned that this is likely something that should be fixed upstream, which is why I’m bringing it up here. Would it make sense to include headerpad_max_install_names for macOS targets in the GN build files? Or is there a preferred way to handle this?
Thanks for any thoughts on this!
Best,
Tor Øyvind Fluør