[SciPy-Dev] Broken toolchain: cannot link a simple C program
Scott Sinclair
scott.sinclair.za at gmail.com
Wed Dec 21 01:28:29 EST 2011
On 21 December 2011 02:50, <avalle at famaf.unc.edu.ar> wrote:
> I am trying to compile numpy using fortran compiler. I am running Ubuntu
> 11.10
> gnu: no Fortran 90 compiler found (Is that a problem?), and what means
> "cannot link a simple C program"?
>
> Thank you for your help
>
> lucia at takenoko:~/numpy-1.6.1$ python setup.py config --compiler=intelem
> build_clib --compiler=intelem build_ext --compiler=intelem install
> Running from numpy source directory.non-existing path in
> 'numpy/distutils': 'site.cfg'
> F2PY Version 2
> blas_opt_info:
> blas_mkl_info:
> libraries mkl,vml,guide not found in /usr/local/lib
> libraries mkl,vml,guide not found in /usr/lib
> NOT AVAILABLE
>
> atlas_blas_threads_info:
> Setting PTATLAS=ATLAS
> libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
> Setting PTATLAS=ATLAS
> customize GnuFCompiler
> Could not locate executable g77
> Found executable /usr/bin/f77
> gnu: no Fortran 90 compiler found
> gnu: no Fortran 90 compiler found
> customize IntelFCompiler
> Found executable /opt/intel/Compiler/11.1/038/bin/intel64/ifort
> customize LaheyFCompiler
> Could not locate executable lf95
> customize PGroupFCompiler
> Could not locate executable pgf90
> Could not locate executable pgf77
> customize AbsoftFCompiler
> Could not locate executable f90
> absoft: no Fortran 90 compiler found
> absoft: no Fortran 90 compiler found
> customize NAGFCompiler
> Found executable /usr/bin/f95
> customize VastFCompiler
> customize CompaqFCompiler
> Could not locate executable fort
> customize IntelItaniumFCompiler
> customize IntelEM64TFCompiler
> customize IntelEM64TFCompiler
> customize IntelEM64TFCompiler using config
> compiling '_configtest.c':
>
> /* This file is generated from numpy/distutils/system_info.py */
> void ATL_buildinfo(void);
> int main(void) {
> ATL_buildinfo();
> return 0;
> }
>
> C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv
> -O2 -Wall -Wstrict-prototypes -fPIC
>
> compile options: '-c'
> gcc: _configtest.c
> gcc -pthread _configtest.o -L/usr/lib/atlas-base -lptf77blas -lptcblas
> -latlas -o _configtest
> ATLAS version 3.8.4 built by buildd on Sat Sep 10 23:12:12 UTC 2011:
> UNAME : Linux crested 2.6.24-29-server #1 SMP Wed Aug 10 15:58:57
> UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> INSTFLG : -1 0 -a 1
> ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_HAMMER -DATL_CPUMHZ=1993
> -DATL_USE64BITS -DATL_GAS_x8664
> F2CDEFS : -DAdd_ -DF77_INTEGER=int -DStringSunStyle
> CACHEEDGE: 393216
> F77 : gfortran, version GNU Fortran (Ubuntu/Linaro 4.6.1-9ubuntu2)
> 4.6.1
> F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4
> -Wa,--noexecstack -fPIC -m64
> SMC : gcc, version gcc (Ubuntu/Linaro 4.6.1-9ubuntu2) 4.6.1
> SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4
> -Wa,--noexecstack -fPIC -m64
> SKC : gcc, version gcc (Ubuntu/Linaro 4.6.1-9ubuntu2) 4.6.1
> SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4
> -Wa,--noexecstack -fPIC -m64
> success!
> removing: _configtest.c _configtest.o _configtest
> Setting PTATLAS=ATLAS
> FOUND:
> libraries = ['ptf77blas', 'ptcblas', 'atlas']
> library_dirs = ['/usr/lib/atlas-base']
> language = c
> define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
> include_dirs = ['/usr/include/atlas']
>
> FOUND:
> libraries = ['ptf77blas', 'ptcblas', 'atlas']
> library_dirs = ['/usr/lib/atlas-base']
> language = c
> define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
> include_dirs = ['/usr/include/atlas']
>
> lapack_opt_info:
> lapack_mkl_info:
> mkl_info:
> libraries mkl,vml,guide not found in /usr/local/lib
> libraries mkl,vml,guide not found in /usr/lib
> NOT AVAILABLE
>
> NOT AVAILABLE
>
> atlas_threads_info:
> Setting PTATLAS=ATLAS
> libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
> libraries lapack_atlas not found in /usr/local/lib
> libraries lapack not found in /usr/lib/atlas-base
> numpy.distutils.system_info.atlas_threads_info
> Setting PTATLAS=ATLAS
> Setting PTATLAS=ATLAS
> FOUND:
> libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
> library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
> language = f77
> define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
> include_dirs = ['/usr/include/atlas']
>
> FOUND:
> libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
> library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
> language = f77
> define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
> include_dirs = ['/usr/include/atlas']
>
> running config
> running build_clib
> running build_src
> build_src
> building py_modules sources
> building library "npymath" sources
> Could not locate executable icc
> Could not locate executable ecc
> customize GnuFCompiler
> gnu: no Fortran 90 compiler found
> gnu: no Fortran 90 compiler found
> customize IntelFCompiler
> customize LaheyFCompiler
> customize PGroupFCompiler
> customize AbsoftFCompiler
> absoft: no Fortran 90 compiler found
> absoft: no Fortran 90 compiler found
> customize NAGFCompiler
> customize VastFCompiler
> customize CompaqFCompiler
> customize IntelItaniumFCompiler
> customize IntelEM64TFCompiler
> customize IntelEM64TFCompiler
> customize IntelEM64TFCompiler using config
> C compiler: icc -m64 -fPIC
>
> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray
> -Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.7 -c'
> icc: _configtest.c
> sh: icc: not found
> sh: icc: not found
> failure.
> removing: _configtest.c _configtest.o
> Traceback (most recent call last):
> File "setup.py", line 196, in <module>
> setup_package()
> File "setup.py", line 189, in setup_package
> configuration=configuration )
> File "/home/lucia/numpy-1.6.1/numpy/distutils/core.py", line 186, in setup
> return old_setup(**new_attr)
> File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
> dist.run_commands()
> File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
> self.run_command(cmd)
> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
> cmd_obj.run()
> File "/home/lucia/numpy-1.6.1/numpy/distutils/command/build_clib.py",
> line 62, in run
> self.run_command('build_src')
> File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
> self.distribution.run_command(command)
> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
> cmd_obj.run()
> File "/home/lucia/numpy-1.6.1/numpy/distutils/command/build_src.py",
> line 152, in run
> self.build_sources()
> File "/home/lucia/numpy-1.6.1/numpy/distutils/command/build_src.py",
> line 163, in build_sources
> self.build_library_sources(*libname_info)
> File "/home/lucia/numpy-1.6.1/numpy/distutils/command/build_src.py",
> line 298, in build_library_sources
> sources = self.generate_sources(sources, (lib_name, build_info))
> File "/home/lucia/numpy-1.6.1/numpy/distutils/command/build_src.py",
> line 385, in generate_sources
> source = func(extension, build_dir)
> File "numpy/core/setup.py", line 696, in get_mathlib_info
> raise RuntimeError("Broken toolchain: cannot link a simple C program")
> RuntimeError: Broken toolchain: cannot link a simple C program
Check that icc is installed and on your path. The line "sh: icc: not
found" indicates that it isn't..
Cheers,
Scott
More information about the SciPy-Dev
mailing list