Opened 15 years ago

Last modified 13 years ago

#21248 closed defect

python25 +universal ignores universal_archs — at Version 2

Reported by: mamoll (Mark Moll) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
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 (2)

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
Note: See TracTickets for help on using tickets.