Skip to content

configure --with-openssl-rpath=DIR generates invalid linker option on macOS #110459

Closed
@culler

Description

@culler

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

Labels

OS-macbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions