Closed Quuxplusone closed 8 years ago
Bugzilla Link | PR22661 |
Status | RESOLVED WONTFIX |
Importance | P normal |
Reported by | H.J. Lu (hjl.tools@gmail.com) |
Reported on | 2015-02-22 13:52:33 -0800 |
Last modified on | 2016-03-17 16:55:46 -0700 |
Version | unspecified |
Hardware | PC Linux |
CC | krejzi@email.com, llvm-bugs@lists.llvm.org, lordheavym@gmail.com, lvella@gmail.com, pedretti.fabio@gmail.com, vonosmas@gmail.com, whitequark@whitequark.org |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also | PR23063 |
I can reproduce this with:
CC=gcc CXX=g++ \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-shared \
--enable-libffi \
--enable-targets=all \
--disable-expensive-checks \
--disable-debug-runtime \
--disable-assertions \
--with-python=/usr/bin/python2 \
--enable-optimized
gives:
llvm[6]: ======= Finished Linking Release Unit test ClangTidy (without symbols)
make[6]: Leaving directory '/build/llvm-
svn/src/llvm/tools/clang/tools/extra/unittests/clang-tidy'
make[5]: Leaving directory '/build/llvm-
svn/src/llvm/tools/clang/tools/extra/unittests'
make[4]: Leaving directory '/build/llvm-svn/src/llvm/tools/clang/tools/extra'
make[3]: Leaving directory '/build/llvm-svn/src/llvm/tools/clang/tools'
make[3]: Entering directory '/build/llvm-svn/src/llvm/tools/clang/runtime'
make[4]: Entering directory '/build/llvm-
svn/src/llvm/tools/clang/runtime/compiler-rt'
make[4]: Entering directory '/build/llvm-
svn/src/llvm/tools/clang/runtime/libcxx'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/build/llvm-svn/src/llvm/tools/clang/runtime/libcxx'
make[5]: Entering directory '/build/llvm-svn/src/llvm/projects/compiler-rt'
make[5]: Nothing to be done for 'clang_linux'.
make[5]: Leaving directory '/build/llvm-svn/src/llvm/projects/compiler-rt'
llvm[4]: Copying runtime library linux/profile-i386 to build dir
llvm[4]: Copying runtime library linux/builtins-i386 to build dir
cp: cannot stat '/build/llvm-svn/src/llvm/tools/clang/runtime/compiler-
rt/clang_linux/builtins-i386/libcompiler_rt.a': No such file or directory
cp: cannot stat '/build/llvm-svn/src/llvm/tools/clang/runtime/compiler-
rt/clang_linux/profile-i386/libcompiler_rt.a': No such file or directory
Makefile:235: recipe for target '/build/llvm-
svn/src/llvm/Release/lib/clang/3.7.0/lib/linux/libclang_rt.builtins-i386.a'
failed
make[4]: *** [/build/llvm-
svn/src/llvm/Release/lib/clang/3.7.0/lib/linux/libclang_rt.builtins-i386.a]
Error 1
make[4]: *** Waiting for unfinished jobs....
Makefile:235: recipe for target '/build/llvm-
svn/src/llvm/Release/lib/clang/3.7.0/lib/linux/libclang_rt.profile-i386.a'
failed
make[4]: *** [/build/llvm-
svn/src/llvm/Release/lib/clang/3.7.0/lib/linux/libclang_rt.profile-i386.a]
Error 1
rm /build/llvm-svn/src/llvm/Release/lib/clang/3.7.0/lib/linux/.dir
make[4]: Leaving directory '/build/llvm-
svn/src/llvm/tools/clang/runtime/compiler-rt'
/build/llvm-svn/src/llvm/Makefile.rules:932: recipe for target 'compiler-
rt/.makeall' failed
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory '/build/llvm-svn/src/llvm/tools/clang/runtime'
/build/llvm-svn/src/llvm/Makefile.rules:883: recipe for target 'all' failed
make[2]: *** [all] Error 1
make[2]: Leaving directory '/build/llvm-svn/src/llvm/tools/clang'
/build/llvm-svn/src/llvm/Makefile.rules:932: recipe for target 'clang/.makeall'
failed
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory '/build/llvm-svn/src/llvm/tools'
/build/llvm-svn/src/llvm/Makefile.rules:883: recipe for target 'all' failed
make: *** [all] Error 1
autoconf/makefile build system for compiler-rt on Linux is barely supported and
will hopefully soon be deprecated. I'd rather not touch it now,
but can review the patches if necessary. Can you use CMake?
Test.
I fail currently to build llvm and compiler-rt with cmake:
cmake ../llvm -DLLVM_BINARY_DIR=/usr \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_TARGETS_TO_BUILD="all" \
-DCMAKE_BUILD_TYPE="release" \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_INCLUDE_DOCS=OFF
gives and error with ocaml:
Linking CXX shared library ../../../libLLVMARMDisassembler.so
[ 38%] Built target LLVMARMDisassembler
Scanning dependencies of target LLVMPowerPCAsmParser
[ 38%] Building CXX object
lib/Target/PowerPC/AsmParser/CMakeFiles/LLVMPowerPCAsmParser.dir/PPCAsmParser.cpp.o
Linking CXX shared library ../../../libLLVMAArch64Desc.so
[ 38%] Built target LLVMAArch64Desc
Scanning dependencies of target LLVMR600AsmParser
[ 38%] Building CXX object
lib/Target/R600/AsmParser/CMakeFiles/LLVMR600AsmParser.dir/AMDGPUAsmParser.cpp.o
Linking CXX shared library ../../../libLLVMARMAsmParser.so
[ 38%] Built target LLVMARMAsmParser
Scanning dependencies of target LLVMSparcAsmParser
[ 38%] Building CXX object
lib/Target/Sparc/AsmParser/CMakeFiles/LLVMSparcAsmParser.dir/SparcAsmParser.cpp.o
Linking CXX shared library ../../../libLLVMMipsAsmParser.so
[ 38%] Built target LLVMMipsAsmParser
Scanning dependencies of target LLVMSystemZAsmParser
[ 38%] Building CXX object
lib/Target/SystemZ/AsmParser/CMakeFiles/LLVMSystemZAsmParser.dir/SystemZAsmParser.cpp.o
Linking CXX shared library ../../../libLLVMR600AsmParser.so
[ 38%] Built target LLVMR600AsmParser
Scanning dependencies of target LLVMSystemZDisassembler
[ 38%] Building CXX object
lib/Target/SystemZ/Disassembler/CMakeFiles/LLVMSystemZDisassembler.dir/SystemZDisassembler.cpp.o
Linking CXX shared library ../../../libLLVMPowerPCAsmParser.so
Linking CXX shared library ../../../libLLVMSparcAsmParser.so
[ 38%] Built target LLVMPowerPCAsmParser
Scanning dependencies of target LLVMX86Utils
[ 38%] Building CXX object
lib/Target/X86/Utils/CMakeFiles/LLVMX86Utils.dir/X86ShuffleDecode.cpp.o
[ 38%] Built target LLVMSparcAsmParser
Scanning dependencies of target ocaml_llvm
[ 38%] Copying llvm_ocaml.c to build area
[ 38%] Copying llvm.mli to build area
[ 38%] Copying llvm.ml to build area
[ 38%] Building OCaml stub object file llvm_ocaml.o
[ 38%] Building OCaml documentation for llvm
File "/build/llvm-svn/src/build/bindings/ocaml/llvm/llvm.ml", line 1:
Error: Could not find the .cmi file for interface
/build/llvm-svn/src/build/bindings/ocaml/llvm/llvm.mli.
1 error(s) encountered
bindings/ocaml/llvm/CMakeFiles/ocaml_llvm.dir/build.make:84: recipe for target
'bindings/ocaml/llvm/llvm.odoc' failed
make[2]: *** [bindings/ocaml/llvm/llvm.odoc] Error 1
CMakeFiles/Makefile2:10678: recipe for target
'bindings/ocaml/llvm/CMakeFiles/ocaml_llvm.dir/all' failed
make[1]: *** [bindings/ocaml/llvm/CMakeFiles/ocaml_llvm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX shared library ../../../libLLVMSystemZAsmParser.so
[ 38%] Built target LLVMSystemZAsmParser
Linking CXX shared library ../../../libLLVMSystemZDisassembler.so
Linking CXX shared library ../../../libLLVMX86Utils.so
[ 38%] Built target LLVMSystemZDisassembler
[ 38%] Built target LLVMX86Utils
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
+Peter for OCaml problem.
The following works for me as a workaround (from llvm source tree):
sed -ri "/ifeq.*CompilerTargetArch/s#i386#i686#g" projects/compiler-
rt/make/platform/clang_linux.mk
Ubuntu 15.10 was released with 'llvm-3.6' package on i386 and amd64, but 'llvm-3.7' was released only on amd64, due to this bug.
Looks like this bug is about Makefile build system in compiler-rt, which was entirely removed recently. CMake should have support for building on i686. Closing.