[Python-bugs-list] [ python-Bugs-749911 ] --enable-shared fails on Solaris 9 with gcc-3.2.3

SourceForge.net noreply@sourceforge.net
Sat, 14 Jun 2003 06:39:44 -0700


Bugs item #749911, was opened at 2003-06-05 21:21
Message generated for change (Comment added) made by dr2048
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=749911&group_id=5470

Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Dave Reed (dr2048)
Assigned to: Martin v. Löwis (loewis)
Summary: --enable-shared fails on Solaris 9 with gcc-3.2.3

Initial Comment:
./confgiure --enable-shared
make
fails on Solaris 9 with gcc 3.2.3

        gcc -shared -o libpython2.3.so
Modules/getbuildinfo.o
        Parser/acceler.o Parser/grammar1.o
Parser/listnode.o
        Parser/node.o Parser/parser.o Parser/parsetok.o
        Parser/bitset.o Parser/metagrammar.o
Parser/firstsets.o
        Parser/grammar.o Parser/pgen.o Parser/myreadline.o
        Parser/tokenizer.o Objects/abstract.o
Objects/boolobject.o
        Objects/bufferobject.o Objects/cellobject.o
        Objects/classobject.o Objects/cobject.o
        Objects/complexobject.o Objects/descrobject.o
        Objects/enumobject.o Objects/fileobject.o
        Objects/floatobject.o Objects/frameobject.o
        Objects/funcobject.o Objects/intobject.o
Objects/iterobject.o
        Objects/listobject.o Objects/longobject.o
Objects/dictobject.o
        Objects/methodobject.o Objects/moduleobject.o
Objects/object.o
        Objects/obmalloc.o Objects/rangeobject.o
Objects/sliceobject.o
        Objects/stringobject.o Objects/structseq.o
        Objects/tupleobject.o Objects/typeobject.o
        Objects/weakrefobject.o Objects/unicodeobject.o
        Objects/unicodectype.o Python/bltinmodule.o
        Python/exceptions.o Python/ceval.o Python/compile.o
        Python/codecs.o Python/errors.o Python/frozen.o
        Python/frozenmain.o Python/future.o
Python/getargs.o
        Python/getcompiler.o Python/getcopyright.o
Python/getmtime.o
        Python/getplatform.o Python/getversion.o
Python/graminit.o
        Python/import.o Python/importdl.o Python/marshal.o
        Python/modsupport.o Python/mystrtoul.o
Python/mysnprintf.o
        Python/pyfpe.o Python/pystate.o Python/pythonrun.o
        Python/structmember.o Python/symtable.o
Python/sysmodule.o
        Python/traceback.o Python/getopt.o
Python/dynload_shlib.o
        Python/thread.o Modules/config.o Modules/getpath.o
        Modules/main.o Modules/gcmodule.o 
Modules/threadmodule.o
        Modules/signalmodule.o  Modules/posixmodule.o
        Modules/errnomodule.o  Modules/_sre.o 
Modules/_codecsmodule.o
        Modules/zipimport.o  Modules/symtablemodule.o
        Modules/xxsubtype.o -lsocket -lnsl -lrt -ldl 
-lpthread  -lm;
        \
fi
ld: warning: option -o appears more than once, first
setting taken
ln: libpython2.3.so and libpython2.3.so are identical
make: *** [libpython2.3.so] Error 2

running make again produces:
c++   -o python \
                Modules/python.o \
               
-Wl,-rpath,/home/faculty/dreed/pub/Python-2.3/lib
        -L. -lpython2.3 -lsocket -lnsl -lrt -ldl 
-lpthread   -lm
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status
make: *** [python] Error 1


----------------------------------------------------------------------

>Comment By: Dave Reed (dr2048)
Date: 2003-06-14 09:39

Message:
Logged In: YES 
user_id=795169

I found the rpath line in the Makefile and replaced it with -R
I can't seem to find the ld line in the Makefile.

I noticed that I actually did get a libpython2.3.so file
created even though
I got the errors, but I couldn't complete a make install
because of the errors

I'm trying again now with the -R line.

If you want to contact me via email at "dreed at
capital.edu", it might
be easier to work through these problems using email or IM
at some time
that we're both available. Thanks!

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-06-14 09:14

Message:
Logged In: YES 
user_id=21627

Committed as Makefile.pre.in 1.131.

Can you please add -v to the linker line, and report how the
linker is being invoked?

Can you also try to replace -rpath with -R?

This very line works fine on my copy of Solaris 9, so I'm
uncertain what the problem is.

----------------------------------------------------------------------

Comment By: Dave Reed (dr2048)
Date: 2003-06-14 08:25

Message:
Logged In: YES 
user_id=795169

That gets past the first problem. Now during the initial
compile, I get:

c++   -o python \
                Modules/python.o \
               
-Wl,-rpath,/home/faculty/dreed/pub/Python-2.3/lib -L.
-lpython2.3 -lsocket -lnsl -lrt -ldl  -lpthread   -lm  
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status
make: *** [python] Error 1


I can't find those flags in the Makefile to try removing one
of them.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-06-14 02:36

Message:
Logged In: YES 
user_id=21627

Please try the attached patch and report whether this solves
the problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=749911&group_id=5470