Compile error: Python 2.2.1 in Solaris 2.5.1, with GCC 2.95.3

Jesus Cea Avion jcea at argo.es
Thu Apr 18 15:38:34 EDT 2002


I've detected two problems:

a) Problems importing "pthreads.h".

b) Problems detecting a correct value for "LINKFORSHARED".

c) Problems with libraries in "/usr/local/lib".

Here you have the patch.

CAUTION: This patch is not intented to be included *as is* in future
Python 2.2.2. That bugfix will be work for Python maintainers :-).
Its only mission is to allow correct Python 2.2.1 compilation under
my environment.

Before compile Python 2.2.1, you must do:

LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

>>>>>

cvs server: Diffing .
Index: Makefile.pre.in
===================================================================
RCS file: /opt/src/cvsroot/python/Makefile.pre.in,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.4.2.1
diff -c -u -r1.1.1.4 -r1.1.1.4.2.1
cvs server: conflicting specifications of output style
--- Makefile.pre.in     2002/04/18 10:28:35     1.1.1.4
+++ Makefile.pre.in     2002/04/18 17:29:20     1.1.1.4.2.1
@@ -94,8 +94,8 @@
 
 # Symbols used for using shared libraries
 SO=            @SO@
-LDSHARED=      @LDSHARED@
-BLDSHARED=     @BLDSHARED@
+LDSHARED=      @LDSHARED@ 
+BLDSHARED=     @BLDSHARED@ -Wl,--rpath -Wl,/usr/local/lib
 DESTSHARED=    $(BINLIBDEST)/lib-dynload
 
 # Executable suffix (.exe on Windows and Mac OS X)
Index: configure
===================================================================
RCS file: /opt/src/cvsroot/python/configure,v
retrieving revision 1.1.1.7
retrieving revision 1.1.1.7.2.1
diff -c -u -r1.1.1.7 -r1.1.1.7.2.1
cvs server: conflicting specifications of output style
--- configure   2002/04/18 10:28:36     1.1.1.7
+++ configure   2002/04/18 12:16:59     1.1.1.7.2.1
@@ -3275,13 +3275,8 @@
                then
                        LINKFORSHARED="-Wl,--export-dynamic"
                fi;;
-       SunOS/5*) case $CC in
-                 *gcc*)
-                   if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
-                   then
+       SunOS/5*) 
                        LINKFORSHARED="-Xlinker --export-dynamic"
-                   fi;;
-                 esac;;
        esac
 fi
 echo "$ac_t""$LINKFORSHARED" 1>&6
Index: setup.py
===================================================================
RCS file: /opt/src/cvsroot/python/setup.py,v
retrieving revision 1.1.1.5
retrieving revision 1.1.1.5.2.1
diff -c -u -r1.1.1.5 -r1.1.1.5.2.1
cvs server: conflicting specifications of output style
--- setup.py    2002/04/18 10:28:37     1.1.1.5
+++ setup.py    2002/04/18 17:29:20     1.1.1.5.2.1
@@ -1,7 +1,7 @@
 # Autodetecting setup.py script for building the Python extensions
 #
 
-__version__ = "$Revision: 1.1.1.5 $"
+__version__ = "$Revision: 1.1.1.5.2.1 $"
 
 import sys, os, getopt
 from distutils import sysconfig
@@ -211,8 +211,8 @@
         # lib_dirs and inc_dirs are used to search for files;
         # if a file is found in one of those directories, it can
         # be assumed that no additional -I,-L directives are needed.
-        lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
-        inc_dirs = self.compiler.include_dirs + ['/usr/include']
+        lib_dirs = self.compiler.library_dirs + ['/usr/local/lib/', '/lib', '/usr/lib']
+        inc_dirs = self.compiler.include_dirs + ['/usr/local/include', '/usr/include']
         exts = []
 
         platform = self.get_platform()

<<<<<

-- 
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
                                      _/_/    _/_/          _/_/_/_/_/
PGP Key Available at KeyServ   _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz



More information about the Python-list mailing list