Solaris 10 + Sun Studio 12 Pyrhon 2.4.4 64-bit build problem
MrJean1 at gmail.com
Tue Oct 30 06:36:03 CET 2007
Correction: the number of tests which pass must be 276.
On Oct 29, 10:29 pm, MrJean1 <MrJe... at gmail.com> wrote:
> Here is a better way to build Python on Solaris, both 32- and 64-
> since it builds both the binary and make test on my Ultra 20 machine.
> In my case 26 tests pass, 1 failed, 44 are skipped and there are 6 u
> expected skips. The latter are expected and due to missing packages,
> like Tcl.
> Use the instructions from this site and forget mine. But it may still
> be necessary to patch the ./Include/pyport.h file as shown in my
> previous message.
> /Jean Brouwers
> On Oct 29, 9:15 pm, MrJean1 <MrJe... at gmail.com> wrote:
> > Here is one way to build a 64-bit Python binary on Solaris 10 using
> > SUN's compilers**. This is probably not the recommended procedure but
> > it does create a partial, expected result.
> > Here are the 4 steps I used:
> > 1 - Run ./configure --without-gcc --with-cxx-main=CC --enable-64-
> > bit ....
> > 2 - Edit the generated Makefile and change 3 lines
> > CC = cc -xtarget=opteron -xarch=amd64
> > CXX = CC -xtarget=opteron -xarch=amd64
> > MAINCC = CC -xtarget=opteron -xarch=amd64
> > The -xtarget and -xarch flags must be adjusted for UltraSparc.
> > 3 - Edit python source file ./Include/pyport.h before line 728 (in
> > Python 2.5.1) as follows.
> > Add these 3 lines:
> > #ifndef __GNUC__ /* non-GNU C/C++, like SUN */
> > # undef LONG_BIT
> > #endif
> > such that LONG_BIT is #define'd next
> > #ifndef LONG_BIT
> > #define LONG_BIT (8 * SIZEOF_LONG)
> > #endif
> > before this error message can occur
> > #if LONG_BIT != 8 * SIZEOF_LONG
> > /* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some
> > recent
> > * 32-bit platforms using gcc. We try to catch that here at
> > compile-time
> > * rather than waiting for integer multiplication to trigger bogus
> > * overflows.
> > */
> > #error "LONG_BIT definition appears wrong for platform (bad gcc/
> > glibc config?)."
> > #endif
> > 4 - Run make and check the resulting Python binary with file ./
> > python.
> > However, make test still fails and that will require further
> > investigation.
> > /Jean Brouwers
> > **) Sun C/C++ 5.8 2005/10/14 on an Ultra 20 Opteron machine
> > On Oct 29, 12:06 pm, MrJean1 <MrJe... at gmail.com> wrote:> Building 64-bit Python is still elusive. I tried various ways to add -
> > > xtarget=opteron -xarch-amd64 to the C/C++ flags but that still fails
> > > to produce a 64-bit build. Changing the Makefile is not sufficient
> > > since that causes compilation errors.
> > > It looks like the ./configure command must run with those additional
> > > flags. Passing the flags in environment variables defining CC and CXX
> > > only works for CXX. The additional flags do not appear on the C
> > > compiler command lines.
> > > /Jean Brouwers
> > > On Oct 28, 11:03 pm, plumb and tree <plumbandt... at gmail.com> wrote:
> > .....
More information about the Python-list