New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New clang 3.4 build can't find includes #19671
Comments
assigned to @sylvestre |
Upon further digging, I believe this is due to clang expecting: /usr/bin/../lib/clang/3.4.1/include unfortunately, only /usr/bin/../lib/clang/3.4/include exists |
Even worse, there appears to be a circular symlink loop in the /usr/lib/clang directory. I'd be very grateful for adult supervision! root@9983b8ac1abe:/usr/lib/clang# ls -al |
Where did you get your Clang 3.4.1 package from? |
From the usual apt-get repo: deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main apt-get install -y clang-3.4 llvm-3.4 |
Ah, my mistake. The links aren't circular - they're just wrong or missing. /usr/lib/clang/3.4.1 is not present /usr/lib/clang/3.4.0 is present but contains There is only /usr/lib/llvm-3.4/lib/clang/3.4 and /usr/lib/llvm-3.4/lib/clang/3.4.1, which contains the proper headers Symlinking that appears to let my build succeed. There is however, another wrinkle: /usr/lib/llvm-3.4/lib/clang/3.4/lib appears to be empty. On my "good" installation, this directory contains "linux" |
Is there an official workaround for this bug or should we just symlink until the bug is resolved? |
I've been symlinking. I haven't got any sort of official response to the bug yet. |
Can you try this patch: |
Tom, I'm not a very sophisticated user. Is there a doc I can follow about how to compile clang from source with a specified patch? |
that should be fixed now. |
Extended Description
I'm running Clang from inside a Docker instance running Ubuntu 12.04. Here's a tiny test case that shows the problem:
root@eacf7e43c75a:~# cat test.c
include_next <limits.h>
In file included from test.c:1:
/usr/include/limits.h:125:16: fatal error: 'limits.h' file not found
include_next <limits.h>
1 warning and 1 error generated.
root@eacf7e43c75a:
# clang -vexp1 (branches/release_34) (based on LLVM 3.4.1)Ubuntu clang version 3.4.1-1
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.1
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
However, I have a docker instance I built a couple months ago that's almost entirely the same, except for what I think is a version bump in clang-3.4:
(the following snippet is from the old image, which handles the test case fine)
root@7c57e7415f1d:
# clang -vexp1 (branches/release_34) (based on LLVM 3.4)Ubuntu clang version 3.4-1
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.1
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Did something change in how clang looks for include files?
The text was updated successfully, but these errors were encountered: