<div dir="ltr">What is the version of you linux distribution? <div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 9:21 AM, Ben Pope <span dir="ltr"><<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday, March 09, 2015 11:15 AM, Ben Pope wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've been building clang on linux for a couple of years now,<br>
contributing to the testing on Ubuntu, but this one has me stumped:<br>
<br>
fatal error: 'asm/socket.h' file not found<br>
#include <asm/socket.h><br>
</blockquote>
<br></span>
I'm still having this problem... this time on a different machine, ideas are still welcome.<br>
<br>
I can't compile with clang-3.6 or the native compiler (g++ 4.9.2), the asm directory doesn't seem to be in the include path.<br>
<br>
I have a checkout of trunk, all in source with llvm<br>
<br>
These are my commands:<br>
svn co <a href="http://llvm.org/svn/llvm-project/llvm/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/llvm/trunk</a> llvm<br>
svn co <a href="http://llvm.org/svn/llvm-project/cfe/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/cfe/trunk</a> llvm/tools/clang<br>
svn co <a href="http://llvm.org/svn/llvm-project/clang-tools-extra/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/clang-tools-extra/<u></u>trunk</a> llvm/tools/clang/tools/extra<br>
svn co <a href="http://llvm.org/svn/llvm-project/compiler-rt/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/compiler-rt/trunk</a> llvm/projects/compiler-rt<br>
svn co <a href="http://llvm.org/svn/llvm-project/lld/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/lld/trunk</a> llvm/tools/lld<br>
svn co <a href="http://llvm.org/svn/llvm-project/lldb/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/lldb/trunk</a> llvm/tools/lldb<br>
svn co <a href="http://llvm.org/svn/llvm-project/polly/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/polly/trunk</a> llvm/tools/polly<br>
svn co <a href="http://llvm.org/svn/llvm-project/libcxx/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/libcxx/trunk</a> llvm/projects/libcxx<br>
svn co <a href="http://llvm.org/svn/llvm-project/libcxxabi/trunk" target="_blank">http://llvm.org/svn/llvm-<u></u>project/libcxxabi/trunk</a> llvm/projects/libcxxabi<br>
mkdir -p build/release<br>
cd build/release<br>
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_LIBCXXABI_INCLUDE_<u></u>PATHS=../../llvm/projects/<u></u>libcxxabi/include -DLIT_EXECUTABLE=../../llvm/<u></u>utils/lit/lit.py -DLLVM_CONFIG_PATH=../../llvm/<u></u>tools.llvm-config -DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-<u></u>3.6 -DCMAKE_PREFIX_PATH=../../<u></u>install/release ../../llvm/<br>
ninja compiler-rt<br>
<br>
...<br>
/home/ben/development/llvm/<u></u>trunk/llvm/projects/compiler-<u></u>rt/lib/sanitizer_common/<u></u>sanitizer_platform_limits_<u></u>linux.cc:31:10: fatal error: 'asm/posix_types.h' file not found<br>
#include <asm/posix_types.h><br>
<br>
Does anybody have any ideas?<br>
<br>
Thanks,<br>
<br>
Ben<br>
<br>
<br>
Info:<span class=""><br>
<br>
FAILED: /usr/local/bin/clang++-3.6 -DSANITIZER_NEEDS_SEGV=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wall -std=c++11 -O3 -DNDEBUG -Iprojects/compiler-rt/lib/<u></u>sanitizer_common -I/home/ben/development/llvm/<u></u>trunk/llvm/projects/compiler-<u></u>rt/lib/sanitizer_common -Iinclude -I/home/ben/development/llvm/<u></u>trunk/llvm/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wall -std=c++11 -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-function-sections -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=512 -Wglobal-constructors -MMD -MT projects/compiler-rt/lib/<u></u>sanitizer_common/CMakeFiles/<u></u>RTSanitizerCommon.i386.dir/<u></u>sanitizer_platform_limits_<u></u>posix.cc.o -MF projects/compiler-rt/lib/<u></u>sanitizer_common/CMakeFiles/<u></u>RTSanitizerCommon.i386.dir/<u></u>sanitizer_platform_limits_<u></u>posix.cc.o.d -o projects/compiler-rt/lib/<u></u>sanitizer_common/CMakeFiles/<u></u>RTSanitizerCommon.i386.dir/<u></u>sanitizer_platform_limits_<u></u>posix.cc.o -c /home/ben/development/llvm/<u></u>trunk/llvm/projects/compiler-<u></u>rt/lib/sanitizer_common/<u></u>sanitizer_platform_limits_<u></u>posix.cc<br>
In file included from /home/ben/development/llvm/<u></u>trunk/llvm/projects/compiler-<u></u>rt/lib/sanitizer_common/<u></u>sanitizer_platform_limits_<u></u>posix.cc:31:<br>
In file included from /usr/include/arpa/inet.h:22:<br>
In file included from /usr/include/netinet/in.h:23:<br>
In file included from /usr/include/sys/socket.h:38:<br>
/usr/include/bits/socket.h:<u></u>345:10: fatal error: 'asm/socket.h' file not found<br>
<br>
<br></span>
$ clang++-3.6 -E -x c++ - -v < /dev/null<span class=""><br>
clang version 3.6.0 (tags/RELEASE_360/final)<br>
Target: x86_64-unknown-linux-gnu<br>
Thread model: posix<br></span>
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.<u></u>9<br>
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.<u></u>9.2<br>
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.<u></u>0.0<span class=""><br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9<br>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9.2<br></span>
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<u></u>5.0.0<span class=""><br>
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9<br>
Candidate multilib: .;@m64<br>
Candidate multilib: 32;@m32<br>
Candidate multilib: x32;@mx32<br>
Selected multilib: .;@m64<br>
<br></span>
"/home/ben/development/llvm/<u></u>trunk/final/Phase3/Release/<u></u>llvmCore-3.6.0-final.install/<u></u>bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.25 -v -dwarf-column-info -resource-dir /home/ben/development/llvm/<u></u>trunk/final/Phase3/Release/<u></u>llvmCore-3.6.0-final.install/<u></u>bin/../lib/clang/3.6.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/c++/4.<u></u>9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/x86_<u></u>64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/x86_<u></u>64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/c++/4.<u></u>9/backward -internal-isystem /usr/local/include -internal-isystem /home/ben/development/llvm/<u></u>trunk/final/Phase3/Release/<u></u>llvmCore-3.6.0-final.install/<u></u>bin/../lib/clang/3.6.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/ben/development/llvm/<u></u>trunk/build/release -ferror-limit 19 -fmessage-length 160 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ -<span class=""><br>
clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target x86_64-unknown-linux-gnu<br></span><span class="">
ignoring duplicate directory "/usr/lib/gcc/x86_64-linux-<u></u>gnu/4.9/../../../../include/<u></u>x86_64-linux-gnu/c++/4.9"<br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
/usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/c++/4.<u></u>9<br>
<br>
/usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/x86_<u></u>64-linux-gnu/c++/4.9<br>
/usr/lib/gcc/x86_64-linux-gnu/<u></u>4.9/../../../../include/c++/4.<u></u>9/backward<br>
/usr/local/include<br>
<br></span>
/home/ben/development/llvm/<u></u>trunk/final/Phase3/Release/<u></u>llvmCore-3.6.0-final.install/<u></u>bin/../lib/clang/3.6.0/include<br>
/usr/include/x86_64-linux-gnu<br>
/include<span class=""><br>
/usr/include<br>
End of search list.<br>
# 1 "<stdin>"<br>
# 1 "<built-in>" 1<br>
# 1 "<built-in>" 3<br>
# 320 "<built-in>" 3<br>
# 1 "<command line>" 1<br>
# 1 "<built-in>" 2<br>
# 1 "<stdin>" 2<br>
<br>
<br></span>
$ lls -alh /usr/include/x86_64-linux-gnu/<u></u>asm/socket.h<br>
-rw-r--r-- 1 root root 32 Mar 10 22:14 /usr/include/x86_64-linux-gnu/<u></u>asm/socket.h<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>