Opened 15 years ago

Closed 13 years ago

#21248 closed defect (fixed)

python25 and python24: +universal ignores universal_archs

Reported by: mamoll (Mark Moll) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: jaroel (Roel Bruggink), alexoedelman@…, artisticforge@…, x.pechoultres@…, anddam (Andrea D'Amore), ryandesign (Ryan Carsten Schmidt), bgrupe27
Port: python25 python24

Description (last modified by jmroot (Joshua Root))

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 (18)

comment:1 Changed 15 years ago by Veence (Vincent)

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?

comment:2 Changed 15 years ago by jmroot (Joshua Root)

Cc: mmoll@… removed
Description: modified (diff)
Keywords: universal snow leopard x86_64 removed
Milestone: MacPorts 1.8.1
Owner: changed from macports-tickets@… to mww@…
Summary: python25 +universal ignores univeral_archspython25 +universal ignores universal_archs

comment:3 Changed 15 years ago by jmroot (Joshua Root)

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:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

See also #17306.

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from mww@… to jwa@…

comment:6 Changed 14 years ago by alexoedelman@…

Cc: alexoedelman@… added

Cc Me!

comment:7 Changed 14 years ago by mf2k (Frank Schima)

Cc: artisticforge@… added

Cc reporter of duplicate #24753.

comment:8 Changed 14 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 14 years ago by jmroot (Joshua Root)

Set configure.universal_archs to match what is actually built in r69440. This should cause more informative error messages at least.

comment:10 Changed 14 years ago by x.pechoultres@…

Cc: x.pechoultres@… added

Cc Me!

comment:11 Changed 14 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 Changed 14 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 ; Changed 13 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 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

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:16 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:17 Changed 13 years ago by jmroot (Joshua Root)

Cc: roel@… ryandesign@… bgrupe@… added
Port: python24 added
Summary: python25 +universal ignores universal_archspython25 and python24: +universal ignores universal_archs

comment:18 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.