Ticket #455 (new defect)
make scipy ignore libs in /usr and /usr/local
| Reported by: | mabshoff | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.11 |
| Component: | packages: standard | Keywords: | |
| Cc: | jason, mvngu | Work issues: | |
| Report Upstream: | N/A | Reviewers: | |
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by mabshoff) (diff)
Reported by JMD:
system : AMD64 X2 4200
Slamd64 (Slackware 11.0 for x86-64)
gcc 3.4.6
Here it seems that /usr/local/lib/libfftw3.a on my system is used,
maybe instead of something inside sage-2.8/
log : gcc: build/src.linux-x86_64-2.5/Lib/fftpack/_fftpackmodule.c
sage_fortran -shared -shared build/temp.linux-x86_64-2.5/build/
src.linux-x86_64-2.5/Lib/fftpack/_fftpackmodule.o build/temp.linux-
x86_64-2.5/Lib/fftpack/src/zfft.o build/temp.linux-x86_64-2.5/Lib/
fftpack/src/drfft.o build/temp.linux-x86_64-2.5/Lib/fftpack/src/
zrfft.o build/temp.linux-x86_64-2.5/Lib/fftpack/src/zfftnd.o build/
temp.linux-x86_64-2.5/build/src.linux-x86_64-2.5/fortranobject.o -L/
usr/local/lib -Lbuild/temp.linux-x86_64-2.5 -ldfftpack -lfftw3 -o
build/lib.linux-x86_64-2.5/scipy/fftpack/_fftpack.so
ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libfftw3.a: ne peut lire les symboles: Mauvaise valeur
ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation R_X86_64_32
against `a local symbol' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libfftw3.a: ne peut lire les symboles: Mauvaise valeur
error: Command "sage_fortran -shared -shared build/temp.linux-
x86_64-2.5/build/src.linux-x86_64-2.5/Lib/fftpack/_fftpackmodule.o
build/temp.linux-x86_64-2.5/Lib/fftpack/src/zfft.o build/temp.linux-
x86_64-2.5/Lib/fftpack/src/drfft.o build/temp.linux-x86_64-2.5/Lib/
fftpack/src/zrfft.o build/temp.linux-x86_64-2.5/Lib/fftpack/src/
zfftnd.o build/temp.linux-x86_64-2.5/build/src.linux-x86_64-2.5/
fortranobject.o -L/usr/local/lib -Lbuild/temp.linux-x86_64-2.5 -
ldfftpack -lfftw3 -o build/lib.linux-x86_64-2.5/scipy/fftpack/
_fftpack.so" failed with exit status 1
Error building scipy.
The problem goes away when /usr/local/lib/libfftw3.a is moved.
Cheers,
Michael
Change History
comment:3 Changed 4 years ago by mabshoff
- Description modified (diff)
This problem can be fixed by patching the default locations the build system looks for libraries. We should disallow /usr and /usr/local and on OSX the various places for Fink and MacPorts? since more than likely some random crap will be pulled in that way.
Cheers,
Michael
comment:4 follow-up: ↓ 5 Changed 4 years ago by jason
IIRC, fftw is stripped out of the scipy 0.7 release, so this problem may go away, right?
On the other hand, we'll probably miss fftw, since I understand that in at least some cases, it is faster than the default scipy fftpack.
comment:5 in reply to: ↑ 4 Changed 4 years ago by mabshoff
- Summary changed from scipy picks /usr/local/lib/libfftw3.a instead of $SAGE_LIB/libfftw3.a to make scipy ignore libs in /usr and /usr/local
Replying to jason:
IIRC, fftw is stripped out of the scipy 0.7 release, so this problem may go away, right?
IIRC there is still some fft support, but the point is that we should not pick up random crap.
On the other hand, we'll probably miss fftw, since I understand that in at least some cases, it is faster than the default scipy fftpack.
Yes, we need to figure out what to do about that.
I have changed the ticket summary to reflect the intention. I know how to do this, so we can do it during the scipy 0.7 update.
Cheers,
Michael
comment:6 Changed 3 years ago by kcrisman
- Report Upstream set to N/A
Scipy is now in version 0.7.0 in Sage. Has this been done elsewhere in the meantime? (Perhaps not, since I still need to remove /sw from my own PATH on Mac).
