[LLVMbugs] [Bug 15136] New: Clang does not find precompiled header under some circumstances

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 1 02:27:20 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15136

             Bug #: 15136
           Summary: Clang does not find precompiled header under some
                    circumstances
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jpakkane at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


I'm using nevest SVN on Ubuntu Raring but this problem also occurred in
Precise.

I use precompiled headers but they are not found under certain circumstances.
Here's how to replicate the issue:

sudo apt-get install ninja-build
sudo apt-get install libicu-dev
bzr branch lp:libcolumbus
cd libcolumbus
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=debug -G Ninja ..
ninja

You get an error message saying that the pch can not be found. If you use the
Make backend, the pch is found. With gcc both Make and Ninja work without
problems.

What happens in the build is that the precompiled header is written to
BUILDDIR/src and that directory is then added to the command line with -I.

The only difference between the two invocations I can see is that Make uses
global paths like this:

-I[/path/to/build/dir]/src

whereas Ninja cd's into the build root and specifies the path with this:

-Isrc

The latter invocation is in the correct directory, since it refers to the
source file like this: ../src/ErrorValues.cc and it works just fine if
precompiled headers are disabled.

Thus the include paths should be set up correctly but Clang does not seem to be
able to find the pch.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list