Hi,
I'm producing a dylib that another developer is trying to link with an ffmpeg plugin, building on Sequoia (this was not an issue prior to upgrading the OS). The error is:
ld: Shared cache eligible dylib cannot link to ineligible dylib '@rpath/libme.dylib'. Remove link to ineligible dylib, fix its eligibility, or opt out of the shared cache using the build setting 'LD_SHARED_CACHE_ELIGIBLE=NO' (or linker flag '-not_for_dyld_shared_cache') clang: error: linker command failed with exit code 1 (use -v to see invocation)
So, simple question - how do I "fix my dylib's eligibility"? I can't seem to find much info about this online.
Thanks, Jeff
You can find background material about the dynamic linker shared cache in this post. And a link to that and lots of other info in An Apple Library Primer.
The dynamic linker shared cache is only relevant for Apple dynamic libraries. Third-party libraries never go into the shared cache [1]. So the issue here isn’t your library, but the other developer’s library. It sounds like they’re building it for the shared cached when they shouldn’t be [2].
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Because the shared cache is no longer a cache, but rather authored as part of the system build process.
[2] Unless it’s someone at Apple, of course (-: But, serious, if that’s the case, they should seek help internally.