[Numpy-discussion] Help compiling numpy with new gcc

Filipe Pires Alvarenga Fernandes ocefpaf@gmail....
Wed Nov 7 12:28:23 CST 2012


Hi I am trying to compile numpy with gcc 4.7.1 and I am having the
following issue.

"RuntimeError: Broken toolchain: cannot link a simple C program"

I noticed that I need to pass the flag '-fno-use-linker-plugin' to be
able to compile it.  However, even though I did pass it by exporting
the CFLAGS, it does not work.  I guess that numpy do not use the
CFLAGS for its internal extensions.  How can I pass that option to it?


Error below:
[   11s] 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/src/npysort -Inumpy/core/include
-I/usr/include/python2.7 -c'
[   11s] gcc: _configtest.c
[   11s] gcc -pthread _configtest.o -o _configtest
[   11s] gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
[   11s] compilation terminated.
[   11s] gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
[   11s] compilation terminated.
[   11s] failure.
[   11s] removing: _configtest.c _configtest.o
[   11s] Traceback (most recent call last):
[   11s]   File "setup.py", line 214, in <module>
[   11s]     setup_package()
[   11s]   File "setup.py", line 207, in setup_package
[   11s]     configuration=configuration )
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/core.py", line 186,
in setup
[   11s]     return old_setup(**new_attr)
[   11s]   File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
[   11s]     dist.run_commands()
[   11s]   File "/usr/lib64/python2.7/distutils/dist.py", line 953, in
run_commands
[   11s]     self.run_command(cmd)
[   11s]   File "/usr/lib64/python2.7/distutils/dist.py", line 972, in
run_command
[   11s]     cmd_obj.run()
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/command/build.py",
line 37, in run
[   11s]     old_build.run(self)
[   11s]   File "/usr/lib64/python2.7/distutils/command/build.py",
line 127, in run
[   11s]     self.run_command(cmd_name)
[   11s]   File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in
run_command
[   11s]     self.distribution.run_command(command)
[   11s]   File "/usr/lib64/python2.7/distutils/dist.py", line 972, in
run_command
[   11s]     cmd_obj.run()
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/command/build_src.py",
line 152, in run
[   11s]     self.build_sources()
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/command/build_src.py",
line 163, in build_sources
[   11s]     self.build_library_sources(*libname_info)
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/command/build_src.py",
line 298, in build_library_sources
[   11s]     sources = self.generate_sources(sources, (lib_name, build_info))
[   11s]   File
"/home/abuild/rpmbuild/BUILD/numpy/numpy/distutils/command/build_src.py",
line 385, in generate_sources
[   11s]     source = func(extension, build_dir)
[   11s]   File "numpy/core/setup.py", line 648, in get_mathlib_info
[   11s]     raise RuntimeError("Broken toolchain: cannot link a
simple C program")
[   11s] RuntimeError: Broken toolchain: cannot link a simple C program
[   11s] error: Bad exit status from /var/tmp/rpm-tmp.yO2SIE (%build)
[   11s]
[   11s]
[   11s] RPM build errors:
[   11s]     Bad exit status from /var/tmp/rpm-tmp.yO2SIE (%build)


More information about the NumPy-Discussion mailing list