[SciPy-user] Trouble Compiling SciPy 0.4.8 under Debian 3.1r0a on AMD64

Robert Kern robert.kern at gmail.com
Wed Apr 5 14:48:09 CDT 2006

Gil Citro wrote:
> On 4/5/06, Robert Kern <robert.kern at gmail.com> wrote:
>>Gil Citro wrote:
>>>I'm trying to install SciPy 0.4.8 from source under Debian 3.1r0a on
>>>an AMD64 machine.  When I type python setup.py install, I get this
>>>/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
>>>R_X86_64_32 can not be used when making a shared object; recompile
>>>with -fPIC
>>This error message tells you what you need to do: recompile the FFTW3 libraries
>>using the -fPIC flag to gcc. Otherwise, they can't be linked into shared
>>libraries like Python extension modules. Ideally, you would compile FFTW3 as
>>shared libraries themselves although I'm not sure if the FFTW3 build process
>>makes that easy.
> Thanks, but would you have any idea how to do that?  I tried modifying
> the Makefile to add -fPIC to CFLAGS, CPPFLAGS, and FFLAGS but it
> didn't change the error when attempting to build SciPy.  I'm not that
> familiar with compiling software under Linux.  Thanks again if you
> have any other suggestions.

Is there a reason you aren't using the Debian package which provides the shared

  $ sudo apt-get install fftw3-dev

If you must build from source, pass --enable-shared to the configure script to
get shared libraries. If you must use static libraries, pass --with-pic to the
configure script to ensure that the static libraries are built with the -fPIC flag.

Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list