This is the mail archive of the gcc-bugs@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]

[Bug c/37995] using <stdio.h> fails if gcc invoked in a directory which has a subdirectory called "gcc"



------- Comment #3 from mvanier at cs dot caltech dot edu  2008-11-03 07:38 -------
The operating system is Arch Linux, and the package manager is Arch-specific
and is called pacman.  There is a separate package manager for building
packages from scratch called ABS (Arch Build System).  I'm attaching their
build script (called PKGBUILD).  However, in this particular case I built gcc
myself and installed it in /pkg/gcc.

Here is the test you asked for:

> gcc --save-temps -v hello.c         
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /src/gcc/gcc-4.3.2/configure --prefix=/pkg/gcc
--enable-languages=c,c++,objc
Thread model: posix
gcc version 4.3.2 (GCC) 
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-mtune=generic'
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/cc1 -E -quiet -v -iprefix
/home/mvanier/tmp/../lib/gcc/i686-pc-linux-gnu/4.3.2/ hello.c -mtune=generic
-fpch-preprocess -o hello.i
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/i686-pc-linux-gnu/4.3.2/include"
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed"
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/include"
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.2/include"
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed"
ignoring nonexistent directory
"/home/mvanier/tmp/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/include
End of search list.
In file included from hello.c:1:
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory
In file included from /usr/include/stdio.h:75,
                 from hello.c:1:
/usr/include/libio.h:53:21: error: stdarg.h: No such file or directory

One thing that jumps out at me is that it is using /usr/include and
/usr/local/include as the only locations for looking up include files.
stddefs.h and stdarg.h are not there, but they aren't there in any other distro
I've looked at either, so I assumed that they were somehow handled specially by
gcc.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37995


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