Created attachment 680491 [details] build.log I figured I'd give it a run to see where things are, not expecting them to work yet. I get to stage 3 but it barfs on finding libstdc++ - similar to the issues Jacob had but hard failing instead of linking against the wrong one. I tried naively adding in pkgconf as it was trying to call out to pkg-config but that made no difference. ---- -- Found libtool - /Library/Developer/CommandLineTools/usr/bin/libtool -- Performing Test LLVM_LIBSTDCXX_MIN -- Performing Test LLVM_LIBSTDCXX_MIN - Failed CMake Error at cmake/modules/CheckCompilerVersion.cmake:97 (message): libstdc++ version must be at least 5.1. Call Stack (most recent call first): cmake/config-ix.cmake:13 (include) CMakeLists.txt:655 (include) -- Configuring incomplete, errors occurred! See also "/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm-11.0.0_build-abi_x86_64.amd64/CMakeFiles/CMakeOutput.log". See also "/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm-11.0.0_build-abi_x86_64.amd64/CMakeFiles/CMakeError.log". * ERROR: sys-devel/llvm-11.0.0::gentoo_prefix failed (configure phase): * cmake failed * * Call stack: * ebuild.sh, line 125: Called src_configure * environment, line 3980: Called multilib-minimal_src_configure * environment, line 2606: Called multilib_foreach_abi 'multilib-minimal_abi_src_configure' * environment, line 2859: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2536: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2534: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure' * environment, line 530: Called multilib-minimal_abi_src_configure * environment, line 2600: Called multilib_src_configure * environment, line 3115: Called cmake_src_configure * environment, line 1437: Called die * The specific snippet of code: * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"; * * If you need support, post the output of `emerge --info '=sys-devel/llvm-11.0.0::gentoo_prefix'`, * the complete build log and the output of `emerge -pqv '=sys-devel/llvm-11.0.0::gentoo_prefix'`. * The complete build log is located at '/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/temp/build.log'. * The ebuild environment file is located at '/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/temp/environment'. * Working directory: '/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm-11.0.0_build-abi_x86_64.amd64' * S: '/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm' ----
Created attachment 680494 [details] CMakeOutput.log
Created attachment 680497 [details] CMakeError.log
I'll try again with some of Jacob's include path guidance given to Clang and friends throughout.
This is because the llvm buildsys assumes libstdc++ is in use, while we have libc++ in use. I verified I can get past this by using the LLVM_ENABLE_LIBCXX option. Contrary to what its name suggest (ENABLE), it allows usage with libcxx, quoting: LLVM_ENABLE_LIBCXX:BOOL If the host compiler and linker supports the stdlib flag, -stdlib=libc++ is passed to invocations of both so that the project is built using libc++ instead of stdlibc++. Defaults to OFF. I suggest updating the is_libcxx_linked section as follows: @@ -381,6 +381,7 @@ multilib_src_configure() { # libraries with libstdc++ clang, and the other way around. mycmakeargs+=( -DLLVM_VERSION_SUFFIX="libcxx" + -DLLVM_ENABLE_LIBCXX=ON ) fi
Feel free to push that if it solves the problem for you.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82671ff8646c372ed9d8d6782f143b27b43ca0c8 commit 82671ff8646c372ed9d8d6782f143b27b43ca0c8 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2021-01-01 15:32:10 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2021-01-01 15:32:10 +0000 sys-devel/llvm: fix usage of libc++, bug #762898 Closes: https://bugs.gentoo.org/762898 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Fabian Groffen <grobian@gentoo.org> sys-devel/llvm/llvm-11.0.0.ebuild | 3 ++- sys-devel/llvm/llvm-11.0.1.9999.ebuild | 3 ++- sys-devel/llvm/llvm-11.0.1_rc1.ebuild | 3 ++- sys-devel/llvm/llvm-11.0.1_rc2.ebuild | 3 ++- sys-devel/llvm/llvm-12.0.0.9999.ebuild | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-)