This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 7.2.0 failed with cstdlib:75:15: fatal error: stdlib.h: No such file or directory on a hello-world program


OK. Never mind. I figure it out. The problem lies in the specs file I created
using brew postinstall gcc, where the line:

*cpp_unique_options:
+ -isystem /home/linuxbrew/.linuxbrew/include

makes searching for stdlib.h in /scratch/.linuxbrew/include impossible for
system header like cmath. This is a known issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129

Either removing that or change it to -I /home/linuxbrew/.linuxbrew/include
solves the problem.



--
Sent from: http://gcc.1065356.n8.nabble.com/gcc-Help-f629689.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]