Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935335 - dev-libs/rocm-device-libs-6.1.1 fails to compile: ld.lld: error: undefined symbol: llvm::MemoryBuffer::getFile
Summary: dev-libs/rocm-device-libs-6.1.1 fails to compile: ld.lld: error: undefined sy...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sv. Lockal
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-02 08:51 UTC by Attila Tóth
Modified: 2024-07-04 07:15 UTC (History)
4 users (show)

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


Attachments
emerge --info output (rocm-device-libs-emerge-info,6.79 KB, text/plain)
2024-07-03 20:06 UTC, Michel Ganguin
Details
emerge -pqv output (rocm-device-libs-emerge-pqv,86 bytes, text/plain)
2024-07-03 20:07 UTC, Michel Ganguin
Details
build.log (rocm-device-libs-build.log,12.85 KB, text/x-log)
2024-07-03 20:07 UTC, Michel Ganguin
Details
environment (rocm-device-libs-environment,98.43 KB, text/plain)
2024-07-03 20:07 UTC, Michel Ganguin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2024-07-02 08:51:31 UTC
While trying to upgrade rocm, from 5.7 to 6.1, rocm-device-libs fails to compile due to some llvm crap.

Reproducible: Always




* Package:    dev-libs/rocm-device-libs-6.1.1:0/6.1
 * Repository: gentoo
 * Maintainer: candrews@gentoo.org lockalsash@gmail.com
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux llvm_slot_18
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Unpacking from llvm-project-rocm-6.1.1.tar.gz ...                                                                                                                                                        [ ok ]
>>> Source unpacked in /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work
>>> Preparing source in /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build"
 * Applying rocm-device-libs-5.5.0-test-bitcode-dir.patch ...                                                                                                                                               [ ok ]
 * Applying rocm-device-libs-6.1.0-fix-llvm-link.patch ...                                                                                                                                                  [ ok ]
 * Applying rocm-device-libs-6.0.0-add-gws-attribute.patch ...
patch unexpectedly ends in middle of line                                                                                                                                                                   [ ok ]
 * Applying rocm-device-libs-6.1.0-fix-test-failures.patch ...                                                                                                                                              [ ok ]
 * Applying rocm-device-libs-6.1.0-fix-test-failures2.patch ...                                                                                                                                             [ ok ]
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *      set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE INTERNAL "Prefix
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build"
cmake -C /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_DIR=/usr/lib/llvm/18 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build/gentoo_toolchain.cmake /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs
loading initial cache file /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build/gentoo_common_config.cmake
-- The C compiler identification is Clang 18.1.8
-- The CXX compiler identification is Clang 18.1.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/llvm/18/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/llvm/18/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib64/libffi.so
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /usr/include (found version "2.11")
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib64/libtinfo.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.3.1")
-- Found zstd: /usr/lib64/libzstd.so
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.12.8")
-- Found CURL: /usr/lib64/libcurl.so (found version "8.8.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib64/libcrypto.so (found suitable version "3.2.2", minimum required is "3.0.0") found components: Crypto SSL
-- Found Brotli: /usr/include  found components: common encoder decoder
-- Found httplib: /usr/lib64/libcpp-httplib.so.0.16.0 (found version "0.16.0")
-- Linker detection: LLD
CMake Deprecation Warning at cmake/OCL.cmake:12 (cmake_policy):
  The OLD behavior for policy CMP0053 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:65 (include)


-- Running constant fold tests
device-libs CPACK_RPM_PACKAGE_RELEASE now is local
-- <<< Gentoo configuration >>>
Build type      Release
Install path    /usr
Compiler flags:
C               -O2 -march=native -pipe
C++             -O2 -march=native -pipe
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs
Module          -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs
Shared          -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs

-- Configuring done (2.2s)
-- Generating done (0.1s)
-- Build files have been written to: /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build"
ninja -v -j8 -l0
[1/668] /usr/lib/llvm/18/bin/clang++  -I/usr/lib/llvm/18/include  -O2 -march=native -pipe -std=c++17   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -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-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs/utils/prepare-builtins/prepare-builtins.cpp
[2/668] : && /usr/lib/llvm/18/bin/clang++ -O2 -march=native -pipe -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o -o utils/prepare-builtins/prepare-builtins -L/usr/lib/llvm/18/lib64 -Wl,-rpath,/usr/lib/llvm/18/lib64  /usr/lib/llvm/18/lib64/libLLVM.so.18.1 && :
FAILED: utils/prepare-builtins/prepare-builtins
: && /usr/lib/llvm/18/bin/clang++ -O2 -march=native -pipe -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o -o utils/prepare-builtins/prepare-builtins -L/usr/lib/llvm/18/lib64 -Wl,-rpath,/usr/lib/llvm/18/lib64  /usr/lib/llvm/18/lib64/libLLVM.so.18.1 && :
ld.lld: error: undefined symbol: llvm::MemoryBuffer::getFile(llvm::Twine const&, bool, bool, bool, std::__1::optional<llvm::Align>)
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(main)

ld.lld: error: undefined symbol: llvm::toString(llvm::Error)
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(main)

ld.lld: error: undefined symbol: llvm::ToolOutputFile::ToolOutputFile(llvm::StringRef, std::__1::error_code&, llvm::sys::fs::OpenFlags)
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(main)

ld.lld: error: undefined symbol: llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::__1::array<unsigned int, 5ul>*)
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(main)

ld.lld: error: undefined symbol: vtable for llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: 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>>>>
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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())
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: vtable for llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> referenced by prepare-builtins.cpp
>>>               utils/prepare-builtins/CMakeFiles/prepare-builtins.dir/prepare-builtins.cpp.o:(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&))
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
 * ERROR: dev-libs/rocm-device-libs-6.1.1::gentoo failed (compile phase):
 *   ninja -v -j8 -l0 failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 2340:  Called cmake_src_compile
 *   environment, line  917:  Called cmake_build
 *   environment, line  884:  Called eninja
 *   environment, line 1357:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=dev-libs/rocm-device-libs-6.1.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/rocm-device-libs-6.1.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs_build'
 * S: '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/work/llvm-project-rocm-6.1.1/amd/device-libs'
Comment 1 Paul Zander 2024-07-02 09:30:45 UTC
 * If you need support, post the output of `emerge --info '=dev-libs/rocm-device-libs-6.1.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/rocm-device-libs-6.1.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/rocm-device-libs-6.1.1/temp/environment'.


Please _attach_ those files.
Comment 2 Michel Ganguin 2024-07-03 20:06:44 UTC
Created attachment 896908 [details]
emerge --info output
Comment 3 Michel Ganguin 2024-07-03 20:07:11 UTC
Created attachment 896909 [details]
emerge -pqv output
Comment 4 Michel Ganguin 2024-07-03 20:07:28 UTC
Created attachment 896910 [details]
build.log
Comment 5 Michel Ganguin 2024-07-03 20:07:56 UTC
Created attachment 896911 [details]
environment
Comment 6 Michel Ganguin 2024-07-03 20:08:33 UTC
Not OP, but I have the same issue here, I uploaded build.log and co
Comment 7 Attila Tóth 2024-07-04 07:15:35 UTC
(In reply to Michel Ganguin from comment #6)
> Not OP, but I have the same issue here, I uploaded build.log and co

Thanks!