Ticket #21248 (closed defect: fixed)
python25 and python24: +universal ignores universal_archs
| Reported by: | mmoll@… | Owned by: | jwa@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.0 |
| Keywords: | Cc: | roel@…, alexoedelman@…, artisticforge@…, x.pechoultres@…, and.damore@…, ryandesign@…, bgrupe@… | |
| Port: | python25 python24 |
Description (last modified by jmr@…) (diff)
I'm trying to build python25 +universal on Snow Leopard. In my macports.conf I have set universal_archs to i386 and x86_64. The python configure script hardcodes i386 and ppc as the universal architectures. Even if I replace ppc with x86_64, the compilation fails with these errors:
/usr/bin/gcc-4.2 -c -arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fno-strict-aliasing -mno-fused-madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/opt/local/include -D_DARWIN_C_SOURCE -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/math.h:626,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h:28,
from Include/pyport.h:231,
from Include/Python.h:57,
from ./Modules/python.c:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/math.h:626,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h:28,
from Include/pyport.h:231,
from Include/Python.h:57,
from ./Modules/python.c:3:
/Developer/SDKs/MacOSX10.6.sdk/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
In file included from Include/Python.h:57,
from ./Modules/python.c:3:
Include/pyport.h:761:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
lipo: can't figure out the architecture type of: /var/tmp//ccD3CsnI.out
make: *** [Modules/python.o] Error 1
Change History
comment:2 Changed 4 years ago by jmr@…
- Description modified (diff)
- Cc mmoll@… removed
- Summary changed from python25 +universal ignores univeral_archs to python25 +universal ignores universal_archs
- Keywords universal, snow leopard, x86_64 removed
- Milestone MacPorts 1.8.1 deleted
- Owner changed from macports-tickets@… to mww@…
comment:3 Changed 4 years ago by jmr@…
This is very much an upstream limitation, they don't intend to fix it, and I don't believe the port ever built for anything other than i386/ppc.
comment:7 Changed 3 years ago by macsforever2000@…
- Cc artisticforge@… added
Cc reporter of duplicate #24753.
comment:8 Changed 3 years ago by artisticforge@…
okay, you claim my bug report was a duplicate so be it. this ticket is over 8 month old and there is no solution.
why is python25 still being used at all? why goes gnome-desktop still depend on python25?
python25 is not ignoring the arch it is attempting to build ppc and i386 on an installation that will not allow that. there are not cross-compile abilities installed.
logically it would appear to me that either python25 is fixed or all the apps that depend on python25 are switched over to python26. then declare python25 deprecated.
comment:9 Changed 3 years ago by jmr@…
Set configure.universal_archs to match what is actually built in r69440. This should cause more informative error messages at least.
comment:11 Changed 3 years ago by x.pechoultres@…
It seems not to take care of x86_64 universal option. I was able to build it by manually patch the Makefile, I replace all ppc by x86_64 and it build, but the directory was deleted !! So it was possible but I lost my patch !
comment:12 follow-ups: ↓ 13 ↓ 14 Changed 3 years ago by domiman@…
now I get:
Error: Cannot install python25 for the arch(s) 'i386 ppc' because Error: its dependency openssl is only installed for the archs 'i386 x86_64'. Error: Unable to execute port: architecture mismatch
This is on 10.6.4 with arches set to universal. Why this error than? It shouldn't try to build 'i386 ppc' but 'i386 x86_64' just like OpenSSL is...
comment:13 in reply to: ↑ 12 ; follow-up: ↓ 15 Changed 3 years ago by markus@…
Error: Cannot install python25 for the arch(s) 'i386 ppc' because
Just remove ppc from the line configure.universal_archs i386 ppc from /opt/local/var/macportssources/rsync.macports.org/release/ports/lang/python25/Portfile
comment:14 in reply to: ↑ 12 Changed 2 years ago by ryandesign@…
Replying to domiman@…:
It shouldn't try to build 'i386 ppc' but 'i386 x86_64' just like OpenSSL is...
As is explained previously in this ticket, it does not appear to be possible to get python25 to build universal for i386 x86_64. Just don't try to build python25 universal, please.
comment:15 in reply to: ↑ 13 Changed 2 years ago by ryandesign@…
Replying to markus@…:
Just remove ppc from the line configure.universal_archs i386 ppc from /opt/local/var/macportssources/rsync.macports.org/release/ports/lang/python25/Portfile
That would make it a non-universal (i386-only) build. So just don't request the universal variant in the first place.
comment:17 Changed 2 years ago by jmr@…
- Cc roel@…, ryandesign@…, bgrupe@… added
- Port changed from python25 to python25 python24
- Summary changed from python25 +universal ignores universal_archs to python25 and python24: +universal ignores universal_archs
comment:18 Changed 2 years ago by jmr@…
- Status changed from new to closed
- Resolution set to fixed


This sounds like python26 behavior, for which I have proposed some patches previously (see #21222). The current install process of python seems to be targeted either to 32-bit, 64-bit or all platforms, but you cannot pick up individual architectures (so you cannot either compile for i386 and x86_64 or ppc and ppc64).
What seems strange to me, is that when I first compiled universal version of python25 and 26, on Leopard, let's say a year ago, I did not stumble on these oddities. Regression?