Compile python on Solaris 64bit

MrJean1 MrJean1 at gmail.com
Thu Oct 12 14:43:43 EDT 2006


I did build Python 2.5 on a Solaris 10 Ultra 20 machine (Opteron) but
using the SUN compilers.  Two changes were needed in the Makefile:
CXX=CC and CCSHARED=-KPIC.

There are a few issues which I have not investigated further (like Tcl
and ffitarget.h), but the tests pass except for 3 unexpected skips.
Other than that, Python 2.5 seems to be running fine, so far.

Also, I am using the Python 2.4 build for Solaris build from
ActiveState as well as Python 2.3.3 which is distributed with Solaris
in /usr/sfw/bin.

/Jean Brouwers


Martijn de Munnik wrote:
> Hi,
>
> I want to compile python on my solaris 10 system (amd 64 bit).
>
> I did the following:
>
> ./configure --prefix=/opt/64/python
> make
>
> which resulted in this error:
> "Include/pyport.h", line 730: #error: "LONG_BIT definition appears wrong
> for platform (bad gcc/glibc config?)."
>
> so I edited the file and removed the error line and did a configure and
> make again after a make distclean.
>
> after a new make I get this error complaining about 32 and 64 bit.
>
> ld: fatal: file Parser/acceler.o: wrong ELF class: ELFCLASS32
>
> when I look to the cc statements none of my CFLAGS are passed while these
> are in my environment;
>
> CC=cc
> CFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil
> -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
> CXX=CC
> CXXFLAGS=-xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all
> -xlibmil -xlibmopt -xtarget=opteron -xarch=amd64 -xregs=no%frameptr
> LDFLAGS=-xtarget=opteron -xarch=amd64
>
>
> anybody succesfully compiled python on solaris?
> 
> thanks,
> martijn




More information about the Python-list mailing list