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
these workarounds.
I am using the SunStudio12 or later compiler release, normally installed under
/opt/SUNWspro/bin
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
then
ac_cv_opt_olimit_ok=no
fi
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
else CCSHARED="-xcode=pic32";
becomes
else CCSHARED="-Kpic";
Finally
./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'
make all
make install
Tip :
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
