[New-bugs-announce] [issue45221] Linker flags starting with -h breaks setup.py (regression)

ux report at bugs.python.org
Thu Sep 16 10:56:43 EDT 2021


New submission from ux <bugs-python-ahmiupek at pkh.me>:

Hi,

Since 3.8 (included), the following build command fails:

    LDFLAGS=-headerpad_max_install_names ./configure
    make

With the following error:

    setup.py: error: argument -h/--help: ignored explicit argument 'eaderpad_max_install_names'


A quick hack in setup.py "fixes" the issue:

-                options, _ = parser.parse_known_args(env_val.split())
+                options, _ = parser.parse_known_args([x for x in env_val.split() if not x.startswith('-h')])

Another workaround as a user is to do use `LDFLAGS=-Wl,-headerpad_max_install_names`.

----------
components: Build
messages: 401951
nosy: ux
priority: normal
severity: normal
status: open
title: Linker flags starting with -h breaks setup.py (regression)
type: compile error
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45221>
_______________________________________


More information about the New-bugs-announce mailing list