Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./configure --prefix=/ breaks, won't build C modules #44509

Closed
jas11c mannequin opened this issue Jan 26, 2007 · 3 comments
Closed

./configure --prefix=/ breaks, won't build C modules #44509

jas11c mannequin opened this issue Jan 26, 2007 · 3 comments
Labels
build The build process and cross-build stdlib Python modules in the Lib dir

Comments

@jas11c
Copy link
Mannequin

jas11c mannequin commented Jan 26, 2007

BPO 1644987
Nosy @jcea, @ronaldoussoren, @tarekziade, @serwy, @merwok, @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-06-22.18:40:34.238>
created_at = <Date 2007-01-26.05:34:09.000>
labels = ['build', 'library']
title = "./configure --prefix=/ breaks, won't build C modules"
updated_at = <Date 2012-06-22.18:51:55.984>
user = 'https://bugs.python.org/jas11c'

bugs.python.org fields:

activity = <Date 2012-06-22.18:51:55.984>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2012-06-22.18:40:34.238>
closer = 'jcea'
components = ['Build', 'Distutils']
creation = <Date 2007-01-26.05:34:09.000>
creator = 'jas11c'
dependencies = []
files = []
hgrepos = []
issue_num = 1644987
keywords = []
message_count = 3.0
messages = ['61056', '163453', '163458']
nosy_count = 7.0
nosy_names = ['jcea', 'ronaldoussoren', 'tarek', 'jas11c', 'roger.serwy', 'eric.araujo', 'r.david.murray']
pr_nums = []
priority = 'low'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue1644987'
versions = ['Python 2.6']

@jas11c
Copy link
Mannequin Author

jas11c mannequin commented Jan 26, 2007

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

@jas11c jas11c mannequin added build The build process and cross-build labels Jan 26, 2007
@schmir schmir mannequin added build The build process and cross-build labels Mar 14, 2008
@merwok merwok added the stdlib Python modules in the Lib dir label Aug 2, 2010
@merwok merwok added the stdlib Python modules in the Lib dir label Aug 2, 2010
@jcea
Copy link
Member

jcea commented Jun 22, 2012

Closing, since this is ancient. Please, open a new bug if still relevant (for 2.7, 3.2 or 3.3).

@jcea jcea assigned serwy and unassigned tarekziade Jun 22, 2012
@jcea jcea closed this as completed Jun 22, 2012
@jcea jcea assigned serwy and unassigned tarekziade Jun 22, 2012
@jcea jcea closed this as completed Jun 22, 2012
@bitdancer
Copy link
Member

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

3 participants