This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-isystem /usr/include - a bad idea? System header files not found
- From: Jens Seidel <jensseidel at users dot sf dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 29 Oct 2008 17:00:22 +0100
- Subject: -isystem /usr/include - a bad idea? System header files not found
Hi,
I noticed a strange problem today and wonder whether that's a gcc (or a
packaging) bug.
$ cat test.cpp
#include <cstdlib>
$ g++ -c -isystem /usr/include test.cpp
In file included from test.cpp:1:
/usr/include/c++/4.3/cstdlib:73:25: error: stdlib.h: No such file or directory
...
$ g++ --version
g++ (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Same problem with:
$ g++ --version
g++ (Debian 4.3.2-1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Version 4.1.2 is not affected.
Strange, isn't it? I prepand -isystem to the Boost header path to reduce
warnings and this path is on one of my boxes identical to /usr/include
so I found this problem.
Found a similar bug report but no proper solution (only a workaround):
http://mailhost.cecs.pdx.edu/pipermail/icfpc08/2008-July/000126.html
https://projects.cecs.pdx.edu/~jgmorris/icfpc08/index.cgi/ticket/9
PS: Please CC: me.
Jens