Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699702 - dev-libs/rocm-device-libs - prepare-builtins.cpp:(.text+0x4aa): undefined reference to `llvm::ToolOutputFile::ToolOutputFile(llvm::StringRef, std::__1::error_code&, llvm::sys::fs::OpenFlags)'
Summary: dev-libs/rocm-device-libs - prepare-builtins.cpp:(.text+0x4aa): undefined ref...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-10 00:46 UTC by Jason Chan
Modified: 2020-04-24 21:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Chan 2019-11-10 00:46:39 UTC
https://github.com/MaskRay/ccls/issues/510


>>> Preparing source in /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0 ...
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE INTERNAL "Prefix pr
 * Hardcoded definition(s) removed in utils/CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE INTERNAL "Prefix pr
>>> Source prepared.
>>> Preparing source in /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0 ...
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE INTERNAL "Prefix pr
 * Hardcoded definition(s) removed in utils/CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE INTERNAL "Prefix pr
>>> Source prepared.

-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -O2 -march=native -pipe -fstack-check
C++             -O2 -march=native -pipe -fstack-check
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed
Module          -Wl,-O1 -Wl,--as-needed
Shared          -Wl,-O1 -Wl,--as-needed

-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/rocm-device-libs-2.9.0_build
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/rocm-device-libs-2.9.0_build"
ninja -v -j12 -l0
[1/592] cd /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/rocm-device-libs-2.9.0_build/irif && /usr/lib/llvm/roc/bin/llvm-link /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0/irif/src/atomic.ll /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0/irif/src/cz.ll /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0/irif/src/fence.ll /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0/irif/src/imintrin.ll -o /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/rocm-device-libs-2.9.0_build/irif/irif.amdgcn.bc
[2/592] /usr/lib/llvm/9/bin/clang++  -I/usr/lib/llvm/roc/include -fstack-check -DNDEBUG -O2 -march=native -pipe -fstack-check -std=c++11 -fno-rtti   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -MD -MT utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o -MF utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o.d -o utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o -c /var/tmp/portage/dev-libs/rocm-device-libs-2.9.0/work/ROCm-Device-Libs-roc-ocl-2.9.0/utils/prepare-builtins/prepare-builtins.cpp
[3/592] : && /usr/lib/llvm/9/bin/clang++  -O2 -march=native -pipe -fstack-check -std=c++11 -fno-rtti  -Wl,-O1 -Wl,--as-needed    -rdynamic utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o  -o utils/prepare-builtins/prepare-builtins  -Wl,-rpath,/usr/lib/llvm/roc/lib /usr/lib/llvm/roc/lib/libLLVMSupport.so.10roc /usr/lib/llvm/roc/lib/libLLVMCore.so.10roc /usr/lib/llvm/roc/lib/libLLVMBitReader.so.10roc /usr/lib/llvm/roc/lib/libLLVMBitWriter.so.10roc && :
FAILED: utils/prepare-builtins/prepare-builtins 
: && /usr/lib/llvm/9/bin/clang++  -O2 -march=native -pipe -fstack-check -std=c++11 -fno-rtti  -Wl,-O1 -Wl,--as-needed    -rdynamic utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o  -o utils/prepare-builtins/prepare-builtins  -Wl,-rpath,/usr/lib/llvm/roc/lib /usr/lib/llvm/roc/lib/libLLVMSupport.so.10roc /usr/lib/llvm/roc/lib/libLLVMCore.so.10roc /usr/lib/llvm/roc/lib/libLLVMBitReader.so.10roc /usr/lib/llvm/roc/lib/libLLVMBitWriter.so.10roc && :
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o: in function `main':
prepare-builtins.cpp:(.text+0x4aa): undefined reference to `llvm::ToolOutputFile::ToolOutputFile(llvm::StringRef, std::__1::error_code&, llvm::sys::fs::OpenFlags)'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: prepare-builtins.cpp:(.text+0x4d1): undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::__1::array<unsigned int, 5ul>*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o: in function `llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::opt<llvm::cl::FormattingFlags, llvm::cl::desc, llvm::cl::initializer<char [2]> >(llvm::cl::FormattingFlags const&, llvm::cl::desc const&, llvm::cl::initializer<char [2]> const&)':
prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_]+0x9e): undefined reference to `vtable for llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_]+0xa5): undefined reference to `vtable for llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJNS0_15FormattingFlagsENS0_4descENS0_11initializerIA2_cEEEEEDpRKT_]+0xb0): undefined reference to `vtable for llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o: in function `llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::opt<char [2], llvm::cl::desc, llvm::cl::value_desc>(char const (&) [2], llvm::cl::desc const&, llvm::cl::value_desc const&)':
prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_]+0xa3): undefined reference to `vtable for llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_]+0xaa): undefined reference to `vtable for llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: prepare-builtins.cpp:(.text._ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_[_ZN4llvm2cl3optINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEELb0ENS0_6parserIS8_EEEC2IJA2_cNS0_4descENS0_10value_descEEEEDpRKT_]+0xb5): undefined reference to `vtable for llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >'
Comment 1 Jason Chan 2019-11-14 06:41:16 UTC
Is anyone able to reproduce this?

I am currently diagnosing whether or not this is related to its dependencies, specifically media-libs/mesa, rather than the packages themselves.

Should I close this until I can provide more information or leave it open?
Comment 2 Jason Chan 2019-11-19 00:02:14 UTC
I have a suspicion that it needs to be built with LLVM/Clang 8, rather than 9. Is changing the files in etc/env.d enough? It shouldn't be, IMO. LLD is not slotted and there is not an eselect module for clang.
Comment 3 Craig Andrews gentoo-dev 2020-04-24 21:08:22 UTC
I'm not able to reproduce this issue... fwiw, I'm using sys-devel/llvm-10.0.0 and dev-libs/rocm-device-libs-3.3.0

If someone can figure out how to reproduce this issue, please say so