Wednesday Nov 18, 2009

Porting Python 2.5 on Solaris 10 X86

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




[Read More]
About

Be more productive with the Sun High-Performance Computing platform.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today