Patches item #1562825, was opened at 2006-09-21 14:01
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1562825&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Chaza (masterdriverz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python 2.5 fails with -Wl,--as-needed in LDFLAGS

Initial Comment:
Python 2.5 fails at final linking with this error:

i686-pc-linux-gnu-ranlib libpython2.5.a
i686-pc-linux-gnu-gcc -pthread -Wl,--as-needed -Xlinker
-export-dynamic -o
python \
                        Modules/python.o \
                        -L. -lpython2.5 -lpthread -ldl
 -lutil -L/usr/lib -lz  
-lm
./libpython2.5.so: undefined reference to `inflateEnd'
./libpython2.5.so: undefined reference to `deflate'
./libpython2.5.so: undefined reference to `deflateInit_'
./libpython2.5.so: undefined reference to `inflateInit2_'
./libpython2.5.so: undefined reference to `inflate'
./libpython2.5.so: undefined reference to `crc32'
./libpython2.5.so: undefined reference to `deflateEnd'
./libpython2.5.so: undefined reference to `deflateCopy'
./libpython2.5.so: undefined reference to `deflateInit2_'
./libpython2.5.so: undefined reference to `adler32'
./libpython2.5.so: undefined reference to `inflateCopy'
collect2: ld returned 1 exit status
make: *** [python] Error 1

!!! ERROR: dev-lang/python-2.5_rc1 failed.

Attached patch fixes this, by changing the linking
order from "Modules/python.o -L. -lpython2.5 -lpthread
-ldl -lutil -L/usr/lib -lz -lm" to "Modules/python.o
-lpython2.5 -L. -lpthread -ldl -lutil -L/usr/lib -lz
-lm" , basically swapping "-L. -lpython2.5" around. The
patch edits configure.in and swaps them for Linux, BSD
and SunOS.

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

>Comment By: Martin v. Löwis (loewis)
Date: 2006-09-24 19:25

Message:
Logged In: YES 
user_id=21627

Can you please provide exact instructions on how to
reproduce the problem?

The patch looks wrong. If libpython2.5.so has references to
libz, then it should be linked with libz itself (rather than
linking the executable with libz).

Notice that the procedure to create a shared libpython is
mostly unmaintained and unsupported; so patches to improve
it would be appreciated.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1562825&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to