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
configure --with-openssl-rpath=DIR generates invalid linker option on macOS #110459
Comments
The easiest fix here is to change The patch below fixes the issue for me. I haven't created a PR yet because I patched both diff --git a/configure b/configure
index 668a0efd77..06d8b40eb6 100755
--- a/configure
+++ b/configure
@@ -27472,8 +27472,12 @@ then :
else $as_nop
- rpath_arg="-Wl,-rpath="
-
+ if test "$ac_sys_system" = "Darwin"
+ then
+ rpath_arg="-Wl,-rpath,"
+ else
+ rpath_arg="-Wl,-rpath="
+ fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5
diff --git a/configure.ac b/configure.ac
index 020553abd7..8b1f3d2550 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6807,7 +6807,12 @@ AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no])
AS_VAR_IF([GNULD], [yes], [
rpath_arg="-Wl,--enable-new-dtags,-rpath="
], [
- rpath_arg="-Wl,-rpath="
+ if test "$ac_sys_system" = "Darwin"
+ then
+ rpath_arg="-Wl,-rpath,"
+ else
+ rpath_arg="-Wl,-rpath="
+ fi
])
AC_MSG_CHECKING([for --with-openssl-rpath]) |
ronaldoussoren
added a commit
to ronaldoussoren/cpython
that referenced
this issue
Dec 23, 2023
On macOS the `-rpath` linker flag is spelled differently than on on platforms.
Now with PR after installing docker and running |
ronaldoussoren
added a commit
that referenced
this issue
Dec 28, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Dec 28, 2023
…nGH-113441) * pythongh-110459: Make sure --with-openssl-rpath works on macOS On macOS the `-rpath` linker flag is spelled differently than on on platforms. (cherry picked from commit cc13eab) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
ronaldoussoren
added a commit
that referenced
this issue
Dec 28, 2023
…13441) (#113535) gh-110459: Make sure --with-openssl-rpath works on macOS (GH-113441) * gh-110459: Make sure --with-openssl-rpath works on macOS On macOS the `-rpath` linker flag is spelled differently than on on platforms. (cherry picked from commit cc13eab) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
kulikjak
pushed a commit
to kulikjak/cpython
that referenced
this issue
Jan 22, 2024
…n#113441) * pythongh-110459: Make sure --with-openssl-rpath works on macOS On macOS the `-rpath` linker flag is spelled differently than on on platforms.
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…n#113441) * pythongh-110459: Make sure --with-openssl-rpath works on macOS On macOS the `-rpath` linker flag is spelled differently than on on platforms.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
On macOS, running configure with the option --with-openssl-rpath=/x/y/z causes the linker to be invoked with the option:
-rpath=/x/y/z
which causes a linker error when compiling python with Apple's compiler. The form of this option which the Apple linker expects is:
-rpath /x/y/z
The invalid option is generated on line 28077 of the configure script, which reads:
rpath_arg="-Wl,-rpath="
Changing that line to:
rpath_arg="-rpath "
corrects the problem. Presumably that only works with the Apple linker, and the current form is correct when using the gcc linker, rather than the gcc emulation provided by Apple. So this fix should only be applied when using Apple's linker.
CPython versions tested on:
3.12
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: