This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年02月10日 11:44 by flub, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| makevars.diff | flub, 2009年05月02日 22:26 | Do not consider $$ as a variable in makefile parsing | ||
| makevars2.diff | flub, 2009年05月11日 23:06 | Don't treat $$ as a variable but replace it by single $ | ||
| Messages (8) | |||
|---|---|---|---|
| msg81538 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年02月10日 11:44 | |
When specifying an RPATH with -rpath or -R you can use the special
tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as
"normal search path" and "relative to current sofile" respectively. To
get these correctly to the gcc command line you need to specify this in
LDFLAGS as `\$$LIB' to work around escapes of both the makefile and
shell, so in the Python Makefile this will appear somewhere as (this is
on one line):
CONFIG_ARGS= '--prefix=/opt/example.com/python25'
'LDFLAGS=-Wl,-rpath=\$$LIB:/opt/example.com/lib,--enable-new-dtags'
This works for compiling the main python binary. But when the extension
modules get compiled distutils chokes on this.
distutils.sysconfig.parse_makefile() does think that any value of a
variable that contains `$' in it refers to an other variable in the
makefile. It will fail to find the value and CONFIG_ARGS will not be
defined. This then fails in setup.py for the _ctypes extension:
if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
return
Where `None' is returned instead of a list by .get_config_var().
It seems that distutils.sysconfig.parse_makefile() needs to understand
more of the makefile synatax to deal with this.
|
|||
| msg86986 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年05月02日 22:26 | |
The attached patch does fix this issue. Concerning the specific example of LDFLAGS used here there is still and issue with LDFLAGS being ignored by the buid for the shared modules, but that is an other issue. |
|||
| msg86989 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年05月02日 23:52 | |
Hmm, the patch isn't quite right yet. When a $$ is present in the makefile .parse_makefile() needs to return a single $. I'm not sure yet what needs to happen with the \ for the shell escape. |
|||
| msg87595 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年05月11日 23:06 | |
The updated patch inserts the single $ when needed. I've checked this on compiling python, stdlib extension modules and custom extension modules and this gives the correct results in all cases. |
|||
| msg87613 - (view) | Author: Tarek Ziadé (tarek) * (Python committer) | Date: 2009年05月12日 10:21 | |
The patch looks good, beside the fact that you didn't call super() in setUp/tearDown. I'll commit it asap and fix that small issue |
|||
| msg87636 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年05月12日 14:46 | |
Oh, sorry about the super() that is why the ar test failed then. Sorry, I got a little confused by the conflicting update on that file while working on this patch and must have merged it badly. |
|||
| msg89197 - (view) | Author: Floris Bruynooghe (flub) | Date: 2009年06月10日 11:23 | |
Hi What's the status of this? I haven't seen a commit message regarding this. Cheers |
|||
| msg89239 - (view) | Author: Tarek Ziadé (tarek) * (Python committer) | Date: 2009年06月11日 08:35 | |
done in r73341 in trunk. I've backported it as well in 2.6/3.0/3.1 branches. (r73342, r73343, r73344) Thanks ! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:45 | admin | set | github: 49451 |
| 2015年04月15日 01:56:03 | ned.deily | link | issue1481347 superseder |
| 2009年06月11日 08:35:54 | tarek | set | status: open -> closed messages: + msg89239 |
| 2009年06月10日 11:23:30 | flub | set | messages: + msg89197 |
| 2009年05月12日 14:46:00 | flub | set | messages: + msg87636 |
| 2009年05月12日 10:21:16 | tarek | set | messages: + msg87613 |
| 2009年05月11日 23:06:57 | flub | set | files:
+ makevars2.diff messages: + msg87595 |
| 2009年05月02日 23:52:20 | flub | set | messages: + msg86989 |
| 2009年05月02日 22:26:01 | flub | set | files:
+ makevars.diff keywords: + patch messages: + msg86986 |
| 2009年02月13日 09:00:59 | tarek | set | priority: normal versions: + Python 3.1, - Python 2.5 |
| 2009年02月10日 11:44:50 | flub | create | |