classification
Title: RUNSHARED wrong for OSX no framework
Type: compile error Stage: resolved
Components: Build Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder: many distutils tests fail when run from the installed location
View: 17752
Assigned To: Nosy List: grobian, hynek, ned.deily, ronaldoussoren
Priority: normal Keywords: patch

Created on 2012-12-01 19:43 by grobian, last changed 2021-09-10 10:45 by iritkatriel. This issue is now closed.

Files
File name Uploaded Description Edit
11_all_darwin-dyld-library-path.patch grobian, 2012-12-01 19:43 11_all_darwin-dyld-library-path.patch
Repositories containing patches
http://prefix.gentooexperimental.org:8000/python-patches-3_3
Messages (8)
msg176754 - (view) Author: Fabian Groffen (grobian) Date: 2012-12-01 19:43
Python fails to run python.exe on OSX when a non-framework build is requested, due to wrong quoting in configure.ac.

Like all other RUNSHARED, it shouldn't be quoted because then `pwd` won't be expanded, resulting in a wrong DYLD_LIBRARY_PATH when regen is ran (from a different directory than where libpython3.3.dylib resides).

Attached patch solves the issue.  The issue seems to be in current 3.3 and default heads.
msg178673 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 13:35
The patch can cause problems when either DYLD_LIBRARY_PATH or the current working directory contains whitepace, a better fix is:

RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}"

(That is, replace the single quotes by double quotes)
msg178683 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-12-31 14:50
<bikeshed>$(pwd)</bikeshed>
msg178685 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 14:54
> Hynek Schlawack added the comment:
> 
> <bikeshed>$(pwd)</bikeshed>

I'd usually agree, but this is a configure script and those shouldn't contain shell features invented after 1970 :-)

More seriously, a large subset of command interpolations in configure.ac use backticks.
msg178686 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-12-31 14:56
I’m fine with that. My focus was fixing the ticket metadata. :)
msg178687 - (view) Author: Fabian Groffen (grobian) Date: 2012-12-31 14:59
re: single quotes -> double quotes

I made RUNSHARED consistent (although, as you point out, less broken) with the other RUNSHARED assignments right above.  If suggest to tackle the issue of whitespace support for all RUNSHARED assignments, not just Darwin case.

re: `pwd` vs. $(pwd)

$ /bin/sh
$ echo $(pwd)
syntax error: `(' unexpected

Here again, even though Darwin/OSX may be shipped with /bin/sh being bash (hence above problem not existing), for consistency, using `pwd` in all RUNSHARED assignments is nice, IMO.
msg178689 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 15:15
On 31 Dec, 2012, at 15:59, Fabian Groffen <report@bugs.python.org> wrote:

> 
> Fabian Groffen added the comment:
> 
> re: single quotes -> double quotes
> 
> I made RUNSHARED consistent (although, as you point out, less broken) with the other RUNSHARED assignments right above.  If suggest to tackle the issue of whitespace support for all RUNSHARED assignments, not just Darwin case.

Maybe, but whitespace supporrt on OSX is more pressing than on regular Unix systems because users are more likely to create directory names with whitespace in them. 

> 
> re: `pwd` vs. $(pwd)
> 
> $ /bin/sh
> $ echo $(pwd)
> syntax error: `(' unexpected
> 
> Here again, even though Darwin/OSX may be shipped with /bin/sh being bash (hence above problem not existing), for consistency, using `pwd` in all RUNSHARED assignments is nice, IMO.

Which shell doesn't have $(command) support?  It is not a bash-ism, but is part of the POSIX shell definition (but wasn't present in older sh implementations).
msg178708 - (view) Author: Fabian Groffen (grobian) Date: 2012-12-31 17:12
> Which shell doesn't have $(command) support?  It is not a bash-ism, but
> is part of the POSIX shell definition (but wasn't present in older sh 
> implementations).

Solaris' /bin/sh.
History
Date User Action Args
2021-09-10 10:45:55iritkatrielsetstatus: open -> closed
superseder: many distutils tests fail when run from the installed location
resolution: duplicate
stage: patch review -> resolved
2012-12-31 17:12:49grobiansetmessages: + msg178708
2012-12-31 15:15:03ronaldoussorensetmessages: + msg178689
2012-12-31 14:59:11grobiansetmessages: + msg178687
2012-12-31 14:56:02hyneksetmessages: + msg178686
2012-12-31 14:54:58ronaldoussorensetmessages: + msg178685
2012-12-31 14:50:36hyneksetstage: patch review
messages: + msg178683
versions: + Python 3.4
2012-12-31 13:35:28ronaldoussorensetnosy: + ronaldoussoren, ned.deily, hynek
messages: + msg178673
2012-12-01 19:43:13grobiancreate