Hi I'm trying to build SciPy on Mac OS 10.5 using gfortran from MacPorts gcc-4.2.2, which gets installed as gfortran-mp-4.2. When I build I get the following error: Command output: customize IbmFCompiler customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize Gnu95FCompiler Could not locate executable gfortran Could not locate executable f95 customize G95FCompiler customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize Gnu95FCompiler Could not locate executable gfortran Could not locate executable f95 customize NAGFCompiler customize NAGFCompiler using build_clib building 'dfftpack' library compiling Fortran sources Fortran f77 compiler: f95 -fixed -O4 -target=native Fortran f90 compiler: f95 -O4 -target=native Fortran fix compiler: f95 -fixed -O4 -target=native creating build/temp.macosx-10.3-i386-2.5 creating build/temp.macosx-10.3-i386-2.5/scipy creating build/temp.macosx-10.3-i386-2.5/scipy/fftpack creating build/temp.macosx-10.3-i386-2.5/scipy/fftpack/dfftpack compile options: '-c' f95:f77: scipy/fftpack/dfftpack/dcosqb.f sh: f95: command not found sh: f95: command not found error: Command "f95 -fixed -O4 -target=native -c -c scipy/fftpack/dfftpack/dcosqb.f -o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/dfftpack/dcosqb.o" failed with exit status 127
From this error it looks like SciPy is trying to use f95 as the fortran compiler executable, not gfortran-mp-4.2. Is there a way that I can specify which fortran compiler to use?
Cheers Adam
On 28/10/2007, Adam Mercer <ramercer@gmail.com> wrote:
Is there a way that I can specify which fortran compiler to use?
I've got a little further with this, if I create a link to gfortran-mp-4.2 somewhere in my $PATH called gfortran, then scipy finds it and builds without issue. It also seems that I can specify which vendor of fortran compiler to use with $ python setup.py build --fcompiler=<Vendor> but this only seems to work when the fortran compiler uses the standard name, is there a way to specify the path to the fortran compiler? Cheers Adam
Adam Mercer wrote:
On 28/10/2007, Adam Mercer <ramercer@gmail.com> wrote:
Is there a way that I can specify which fortran compiler to use?
I've got a little further with this, if I create a link to gfortran-mp-4.2 somewhere in my $PATH called gfortran, then scipy finds it and builds without issue.
It also seems that I can specify which vendor of fortran compiler to use with
$ python setup.py build --fcompiler=<Vendor>
but this only seems to work when the fortran compiler uses the standard name, is there a way to specify the path to the fortran compiler?
[numpy]$ python setup.py config_fc --help Running from numpy source directory. Common commands: (see '--help-commands' for more) setup.py build will build the package underneath 'build/' setup.py install will install the package Global options: --verbose (-v) run verbosely (default) --quiet (-q) run quietly (turns verbosity off) --dry-run (-n) don't actually do anything --help (-h) show detailed help message Options for 'config_fc' command: --fcompiler specify Fortran compiler type --f77exec specify F77 compiler command --f90exec specify F90 compiler command --f77flags specify F77 compiler flags --f90flags specify F90 compiler flags --opt specify optimization flags --arch specify architecture specific optimization flags --debug (-g) compile with debugging information --noopt compile without optimization --noarch compile without arch-dependent optimization --help-fcompiler list available Fortran compilers usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help -- 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
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 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? Cheers Adam
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
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?
Hmm, file a bug on the numpy Trac and assign it to dmcooke. He was the last to touch this area. It's possible there are still bugs. Attach the full output of the command to the ticket. Thanks. -- 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
On 28/10/2007, Robert Kern <robert.kern@gmail.com> wrote:
Hmm, file a bug on the numpy Trac and assign it to dmcooke. He was the last to touch this area. It's possible there are still bugs. Attach the full output of the command to the ticket. Thanks.
Will do, thanks for the help. Cheers Adam
On Oct 29, 2007, at 12:14 , Adam Mercer wrote:
On 28/10/2007, Robert Kern <robert.kern@gmail.com> wrote:
Hmm, file a bug on the numpy Trac and assign it to dmcooke. He was the last to touch this area. It's possible there are still bugs. Attach the full output of the command to the ticket. Thanks.
Will do, thanks for the help.
(typo there, assign to cookedm). I have much the same setup, except I use Python 2.5 from python.org instead of MacPort's. I have this in ~/.pydistutils.cfg : [config_fc] fcompiler=gfortran f77exec=gfortran-mp-4.2 f90exec=gfortran-mp-4.2 and I have no problems. I'll take a look at it passing the above on the command line like you're doing. -- |>|\/|< /------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca
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
On 31/10/2007, David M. Cooke <cookedm@physics.mcmaster.ca> wrote:
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.
Yep numpy-1.0.3.1 and scipy-0.6.0
Try a current svn version of numpy.
Will do, thanks. Cheers Adam
On 31/10/2007, David M. Cooke <cookedm@physics.mcmaster.ca> wrote:
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.
This problem goes away with numpy-1.0.4 Cheers Adam
participants (3)
-
Adam Mercer
-
David M. Cooke
-
Robert Kern