Porting Python 2.5 on Solaris 10 X86
By Gunter Roeth on Nov 18, 2009
Python is a basis for many software developers and the latest versions should configure correctly on Solaris10 X86. If
you use older versions you may run into problems, and use
I am using the SunStudio12 or later compiler release, normally installed under
Download and untar the Python file.
1. Edit Python configure file (vi configure) and add the following after line 3931 :
# disable check for SUN Studio cc since it seems to pass, but generates a warning
if test "$CC" = cc
Next change is in line 10971 :
else LDSHARED='$(CC) -G';
where you have to add the $(BASECFLAGS)
else LDSHARED='$(CC) $(BASECFLAGS) -G';
and finally in line 11073 :
where you have to change the -xcode option to the -Kpic
./configure --prefix=your_prefix_path/Python-2.5 --enable-shared --without-gcc CC=/opt/SUNWspro/bin/cc LDFLAGS='-fast -m64 -xarch=sse2a' BASECFLAGS='-fast -m64 -xarch=sse2a'
Sometimes you need to build your applications with the C++ libraries using the STL port (instead of standard libC).
There is no C++ in Python, but you can compile the main program with C++:
./configure --prefix=/export/home/gunter/install64_stl/Python-2.5 --enable-shared --without-gcc CC=/export/home/SUNWspro/bin/cc LDFLAGS='-fast -m64 -xarch=sse2a' BASECFLAGS='-fast -m64 -xarch=sse2a' --with-cxx-main='CC -library=stlport4