[SciPy-user] Errors compiling scipy with icc and intel mkl

Robert Kern robert.kern at gmail.com
Mon Dec 18 18:19:10 CST 2006


Tom Denniston wrote:
> Ok.  This seems to be totally a function of the LD_FLAGS environment
> variable.  It looks like the Scipy build script or disutils puts the
> LD flags before the .o files on the command line which cause g77 to
> error out.  Apparantely if you want -L directives on the command line
> for g77 you need to put them after the .o files.  Simply removing the
> LD_FLAGS from the environment fixes the problem.  Or is a workaround,
> at least.  I unfortunately do not understand the issue well enough to
> fix the scipy build script if it is in fact broken.

Yes, LDFLAGS will *replace* all of the link options that distutils will
otherwise try to set. If you really need to add flags to *all* extensions, use
the -L and -l flags for the build_ext command:

  $ python setup.py build_src build_clib build_ext -L/opt/local/lib build

Preferably, though, use the site.cfg file to set these things.

If you could tell us which instructions told you to set LDFLAGS, that would be
helpful, since we should correct them.

-- 
Robert Kern

"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