[SciPy-dev] FTBFS on Debian

Ondrej Certik ondrej@certik...
Mon Apr 14 08:19:57 CDT 2008


On Mon, Apr 14, 2008 at 2:48 PM, Ondrej Certik <ondrej@certik.cz> wrote:
> On Mon, Apr 14, 2008 at 1:36 PM, Robert Kern <robert.kern@gmail.com> wrote:
>  > On Mon, Apr 14, 2008 at 6:22 AM, David Cournapeau
>  >
>  > <david@ar.media.kyoto-u.ac.jp> wrote:
>  >
>  > > Robert Kern wrote:
>  >  >  >
>  >  >  > This problem is almost always caused by LDFLAGS being set. LDFLAGS
>  >  >  > *overrides* all of the Fortran link flags.
>  >  >  >
>  >  >  >
>  >  >
>  >  >  That's what I thought first, but then why gcc still uses -shared ? Why
>  >  >  only gfortran ?
>  >
>  >  As we've discussed before, this overriding behavior only exists
>  >  because we need some way to override Fortran compiler flags since the
>  >  code will always be a little bit out of date with respect to the
>  >  various new versions of the Fortran compilers that we support. C
>  >  extensions are left alone because the link flags are almost always
>  >  correct because the C compiler is almost always the one used to build
>  >  Python itself.
>
>  Wow, indeed, this solves the problem:
>
>  $ svn di
>  Index: debian/rules
>  ===================================================================
>  --- debian/rules        (revision 5013)
>  +++ debian/rules        (working copy)
>  @@ -8,6 +8,8 @@
>   # Uncomment this to turn on verbose mode.
>   #export DH_VERBOSE=1
>
>  +unexport LDFLAGS
>  +
>   PYVERS:= $(shell pyversions -v -r debian/control)
>   BASE=$(shell pwd)/debian
>   #debian_patches= umfpack signals viewer sandbox  #fft python23 amd64
>
>  Thanks a lot Robert!
>
>  This would take me hours until I'd figure it out...

Actually, one more problem. The above patch fixes this on i386, but
for amd64, I get this error now:

/usr/bin/gfortran -Wall -Wall -shared
build/temp.linux-x86_64-2.4/build/src.linux-x86_64-2.4/scipy/fftpack/convolvemodule.o
build/temp.linux-x86_64-2.4/scipy/fftpack/src/convolve.o
build/temp.linux-x86_64-2.4/build/src.linux-x86_64-2.4/fortranobject.o
-L/usr/lib -Lbuild/temp.linux-x86_64-2.4 -ldfftpack -lfftw3 -lgfortran
-o build/lib.linux-x86_64-2.4/scipy/fftpack/convolve.so
/usr/bin/ld: build/temp.linux-x86_64-2.4/libdfftpack.a(dffti.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.4/libdfftpack.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
/usr/bin/ld: build/temp.linux-x86_64-2.4/libdfftpack.a(dffti.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
build/temp.linux-x86_64-2.4/libdfftpack.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -Wall -shared
build/temp.linux-x86_64-2.4/build/src.linux-x86_64-2.4/scipy/fftpack/convolvemodule.o
build/temp.linux-x86_64-2.4/scipy/fftpack/src/convolve.o
build/temp.linux-x86_64-2.4/build/src.linux-x86_64-2.4/fortranobject.o
-L/usr/lib -Lbuild/temp.linux-x86_64-2.4 -ldfftpack -lfftw3 -lgfortran
-o build/lib.linux-x86_64-2.4/scipy/fftpack/convolve.so" failed with
exit status 1
make: *** [install] Error 1

Now I am trying to figure out how to set the -fPIC for the gfortran.
Probably in some setup.py.

I have no idea why these errors suddenly started to pop up, but
anyway, here we are.

Ondrej


More information about the Scipy-dev mailing list