[LLVMdev] Build failure with compiler-rt on trunk under linux
Ben Pope
benpope81 at gmail.com
Sun Mar 8 20:15:08 PDT 2015
I've been building clang on linux for a couple of years now,
contributing to the testing on Ubuntu, but this one has me stumped:
fatal error: 'asm/socket.h' file not found
#include <asm/socket.h>
[1556/4006] Building CXX object
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o
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/sanitizer_common
-I/home/ben/development/llvm/trunk/llvm/projects/compiler-rt/lib/sanitizer_common
-Iinclude -I/home/ben/development/llvm/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/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o
-MF
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o.d
-o
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o
-c
/home/ben/development/llvm/trunk/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
In file included from
/home/ben/development/llvm/trunk/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:31:
In file included from /usr/include/arpa/inet.h:22:
In file included from /usr/include/netinet/in.h:23:
In file included from /usr/include/sys/socket.h:38:
/usr/include/bits/socket.h:345:10: fatal error: 'asm/socket.h' file not
found
#include <asm/socket.h>
clang++-3.6 -E -x c++ - -v < /dev/null
clang version 3.6.0 (tags/RELEASE_360/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
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.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
"/home/ben/opt/chroots/default-ubuntu-14.04/home/development/llvm/3.6.0/final/Phase3/Release/llvmCore-3.6.0-final.install/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.24 -v -dwarf-column-info -resource-dir
/home/ben/opt/chroots/default-ubuntu-14.04/home/development/llvm/3.6.0/final/Phase3/Release/llvmCore-3.6.0-final.install/bin/../lib/clang/3.6.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward
-internal-isystem /usr/local/include -internal-isystem
/home/ben/opt/chroots/default-ubuntu-14.04/home/development/llvm/3.6.0/final/Phase3/Release/llvmCore-3.6.0-final.install/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/trunk/build/release -ferror-limit 19
-fmessage-length 192 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -o - -x c++ -
clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
ignoring duplicate directory
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward
/usr/local/include
/home/ben/opt/chroots/default-ubuntu-14.04/home/development/llvm/3.6.0/final/Phase3/Release/llvmCore-3.6.0-final.install/bin/../lib/clang/3.6.0/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 320 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
ls -alh /usr/include/x86_64-linux-gnu/asm/socket.h
-rw-r--r-- 1 root root 32 Mar 3 03:16
/usr/include/x86_64-linux-gnu/asm/socket.h
This is my configure line: cmake -GNinja -DCMAKE_C_COMPILER=clang-3.6
-DCMAKE_CXX_COMPILER=clang++-3.6 -DCMAKE_BUILD_TYPE=Release
-DLIBCXX_CXX_ABI=libcxxabi
-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=../../llvm/projects/libcxxabi/include
-DLIT_EXECUTABLE=../../llvm/utils/lit/lit.py ../../llvm/
This has only been a problem with trunk since a little after it was
switched to 3.7.
Thanks in advance for any ideas.
Ben
More information about the llvm-dev
mailing list