-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
distutil's runtime_library_dir (rpath) option doesn't work with clang #89534
Comments
Chris Hills reported in bpo-43466 that the new --with-openssl-rpath=auto does not work with clang. It turns out to be a bug in distutils. UnixCCompiler.runtime_library_dir_option() does not detect clang correctly and emits wrong option for rpath. |
$ CC=clang ./configure --with-openssl=/home/heimes/dev/python/multissl/openssl/3.0.0 --with-openssl-rpath=auto
$ make
$ readelf -d build/lib.linux-x86_64-3.11/_ssl.cpython-311-x86_64-linux-gnu.so | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: [/home/heimes/dev/python/multissl/openssl/3.0.0/lib] |
I tested this both with and without LDFLAGS="-Wl,-rpath -Wl,/home/chaz/.local/local/python3.10.0/lib", and in both cases this patch works as expected. Thank you! |
Thanks for confirming that the fix works for you. The fix will be in 3.10.1, which should be released in early December. |
The fix that was merged seems a bit hacky to me -- it changes the _is_gcc check so that it returns True on clang. Even though distutils is deprecated and no longer synced externally, if someone needs to issue a similar fix, this might trip them over. I would recommend replacing it with [1], from the now externally maintained distutils module. |
@FFY00 -- can this be closed? I don't believe it has been changed, but I also can't find any record of further discussion. A |
I think it can, AFAIK there was no further discussion. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: