Opened 17 years ago
Closed 15 years ago
#13701 closed defect (duplicate)
python25 +universal, not compiling
Reported by: | andre.david@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.5.2 |
Keywords: | crt1.10.5, universal | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
Port: | python25 |
Description
Hi,
I was trying to get a x86_64 binary of python, so I decided to install python25 +universal, which stops with:
checking size of wchar_t... configure: error: cannot compute sizeof (wchar_t), 77 See `config.log' for more details. Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.1" && ./configure --prefix=/opt/local --enable-shared --mandir=/opt/local/share/man --disable-framework --enable-universalsdk " returned error 1
The log indicates:
configure:19754: checking size of wchar_t configure:20079: /usr/bin/gcc-4.0 -o conftest -O2 -I/opt/local/include -D__DARWIN_UNIX03 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -L/opt/local/lib conftest.c >&5 ld: library not found for -lcrt1.10.5.o collect2: ld returned 1 exit status
so I looked around and found http://trac.macports.org/projects/macports/ticket/13475 . I applied the patch to both files I found (gotta brush up on the organization...)
$ grep "10\.4" `locate portconfigure.tcl` /opt/local/share/macports/Tcl/port1.0/portconfigure.tcl: set sysroot "/Developer/SDKs/MacOSX10.4u.sdk" /opt/local/share/macports/Tcl/port1.0/portconfigure.tcl:default configure.universal_cflags {"-isysroot $sysroot -arch i386 -arch ppc -mmacosx-version-min=10.4"} /opt/local/share/macports/Tcl/port1.0/portconfigure.tcl:default configure.universal_cxxflags {"-isysroot $sysroot -arch i386 -arch ppc -mmacosx-version-min=10.4"} /opt/local/var/macports/sources/rsync.macports.org/release/base/src/port1.0/portconfigure.tcl: set sysroot "/Developer/SDKs/MacOSX10.4u.sdk" /opt/local/var/macports/sources/rsync.macports.org/release/base/src/port1.0/portconfigure.tcl:default configure.universal_cflags {"-isysroot $sysroot -arch i386 -arch ppc -mmacosx-version-min=10.4"} /opt/local/var/macports/sources/rsync.macports.org/release/base/src/port1.0/portconfigure.tcl:default configure.universal_cxxflags {"-isysroot $sysroot -arch i386 -arch ppc -mmacosx-version-min=10.4"}
and the error persists.
Any ideas?
Thanks,
Andre
Change History (10)
comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | → Port Bugs |
---|
comment:2 follow-up: 3 Changed 17 years ago by mdickens@…
comment:3 Changed 17 years ago by afb@…
Replying to mdickens@nd.edu:
At least in MacPorts 1.6.0: The solution is not found by changing the port configuration, since the issue is in Python's 'configure' script. 'gcc' in 10.4 and prior, for some reason, worked setting '-isysroot' to the SDK of choice. At least in XCode 2.4.1, the '-isysroot' is not in the documentation, but it still works. In XCode 2.5 (for 10.5), '-isysroot' no longer works; its replacement is '-isystem'. Changing this in the 'configure' script (as well as a couple other changes elsewhere) fixes the +universal install for 10.5.
This is not strictly true, on Leopard -isysroot still works in Xcode 2.5 and in Xcode 3.0 ?
comment:4 Changed 17 years ago by jmroot (Joshua Root)
Owner: | changed from macports-tickets@… to mww@… |
---|
Assigning to maintainer.
comment:5 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | mcalhoun@… added |
---|
Cc Me!
comment:6 Changed 16 years ago by jon.hermansen@…
I had a ton of issues attempting to build python24 and python25 as universal (10.4) binaries... and eventually I came up with a VERY EASY way to build them as of today, Dec. 25th... no modification to their Portfiles (as of today) was necessary, either.
Run:
# port sync # port clean --all python2x # port patch python2x
Now, "cd" to the build directory... (and we'll patch every "isysroot" to "isystem")
# cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.2" # find . -type f -print0 | xargs -0 sudo perl -pi -e 's/isysroot/isystem/g'
comment:7 Changed 16 years ago by mf2k (Frank Schima)
Port: | python25 added |
---|
comment:10 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
We'll track this in #21248.
At least in MacPorts 1.6.0: The solution is not found by changing the port configuration, since the issue is in Python's 'configure' script. 'gcc' in 10.4 and prior, for some reason, worked setting '-isysroot' to the SDK of choice. At least in XCode 2.4.1, the '-isysroot' is not in the documentation, but it still works. In XCode 2.5 (for 10.5), '-isysroot' no longer works; its replacement is '-isystem'. Changing this in the 'configure' script (as well as a couple other changes elsewhere) fixes the +universal install for 10.5.
Ticket #11267 provides a tarball that (at least in my testing) allows for python25 +universal, +framework, +universal+framework, or just plain; for both 10.4 (using the 10.4SDK for +universal) and 10.5 (using the 10.5SDK for +universal); all combinations of variants seem to work correctly. While the resulting binaries using +universal are for "i386" and "ppc", it would not be difficult to add variants to do "ppc64" and "x86_64" (though, of course, 64-bit apps are not well-tested on OSX just yet).