[New-bugs-announce] [issue36081] Cannot set LDFLAGS containing $

Rolf Eike Beer report at bugs.python.org
Fri Feb 22 11:05:17 EST 2019


New submission from Rolf Eike Beer <eike at sf-mail.de>:

My use case is: LDFLAGS=-Wl,-rpath,'$ORIGIN/../lib'

This works fine for everything build directly by the Makefile, but for everything that is build through the python distutils this breaks. This is not an issue of the python side, it happens because the Makefile passes the information to python using LDSHARED='$(BLDSHARED)'. At this point the variable is expanded and the $ORIGIN is expanded by the shell (or so) before passing it to python, so python actually received "-Wl,-rpath,/../lib" from the environment variable.

I have worked around locally by doing something like $(subst $$,~dollar~,$(BLDSHARED)) and replacing that inside python with \\$ or so. Really hacky, but works for my current setup.

----------
components: Build
messages: 336326
nosy: Dakon
priority: normal
severity: normal
status: open
title: Cannot set LDFLAGS containing $
type: compile error
versions: Python 2.7, Python 3.7

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


More information about the New-bugs-announce mailing list