Summary: | llvm-core/clang-14.0.6-r1: relocation R_X86_64_TPOFF32 against `_ZL13BottomOfStack' can not be used when making a shared object; recompile with -fPIC | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stijn Tintel <stijn+gentoo> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Stijn Tintel
2023-02-06 11:57:04 UTC
Created attachment 849976 [details]
build.log
The error suggests recompiling with -fPIC but the build log suggests this is unsupported: -- Linker detection: GNU ld -- Performing Test C_SUPPORTS_FPIC -- Performing Test C_SUPPORTS_FPIC - Failed -- Performing Test CXX_SUPPORTS_FPIC -- Performing Test CXX_SUPPORTS_FPIC - Failed CMake Warning at /usr/lib/llvm/14/lib/cmake/llvm/HandleLLVMOptions.cmake:276 (message): -fPIC is not supported. FWIW, same version built fine half a year ago: 2022-08-09T18:32:40 >>> sys-devel/clang-14.0.6-r1: 26 minutes, 38 seconds At that time, it was built using sys-devel/gcc-11.3.0. I've tried with gcc:11 (11.3.1_p20230120-r1), but this causes other problems: /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/llvm/14/lib/libLLVMSupport.a(CommandLine.cpp.o): in function `llvm::E rror llvm::handleErrorImpl<llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}>(std::unique_ptr<llvm::ErrorInfoBase, std::default_dele te<llvm::ErrorInfoBase> >, llvm::consumeError(llvm::Error)::{lambda(llvm::ErrorInfoBase const&)#1}&&) [clone .isra.0]': CommandLine.cpp:(.text._ZN4llvm15handleErrorImplIZNS_12consumeErrorENS_5ErrorEEUlRKNS_13ErrorInfoBaseEE_JEEES1_St10unique_ptrIS2_St14default_deleteIS2_EEO T_DpOT0_.isra.0+0x8d): undefined reference to `std::__glibcxx_assert_fail(char const*, int, char const*, char const*)' /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/llvm/14/lib/libLLVMSupport.a(CommandLine.cpp.o): in function `ExpandR esponseFile(llvm::StringRef, llvm::StringSaver&, void (*)(llvm::StringRef, llvm::StringSaver&, llvm::SmallVectorImpl<char const*>&, bool), llvm::SmallVect orImpl<char const*>&, bool, bool, bool, llvm::vfs::FileSystem&)': CommandLine.cpp:(.text._ZL18ExpandResponseFileN4llvm9StringRefERNS_11StringSaverEPFvS0_S2_RNS_15SmallVectorImplIPKcEEbES7_bbbRNS_3vfs10FileSystemE+0x8a9): undefined reference to `std::__glibcxx_assert_fail(char const*, int, char const*, char const*)' /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/llvm/14/lib/libLLVMSupport.a(CommandLine.cpp.o): in function `llvm::E rrorList::join(llvm::Error, llvm::Error)': CommandLine.cpp:(.text._ZN4llvm9ErrorList4joinENS_5ErrorES1_[_ZN4llvm9ErrorList4joinENS_5ErrorES1_]+0x3ae): undefined reference to `std::__glibcxx_assert_ fail(char const*, int, char const*, char const*)' /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/llvm/14/lib/libLLVMSupport.a(ConvertUTFWrapper.cpp.o): in function `l lvm::convertUTF16ToUTF8String(llvm::ArrayRef<char>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) [clone .localalias]' : ConvertUTFWrapper.cpp:(.text._ZN4llvm24convertUTF16ToUTF8StringENS_8ArrayRefIcEERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x24d): undefined re ference to `std::__glibcxx_assert_fail(char const*, int, char const*, char const*)' /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: ConvertUTFWrapper.cpp:(.text._ZN4llvm24convertUTF16ToUTF8StringENS_8ArrayRefIc EERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x275): undefined reference to `std::__glibcxx_assert_fail(char const*, int, char const*, char con st*)' /usr/lib/gcc/x86_64-pc-linux-gnu/11/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/llvm/14/lib/libLLVMSupport.a(DebugCounter.cpp.o):DebugCounter.cpp:(.t ext._ZNK12_GLOBAL__N_116DebugCounterList15printOptionInfoEj+0x5a1): more undefined references to `std::__glibcxx_assert_fail(char const*, int, char const* , char const*)' follow collect2: error: ld returned 1 exit status Adding this to /etc/portage/env/sys-devel/clang does fix it: CFLAGS="${CFLAGS} -fPIC" CXXFLAGS="${CFLAGS} -fPIC" The question is: why is this needed all of a sudden? |