You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
configure --with-openssl-rpath=DIR generates invalid linker option on macOS #110459
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.
The easiest fix here is to change rpath_arg to "-Wl,-rpath," (comma instead of equals sign at the end) for macOS.
The patch below fixes the issue for me. I haven't created a PR yet because I patched both configure.ac and configure manually because my system is not set up correctly to run autoconf ATM (no docker or podman).
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])
Activity
ronaldoussoren commentedon Dec 23, 2023
The easiest fix here is to change
rpath_argto"-Wl,-rpath,"(comma instead of equals sign at the end) for macOS.The patch below fixes the issue for me. I haven't created a PR yet because I patched both
configure.acandconfiguremanually because my system is not set up correctly to runautoconfATM (no docker or podman).pythongh-110459: Make sure --with-openssl-rpath works on macOS
ronaldoussoren commentedon Dec 23, 2023
Now with PR after installing docker and running
make regex-configure.gh-110459: Make sure --with-openssl-rpath works on macOS (#113441)
pythongh-110459: Make sure --with-openssl-rpath works on macOS (pytho…
[3.12] gh-110459: Make sure --with-openssl-rpath works on macOS (GH-1…
pythongh-110459: Make sure --with-openssl-rpath works on macOS (pytho…
pythongh-110459: Make sure --with-openssl-rpath works on macOS (pytho…
pythongh-110459: Make sure --with-openssl-rpath works on macOS (pytho…