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

make scipy ignore libs in /usr and /usr/local #455

Closed
sagetrac-mabshoff mannequin opened this issue Aug 19, 2007 · 9 comments
Closed

make scipy ignore libs in /usr and /usr/local #455

sagetrac-mabshoff mannequin opened this issue Aug 19, 2007 · 9 comments

Comments

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 19, 2007

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

CC: @jasongrout @sagetrac-mvngu

Component: packages: standard

Issue created by migration from https://trac.sagemath.org/ticket/455

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.8.3 milestone Aug 19, 2007
@williamstein williamstein modified the milestones: sage-2.8.3, sage-2.9 Aug 29, 2007
@sagetrac-mabshoff
Copy link
Mannequin Author

sagetrac-mabshoff mannequin commented Feb 12, 2009

comment:3

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

@sagetrac-mabshoff

This comment has been minimized.

@jasongrout
Copy link
Member

comment:4

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.

@sagetrac-mabshoff
Copy link
Mannequin Author

sagetrac-mabshoff mannequin commented Feb 12, 2009

comment:5

Replying to @jasongrout:

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

@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title scipy picks /usr/local/lib/libfftw3.a instead of $SAGE_LIB/libfftw3.a make scipy ignore libs in /usr and /usr/local Feb 12, 2009
@kcrisman
Copy link
Member

comment:6

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).

@jasongrout
Copy link
Member

comment:7

I wonder if #9208 and #9210 make it so that you don't need to remove /sw from your path anymore.

I don't believe that fftw3 is used anymore in scipy:

~/sage% grep "lfftw3" install.log
~/sage%  

So I think this ticket can safely be closed.

@jasongrout
Copy link
Member

comment:8

(there might be other /usr/local/ libs that are picked up, but fftw won't be since it's not used)

@kcrisman
Copy link
Member

kcrisman commented Jul 7, 2012

comment:9

I wonder if #9208 and #9210 make it so that you don't need to remove /sw from your path anymore.

That might be dangerous.

So I think this ticket can safely be closed.

So... positive review, sage-invalid? I'll let you make the call.

@mwhansen
Copy link
Contributor

comment:10

I think we should mark it as invalid.

@mwhansen mwhansen removed this from the sage-5.11 milestone Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants