This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ./configure --prefix=/ breaks, won't build C modules
Type: compile error Stage: resolved
Components: Build, Distutils Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, jas11c, jcea, r.david.murray, roger.serwy, ronaldoussoren, tarek
Priority: low Keywords:

Created on 2007-01-26 05:34 by jas11c, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg61056 - (view) Author: Jim Shankland (jas11c) Date: 2007-01-26 05:34
This appears to be a new issue with Python 2.5
Building Python 2.5 on Fedora Core 5:

./configure --prefix=/ --enable-shared
make

fails to build the C modules, as a "-L." is missing from the gcc command line used to generate the module.so file from the module.o file.

Using any other value for --prefix works.

Setting the environment variable LDFLAGS to "-L." before running ./configure appears to be a successful workaround.

Here is a representative failure (all the C modules fail).  Note the "cannot find -lpython2.5" message; this is because -L. is missing frmo the gcc command line.

building 'crypt' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/local/home/jas/Software/Languages/Python/Python-2.5/./Include -I./Include -I. -I/usr/local/include -I/local/home/jas/Software/Languages/Python/Python-2.5/Include -I/local/home/jas/Software/Languages/Python/Python-2.5 -c /local/home/jas/Software/Languages/Python/Python-2.5/Modules/cryptmodule.c -o build/temp.linux-i686-2.5/local/home/jas/Software/Languages/Python/Python-2.5/Modules/cryptmodule.o
gcc -pthread -shared build/temp.linux-i686-2.5/local/home/jas/Software/Languages/Python/Python-2.5/Modules/cryptmodule.o -L//lib -L/usr/local/lib -L/lib/python2.5/config -lcrypt -lpython2.5 -o build/lib.linux-i686-2.5/crypt.so
/usr/bin/ld: cannot find -lpython2.5
collect2: ld returned 1 exit status
msg163453 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-06-22 18:40
Closing, since this is ancient. Please, open a new bug if still relevant (for 2.7, 3.2 or 3.3).
msg163458 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-22 18:51
I took the five minutes to test this.  It does not fail in 2.7.  I remember we fixed some other issues with '-prefix=/', so I presume this got fixed at that time as a byproduct.  Either that, or it was a Fedora bug of some sort.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44509
2012-06-22 18:51:55r.david.murraysetnosy: + r.david.murray
messages: + msg163458

assignee: roger.serwy ->
resolution: out of date -> fixed
stage: test needed -> resolved
2012-06-22 18:40:34jceasetstatus: open -> closed

nosy: + roger.serwy
messages: + msg163453

assignee: tarek -> roger.serwy
resolution: out of date
2011-03-25 22:40:52eric.araujosetnosy: + jcea, ronaldoussoren
2010-08-02 09:12:21eric.araujosetnosy: + eric.araujo, tarek

components: + Distutils
assignee: tarek
2009-03-30 21:23:59ajaksu2linkissue1653457 dependencies
2009-03-30 19:48:06ajaksu2setpriority: normal -> low
stage: test needed
versions: + Python 2.6, - Python 2.5
2008-03-14 18:46:13schmirsettype: compile error
versions: + Python 2.5
2007-01-26 05:34:09jas11ccreate