From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12674 invoked by alias); 21 Dec 2008 13:05:33 -0000 Received: (qmail 12466 invoked by uid 48); 21 Dec 2008 13:04:13 -0000 Date: Sun, 21 Dec 2008 13:05:00 -0000 Message-ID: <20081221130413.12465.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/37995] using fails if gcc invoked in a directory which has a subdirectory called "gcc" In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dfeldstern at fastimap dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01935.txt.bz2 ------- Comment #12 from dfeldstern at fastimap dot com 2008-12-21 13:04 ------- I'm seeing the same issue, with gcc from debian unstable ("gcc (Debian 4.3.2-1) 4.3.2"). The problem appears either when a 'gcc' directory (other than the "real" gcc directory) is found through the PATH, or else GCC_EXEC_PREFIX is set to a path other than the "real" gcc path. So, here are all kinds of ways I'm able to reproduce, assuming hello.c as above: (1) with a 'gcc' subdir alongside hello.c: PATH=.:$PATH gcc hello.c (note, however, the order is important: "PATH=$PATH:." works fine...) (2) with a 'gcc' subdir in .. : PATH=..:$PATH gcc hello.c (3) with a 'gcc' subdir in /tmp: PATH=/tmp:$PATH gcc hello.c (4) regardless of the existence of a 'gcc' subdir: GCC_EXEC_PREFIX=/tmp gcc hello.c (5) the "real" gcc path is /usr/lib/gcc. However, this still fails: GCC_EXEC_PREFIX=/usr/lib/gcc gcc hello.c (6) OTOH, this works fine (note the trailing slash): GCC_EXEC_PREFIX=/usr/lib/gcc/ gcc hello.c Below are two samples of the output, for (5) and for (1): $ GCC_EXEC_PREFIX=/usr/lib/gcc gcc -v -save-temps hello.c Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Debian 4.3.2-1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1 -E -quiet -v -iprefix /usr/lib/gcci486-linux-gnu/4.3.2/ hello.c -mtune=generic -fpch-preprocess -o hello.i ignoring nonexistent directory "/usr/lib/gcci486-linux-gnu/4.3.2/include" ignoring nonexistent directory "/usr/lib/gcci486-linux-gnu/4.3.2/include-fixed" ignoring nonexistent directory "/usr/lib/gcci486-linux-gnu/4.3.2/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" ignoring nonexistent directory "/usr/lib/../../lib/gcc/i486-linux-gnu/4.3.2/include" ignoring nonexistent directory "/usr/lib/../../lib/gcc/i486-linux-gnu/4.3.2/include-fixed" ignoring nonexistent directory "/usr/lib/../../lib/gcc/i486-linux-gnu/4.3.2/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/include/i486-linux-gnu" #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 Alternatively, here's the output without GCC_EXEC_PREFIX, as in (1): $ PATH=.:$PATH gcc -v -save-temps hello.c Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Debian 4.3.2-1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' /usr/lib/gcc/i486-linux-gnu/4.3.2/cc1 -E -quiet -v -iprefix /tmp/test/../lib/gcc/i486-linux-gnu/4.3.2/ hello.c -mtune=generic -fpch-preprocess -o hello.i ignoring nonexistent directory "/tmp/test/../lib/gcc/i486-linux-gnu/4.3.2/include" ignoring nonexistent directory "/tmp/test/../lib/gcc/i486-linux-gnu/4.3.2/include-fixed" ignoring nonexistent directory "/tmp/test/../lib/gcc/i486-linux-gnu/4.3.2/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" ignoring nonexistent directory "/tmp/test/../lib/gcc/../../lib/gcc/i486-linux-gnu/4.3.2/include" ignoring nonexistent directory "/tmp/test/../lib/gcc/../../lib/gcc/i486-linux-gnu/4.3.2/include-fixed" ignoring nonexistent directory "/tmp/test/../lib/gcc/../../lib/gcc/i486-linux-gnu/4.3.2/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/include/i486-linux-gnu" #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 -- dfeldstern at fastimap dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfeldstern at fastimap dot | |com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37995