You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building the modules fails if --enable-shared is used. The linker picks
up an existing library from /usr/local/lib, which has not been compiled
with -fPIC:
gcc -pthread -shared build/temp.linux-x86_64-3.2/home/stefan/svn/py3k/Modules/_struct.o -L/usr/local/lib -L. -lpython3.2m -o build/lib.linux-x86_64-3.2/_struct.cpython-32m.so
/usr/bin/ld: /usr/local/lib/libpython3.2m.a(abstract.o): relocation R_X86_64_32S against `_PyObject_NextNotImplemented' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.2m.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Linking works if the order of the flags is changed to "-L. L/usr/local/lib".
Since I'm on Linux, I did a prior install into /usr/local. But I'm pretty
sure that BSD ports (which you might view as the system install) also use
/usr/local.
Activity
skrah commentedon Nov 24, 2010
Building the modules fails if --enable-shared is used. The linker picks
up an existing library from /usr/local/lib, which has not been compiled
with -fPIC:
gcc -pthread -shared build/temp.linux-x86_64-3.2/home/stefan/svn/py3k/Modules/_struct.o -L/usr/local/lib -L. -lpython3.2m -o build/lib.linux-x86_64-3.2/_struct.cpython-32m.so
/usr/bin/ld: /usr/local/lib/libpython3.2m.a(abstract.o): relocation R_X86_64_32S against `_PyObject_NextNotImplemented' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython3.2m.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
Linking works if the order of the flags is changed to "-L. L/usr/local/lib".
warsaw commentedon Nov 24, 2010
So, you must have done a 'make install' or 'make altinstall' to get a build into /usr/local, right? Without that of course it works fine.
You're probably still right about changing the order so it picks up the local copy first.
warsaw commentedon Nov 24, 2010
I'm bumping the status down since this likely won't affect the average user, only developers who do their own source installs.
doko42 commentedon Nov 24, 2010
-L. should appear before -L/usr/local/lib.
skrah commentedon Nov 24, 2010
Since I'm on Linux, I did a prior install into /usr/local. But I'm pretty
sure that BSD ports (which you might view as the system install) also use
/usr/local.
warsaw commentedon Nov 24, 2010
r86734
warsaw commentedon Nov 24, 2010
BTW, I am not sure it's worth backporting this to 3.1 and 2.7. It seems like a corner case that will not affect most users.
rpetrov commentedon Nov 25, 2010
It is wort to fix regression if all directories are absolute.
ambv commentedon Nov 27, 2010
Roumen's patch fixes a regression where readline extension would fail to build on Mac OS X 10.6.5.
warsaw commentedon Nov 27, 2010
r86837