Bad LC_ID_DYLIB in libpython3.11.dylib? #2225
-
We have an externally imported package (OpenUSD) which I build independently with python 3.11, and whose libraries depend on libpython3.11.dylib. But when I run
Eventually, this causes a runtime crash, because that path doesn't exist. Seems to me that a library that is part of a standalone distribution ought to be relocatable (and thus I'd expect Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Not sure if you're still stuck on this, but I sent a patch that got merged back in August to reset the LC_ID_DYLIB field using This patch turned out to be buggy, since it just replaced the absolute path you are seeing with the absolute path to libpython3.X.dylib on the build host. As you mention, setting it to I don't think that has made it into a release yet, but using rules_python from main should fix the issue. |
Beta Was this translation helpful? Give feedback.
Hey! Not sure if you're still stuck on this, but I sent a patch that got merged back in August to reset the LC_ID_DYLIB field using
install_name_tool
in #2089. (NB: Sinceinstall_name_tool
is part of the Mac toolchain, this will not work when cross-compiling for MacOS on non-Macs, which I'm not even sure is possible.)This patch turned out to be buggy, since it just replaced the absolute path you are seeing with the absolute path to libpython3.X.dylib on the build host. As you mention, setting it to
@rpath/libpython3.X.dylib
is the right fix, which got merged in #2256.I don't think that has made it into a release yet, but using rules_python from main should fix the issue.