FS#49313 - GCC header cmath is unable to find math.h if -Isystem is used
Attached to Project:
Arch Linux
Opened by Tommy McGuire (mcguire) - Thursday, 12 May 2016, 19:28 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 12 May 2016, 20:40 GMT
Opened by Tommy McGuire (mcguire) - Thursday, 12 May 2016, 19:28 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 12 May 2016, 20:40 GMT
|
Details
Description:
Trying to compile a file using "include <cmath>" with a command line argument of "-isystem /usr/include" causes the error: In file included from math.cc:1:0: /usr/include/c++/6.1.1/cmath:45:23: fatal error: math.h: No such file or directory #include_next <math.h> Additional info: * gcc 6.1.1-1 Steps to reproduce: * command line: gcc -o math math.cc -isystem /usr/include |
This task depends upon
Closed by Doug Newgard (Scimmia)
Thursday, 12 May 2016, 20:40 GMT
Reason for closing: Not a bug
Additional comments about closing: Don't screw with the search path
Thursday, 12 May 2016, 20:40 GMT
Reason for closing: Not a bug
Additional comments about closing: Don't screw with the search path
The problem was discovered when compiling the Pony compiler, which uses LLVM and uses -isystem to put the LLVM header location at the top of the bracket search list. Replacing -isystem with -I works on my Arch box, but breaks the compiler's other builds.
Pony
bug 797: https://github.com/ponylang/ponyc/issues/797