Closed
Labels
OS-macbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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
Metadata
Metadata
Assignees
Labels
OS-macbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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…