[lldb-dev] [Bug 37074] New: Can't build libLLVMSupport.a on ARM CPU
via lldb-dev
lldb-dev at lists.llvm.org
Tue Apr 10 09:24:07 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37074
Bug ID: 37074
Summary: Can't build libLLVMSupport.a on ARM CPU
Product: lldb
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: shiftag at nanotek.info
CC: llvm-bugs at lists.llvm.org
Hi,
I have the following issue build LLVM 6.0 natively on ARM and I think its
related to lldb :
---
Scanning dependencies of target lldbUtilityHelpers
[ 70%] Building CXX object
tools/lldb/unittests/TestingSupport/CMakeFiles/lldbUtilityHelpers.dir/MockTildeExpressionResolver.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Target/CMakeFiles/lldbTarget.dir/ObjCLanguageRuntime.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Plugins/SymbolFile/DWARF/CMakeFiles/lldbPluginSymbolFileDWARF.dir/SymbolFileDWARFDebugMap.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Symbol/CMakeFiles/lldbSymbol.dir/CompactUnwindInfo.cpp.o
[ 70%] Building CXX object
tools/lldb/unittests/TestingSupport/CMakeFiles/lldbUtilityHelpers.dir/TestUtilities.cpp.o
[ 70%] Linking CXX static library ../../../../lib/liblldbUtilityHelpers.a
[ 70%] Built target lldbUtilityHelpers
Scanning dependencies of target lli-child-target
[ 70%] Building CXX object
tools/lli/ChildTarget/CMakeFiles/lli-child-target.dir/ChildTarget.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Symbol/CMakeFiles/lldbSymbol.dir/DebugMacros.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Plugins/SymbolFile/DWARF/CMakeFiles/lldbPluginSymbolFileDWARF.dir/UniqueDWARFASTType.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Symbol/CMakeFiles/lldbSymbol.dir/Declaration.cpp.o
[ 70%] Building CXX object
tools/lldb/source/Symbol/CMakeFiles/lldbSymbol.dir/DWARFCallFrameInfo.cpp.o
[ 70%] Linking CXX static library
../../../../../../lib/liblldbPluginSymbolFileDWARF.a
[ 70%] Built target lldbPluginSymbolFileDWARF
Scanning dependencies of target LLVM
[ 70%] Building CXX object tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o
[ 70%] Linking CXX shared library ../../lib/libLLVM-6.0.so
[ 70%] Building CXX object
tools/lldb/source/Target/CMakeFiles/lldbTarget.dir/OperatingSystem.cpp.o
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::__future_base::_Result<void>::~_Result(): error: undefined reference to
'std::__future_base::_Result_base::~_Result_base()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::__future_base::_Result<void>::~_Result(): error: undefined reference to
'std::__future_base::_Result_base::~_Result_base()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>,
void ()>::_M_run(): error: undefined reference to
'std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>,
void ()>::_M_run_delayed(std::weak_ptr<std::__future_base::_State_baseV2>):
error: undefined reference to
'std::__future_base::_State_baseV2::_Make_ready::_M_set()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>,
void ()>::_M_reset(): error: undefined reference to
'std::__future_base::_Result_base::_Result_base()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::~exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::~exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::~exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::~exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
std::thread::_Impl<std::_Bind_simple<llvm::ThreadPool::ThreadPool(unsigned
int)::{lambda()#1} ()> >::_M_run(): error: undefined reference to
'std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
llvm::ThreadPool::~ThreadPool(): error: undefined reference to
'std::__exception_ptr::exception_ptr::exception_ptr()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
llvm::ThreadPool::~ThreadPool(): error: undefined reference to
'std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:function
llvm::ThreadPool::asyncImpl(std::function<void ()>): error: undefined reference
to 'std::__future_base::_Result_base::_Result_base()'
../../lib/libLLVMSupport.a(ThreadPool.cpp.o):ThreadPool.cpp:typeinfo for
std::__future_base::_Result<void>: error: undefined reference to 'typeinfo for
std::__future_base::_Result_base'
collect2: error: ld returned 1 exit status
tools/llvm-shlib/CMakeFiles/LLVM.dir/build.make:175: recipe for target
'lib/libLLVM-6.0.so' failed
make[2]: *** [lib/libLLVM-6.0.so] Error 1
CMakeFiles/Makefile2:82420: recipe for target
'tools/llvm-shlib/CMakeFiles/LLVM.dir/all' failed
make[1]: *** [tools/llvm-shlib/CMakeFiles/LLVM.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
---
I'm using the following GCC version :
---
$ gcc -v
Reading specs from /usr/lib/gcc/arm-slackware-linux-gnueabi/5.5.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-slackware-linux-gnueabi/5.5.0/lto-wrapper
Target: arm-slackware-linux-gnueabi
Configured with: ../gcc-5.5.0/configure --prefix=/usr --mandir=/usr/man
--infodir=/usr/info --libdir=/usr/lib --enable-bootstrap
--enable-checking=release --with-system-zlib --disable-libunwind-exceptions
--with-python-dir=/lib/python2.7/site-packages --enable-libstdcxx-dual-abi
--with-default-libstdcxx-abi=gcc4-compatible --enable-shared
--enable-languages=c,c++,fortran,go,java,objc,lto --enable-objc-gc
--enable-threads=posix --enable-__cxa_atexit --enable-libssp --enable-lto
--with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib/jvm/jre
--with-jvm-root-dir=/usr/lib/jvm --with-jvm-jar-dir=/usr/lib/jvm/jvm-exports
--with-arch-directory=
--with-antlr-jar=/root/slackware64-14.2/patches/source/gcc/antlr-runtime-3.4.jar
--enable-java-awt=gtk --disable-gtktest --disable-install-libiberty
--host=arm-slackware-linux-gnueabi --build=arm-slackware-linux-gnueabi
--target=arm-slackware-linux-gnueabi
Thread model: posix
gcc version 5.5.0 (GCC)
---
Also, I'm compiling with the following command-line :
cmake -G "Unix Makefiles" .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS=-march=armv7-a \
-DCMAKE_CXX_FLAGS=-march=armv7-a \
-DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-DLLVM_TARGETS_TO_BUILD="ARM;X86;AArch64;AMDGPU;Mips;PowerPC" \
-DLLVM_ENABLE_LIBCXX=ON \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_ASSERTIONS=True \
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \
-DCOMPILER_RT_BUILD_BUILTINS=OFF \
-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
-DCOMPILER_RT_BUILD_XRAY=OFF \
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
-DCOMPILER_RT_BUILD_PROFILE=OFF
And precisely, I'm using the following CPU :
ARMv7l Cortex-A9 Soft-Float FPU NEON
Do you have an idea of how to fix this ?
Cheers
PS: Please let me know if you need further details.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180410/a4b32166/attachment.html>
More information about the lldb-dev
mailing list