[cfe-dev] clang doesn't know about it's installation prefix when searching header files

Holger Schurig hs4233 at mail.mn-solutions.de
Fri May 30 04:06:14 PDT 2008


I configured llvm with

  /usr/src/llvm/svn.llvm/configure \
     --prefix=/usr/src/llvm/dist \
     --with-llvmgccdir=/usr/src/llvm/dist \
     --enable-optimized --disable-debug

When I later compile and install clang, it installs it's own include files in the $prefix:

  $ find /usr/src/llvm/dist -name "std*.h" | tail -n3
  /usr/src/llvm/dist/Headers/stddef.h
  /usr/src/llvm/dist/Headers/stdarg.h
  /usr/src/llvm/dist/Headers/stdbool.h

But clang searches in wrong places:

  $ clang -v main.c --emit-llvm-bc
  ignoring nonexistent directory "/Headers"
  ignoring nonexistent directory "/usr/lib/gcc/i686-apple-darwin10/4.2.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/i686-apple-darwin9/4.0.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../../../powerpc-apple-darwin0/include"
  ignoring nonexistent directory "/usr/lib/gcc/i686-apple-darwin8/4.0.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include"
  ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../../powerpc-apple-darwin8/include"
  ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.1.3/include"
  ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/include"
  ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.2.3/include"
  ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.2.3/include"
  ignoring nonexistent directory "/System/Library/Frameworks"
  ignoring nonexistent directory "/Library/Frameworks"
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/local/include
   /usr/include
  End of search list.


This is on Linux (Debian Etch). Maybe llvm::sys::Path::GetMainExecutable
is buggy here?



More information about the cfe-dev mailing list