In a gcc invocation, cc1 fails with a "Not a directory" error when compiling a
trivial file if there is a file (not a directory) named "lib" in the parent to
the working directory.
To recreate it:
bash-3.2# mkdir temp
bash-3.2# cd temp
bash-3.2# mkdir temp1
bash-3.2# touch lib
bash-3.2# cd temp1
bash-3.2# cat>utl1.c< void fun1(){}
> EOF
bash-3.2# gcc -c utl1.c
cc1: error: ../lib/gcc/i686-pc-linux-gnu/4.2.1/include: Not a directory
cc1: error:
../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include: Not a
directory
gcc was built as follows:
../gcc-4.2.1/configure --prefix=/usr\
--libexecdir=/usr/lib --enable-shared --enable-threads=posix\
--enable-__cxa_atexit --enable-languages=c,c++\
--disable-bootstrap
make
make install
when run verbosely, gcc produces the following output:
bash-3.2# gcc -c -v utl1.c
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.1/configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-languages=c,c++ --disable-bootstrap
Thread model: posix
gcc version 4.2.1
/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/cc1 -quiet -v -iprefix
../lib/gcc/i686-pc-linux-gnu/4.2.1/ utl1.c -quiet -dumpbase utl1.c
-mtune=generic -auxbase utl1 -version -o /tmp/ccsAiCrL.s
cc1: error: ../lib/gcc/i686-pc-linux-gnu/4.2.1/include: Not a directory
cc1: error:
../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include: Not a
directory
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/i686-pc-linux-gnu/4.2.1/include
/usr/include
End of search list.
GNU C version 4.2.1 (i686-pc-linux-gnu)
compiled by GNU C version 4.2.1.
GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=97102
--
Summary: cc1 fails with "Not a directory" on trivial file
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: af804 at bfn dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34748