-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
BUG: numpy build fails with gcc version 4.9.2 #21302
Copy link
Copy link
Closed
Labels
00 - BugC++Related to introduction and use of C++ in the NumPy code baseRelated to introduction and use of C++ in the NumPy code basecomponent: build
Description
Describe the issue:
Numpy fails to build with gcc version 4.9.2 with the following error:
RuntimeError: Broken toolchain: cannot link a simple C++ program. note: A compiler with support for C++11 language features is required.
This should not be a problem, because C++11 standard is supported since gcc 4.8.1.
The problem is that when compiling the test code in numpy/core/setup.py, the -std=c++11 flag is not passed to the compiler.
The default c++ standard was changed in version 6.1 from C++98 to C++14, so this issue might affect all prior gcc versions.
By monkey-patching setup.py to include the -std=c++11 flag, the build run successfully.
Reproduce the code example:
python setup.py buildError message:
RuntimeError: Broken toolchain: cannot link a simple C++ program. note: A compiler with support for C++11 language features is required.NumPy/Python version information:
1.22.3 3.8.12 (default, Jan 12 2022, 09:59:17)
[GCC 4.9.2]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
00 - BugC++Related to introduction and use of C++ in the NumPy code baseRelated to introduction and use of C++ in the NumPy code basecomponent: build