[SciPy-user] Specifying fortran compiler

David M. Cooke cookedm@physics.mcmaster...
Wed Oct 31 11:12:58 CDT 2007


On Oct 28, 2007, at 23:30 , Adam Mercer wrote:
> On 28/10/2007, Robert Kern <robert.kern@gmail.com> wrote:
>
>> [numpy]$ python setup.py config_fc --help
>
> Getting a bit further now, but still running into problems. Building  
> with
>
> $ python setup.py config_fc --f77exec=gfortran-mp-4.2
> --f90exec=gfortran-mp-4.2 build
>
> results in the error
>
> building 'scipy.interpolate._fitpack' extension
> warning: build_ext: extension 'scipy.interpolate._fitpack' has Fortran
> libraries but no Fortran linker found, using default linker
> compiling C sources
> C compiler: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
> -mno-fused-madd -DNDEBUG -D__DARWIN_UNIX03
>
> compile options:
> '-I/opt/local/lib/python2.5/site-packages/numpy/core/include
> -I/opt/local/include/python2.5 -c'
> gcc: scipy/interpolate/_fitpackmodule.c
> gcc -L/opt/local/lib -bundle -undefined dynamic_lookup
> build/temp.macosx-10.3-i386-2.5/scipy/interpolate/_fitpackmodule.o
> -Lbuild/temp.macosx-10.3-i386-2.5 -lfitpack -o
> build/lib.macosx-10.3-i386-2.5/scipy/interpolate/_fitpack.so
> building 'scipy.interpolate.dfitpack' extension
> error: extension 'scipy.interpolate.dfitpack' has Fortran sources but
> no Fortran compiler found

I can't reproduce this error (yes, I commented out the config_fc  
section in my ~/.pydistutils.cfg ;).

Are you using 1.0.3.1? It looks like changes I made in  
numpy.distutils.fcompiler didn't make it into that release (dangers of  
committing just before the release, I guess). Although, looking at  
them, they shouldn't make a difference.

Try a current svn version of numpy.

> whereas creating a gfortran symlink and running
>
> $ python setup.py build
>
> results in no error.
>
> Is there a way I can build without creating the gfortran symlink, as I
> want to integrate this into a MacPorts Portfile?

If it's fixed (as I think it is), best to wait for 1.0.4. I suppose  
you could make a symlink to gfortran-mp-42 in the work/ directory, and  
add it to the PATH that'd be used in the Portfile.

-- 
|>|\/|<
/------------------------------------------------------------------\
|David M. Cooke              http://arbutus.physics.mcmaster.ca/dmc/
|cookedm@physics.mcmaster.ca



More information about the SciPy-user mailing list