Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 888877

Summary: dev-util/cmake-3.24.3::gentoo failed (configure phase)
Product: Gentoo Linux Reporter: Jean-Claude Aciman <jcl.aciman>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: info
environment
build.log

Description Jean-Claude Aciman 2022-12-29 15:08:47 UTC
Created attachment 845662 [details]
info

* Package:    dev-util/cmake-3.24.3:0
 * Repository: gentoo
 * Maintainer: base-system@gentoo.org kde@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux ncurses userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build"
 * Applying cmake-3.16.0_rc4-darwin-bundle.patch ...
patching file Modules/Platform/Darwin.cmake
Hunk #1 succeeded at 44 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 66 (offset -1 lines).
 [ ok ]
 * Applying cmake-3.14.0_rc3-prefix-dirs.patch ...
patching file Modules/Platform/Darwin.cmake
Hunk #1 succeeded at 135 with fuzz 2 (offset 19 lines).
Hunk #2 succeeded at 159 (offset 19 lines).
Hunk #3 succeeded at 219 (offset 30 lines).
patching file Modules/Platform/UnixPaths.cmake
Hunk #1 succeeded at 27 with fuzz 1 (offset 4 lines).
Hunk #2 succeeded at 56 (offset 5 lines).
Hunk #3 succeeded at 95 (offset 5 lines).
 [ ok ]
 * Applying cmake-3.19.1-darwin-gcc.patch ...
patching file Source/cmMachO.h
Hunk #1 succeeded at 7 with fuzz 2 (offset 1 line).
 [ ok ]
 * Applying cmake-3.17.0_rc1-FindBLAS.patch ...
patching file Modules/FindBLAS.cmake
Hunk #1 succeeded at 7 with fuzz 2.
Hunk #2 succeeded at 269 with fuzz 2 (offset 158 lines).
 [ ok ]
 * Applying cmake-3.5.2-FindQt4.patch ...
 [ ok ]
 * Applying cmake-2.8.10.2-FindPythonLibs.patch ...
patching file Modules/FindPythonLibs.cmake
Hunk #1 succeeded at 117 with fuzz 2 (offset 43 lines).
 [ ok ]
 * Applying cmake-3.9.0_rc2-FindPythonInterp.patch ...
 [ ok ]
 * Applying cmake-3.18.0-filter_distcc_warning.patch ...
 [ ok ]
removed './Tests/RunCMake/INSTALL_NAME_DIR/none.cmake'
 * Hardcoded definition(s) removed in CMakeLists.txt:
 *          set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
 * Hardcoded definition(s) removed in Tests/CompileOptions/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
 * Hardcoded definition(s) removed in Tests/SwiftOnly/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build" FORCE)
 * Hardcoded definition(s) removed in Tests/CMakeCommands/target_compile_features/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE ON)
 * Hardcoded definition(s) removed in Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/CMakeOnly/SelectLibraryConfigurations/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Debug)
 * Hardcoded definition(s) removed in Tests/SubDirSpaces/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/Assembler/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/RunCMake/CPack/CMakeLists.txt:
 *  set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "")
 * Hardcoded definition(s) removed in Tests/JavaExportImport/InstallExport/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/JavaExportImport/Import/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/JavaExportImport/BuildExport/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/SetLang/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/Java/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/JavaNativeHeaders/Import/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/JavaNativeHeaders/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/ConfigSources/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE)
 * Hardcoded definition(s) removed in Tests/Fortran/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/CPackComponents/CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX "/opt/mylib")
 * Hardcoded definition(s) removed in Tests/Qt4Deploy/CMakeLists.txt:
 *  set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install)
 * Hardcoded definition(s) removed in Tests/JavaJavah/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE 1)
 * Hardcoded definition(s) removed in Tests/OutDir/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE)
 *    set(CMAKE_BUILD_TYPE Debug)
 * Hardcoded definition(s) removed in Tests/FindPackageTest/CMakeLists.txt:
 *  set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/NotDefaultPrefix")
 * Hardcoded definition(s) removed in Tests/QtAutogen/UicInterface/CMakeLists.txt:
 *  set(CMAKE_VERBOSE_MAKEFILE ON)
 * Hardcoded definition(s) removed in Utilities/cmlibarchive/CMakeLists.txt:
 *    SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
 *    SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build Type" FORCE)
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build"
cmake -C /var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMAKE_DOC_DIR=/share/doc/cmake-3.24.3 -DCMAKE_MAN_DIR=/share/man -DCMAKE_DATA_DIR=/share/cmake -DSPHINX_MAN=no -DSPHINX_HTML=no -DBUILD_CursesDialog=yes -DBUILD_TESTING=no -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build/gentoo_toolchain.cmake /var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3
loading initial cache file /var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build/gentoo_common_config.cmake
cmake: symbol lookup error: cmake: undefined symbol: _ZN4Json17CharReaderBuilderixERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
 * ERROR: dev-util/cmake-3.24.3::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 2487:  Called cmake_src_configure
 *   environment, line 1180:  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 '=dev-util/cmake-3.24.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/cmake-3.24.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-util/cmake-3.24.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/cmake-3.24.3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3_build'
 * S: '/var/tmp/portage/dev-util/cmake-3.24.3/work/cmake-3.24.3'


[ebuild   R   ] dev-util/cmake-3.24.3  USE="ncurses -doc -emacs -qt5 -test -verify-sig"
Comment 1 Jean-Claude Aciman 2022-12-29 15:09:48 UTC
Created attachment 845663 [details]
environment
Comment 2 Mike Gilbert gentoo-dev 2022-12-30 03:54:22 UTC
Please attach the build log instead of pasting it in a comment where it may be mangled by bugzilla.
Comment 3 Jean-Claude Aciman 2022-12-30 13:57:35 UTC
Created attachment 845926 [details]
build.log
Comment 4 Jean-Claude Aciman 2022-12-30 13:58:20 UTC
(In reply to Mike Gilbert from comment #2)
> Please attach the build log instead of pasting it in a comment where it may
> be mangled by bugzilla.

Gone. Thank you for your help.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-31 15:54:14 UTC
>LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"

My guess is you at some point built some of your system with libcxx? It's not ABI compatible with libstdc++.

You would then need to rebuild cmake against the same standard C++ library you used to build dev-libs/jsoncpp. But you shouldn't mix the two on your system anyway.
Comment 6 Jean-Claude Aciman 2022-12-31 16:19:03 UTC
(In reply to Sam James from comment #5)
> >LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
> 
> My guess is you at some point built some of your system with libcxx? It's
> not ABI compatible with libstdc++.
> 
> You would then need to rebuild cmake against the same standard C++ library
> you used to build dev-libs/jsoncpp. But you shouldn't mix the two on your
> system anyway.

I did build a new system using the profile plasma/systemd/merge_usr and did not any change to the libraries used except doing an emerge -qavuDN @world after updating my make.conf and trying to emerge all is needed for plasma. This problem occurred  during an emerge-qv @preserved-rebuild.

How can I know which library is used by a build?
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-31 16:22:56 UTC
(In reply to Jean-Claude Aciman from comment #6)
> (In reply to Sam James from comment #5)
> > >LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
> > 
> > My guess is you at some point built some of your system with libcxx? It's
> > not ABI compatible with libstdc++.
> > 
> > You would then need to rebuild cmake against the same standard C++ library
> > you used to build dev-libs/jsoncpp. But you shouldn't mix the two on your
> > system anyway.
> 
> I did build a new system using the profile plasma/systemd/merge_usr and did
> not any change to the libraries used except doing an emerge -qavuDN @world
> after updating my make.conf and trying to emerge all is needed for plasma.
> This problem occurred  during an emerge-qv @preserved-rebuild.
> 
> How can I know which library is used by a build?

You would know if you'd set -stdlib=... at some point. Did you? If you do change it, you have to do -e for a full rebuild.

This kind of issue may also happen if you build part of your system with a newer GCC and then downgrade.

To fix your particular issue, please try emerge -v1 dev-libs/jsoncpp. You may need to then rebuild more after (-e preferred, or you can do: revdep-rebuild --library 'libstdc++.so.6' --library 'libcxx.so' -- --exclude gcc or so.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-31 16:23:17 UTC
(In reply to Sam James from comment #7)
> (In reply to Jean-Claude Aciman from comment #6)
> > (In reply to Sam James from comment #5)
> > > >LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
> > > 
> > > My guess is you at some point built some of your system with libcxx? It's
> > > not ABI compatible with libstdc++.
> > > 
> > > You would then need to rebuild cmake against the same standard C++ library
> > > you used to build dev-libs/jsoncpp. But you shouldn't mix the two on your
> > > system anyway.
> > 
> > I did build a new system using the profile plasma/systemd/merge_usr and did
> > not any change to the libraries used except doing an emerge -qavuDN @world
> > after updating my make.conf and trying to emerge all is needed for plasma.
> > This problem occurred  during an emerge-qv @preserved-rebuild.
> > 
> > How can I know which library is used by a build?
> 
> You would know if you'd set -stdlib=... at some point. Did you? If you do
> change it, you have to do -e for a full rebuild.

It could also happen if you started with a LLVM stage3 and moved away from LLVM profiles.
Comment 9 Jean-Claude Aciman 2022-12-31 16:37:09 UTC
(In reply to Sam James from comment #8)
> (In reply to Sam James from comment #7)
> > (In reply to Jean-Claude Aciman from comment #6)
> > > (In reply to Sam James from comment #5)
> > > > >LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
> > > > 
> > > > My guess is you at some point built some of your system with libcxx? It's
> > > > not ABI compatible with libstdc++.
> > > > 
> > > > You would then need to rebuild cmake against the same standard C++ library
> > > > you used to build dev-libs/jsoncpp. But you shouldn't mix the two on your
> > > > system anyway.
> > > 
> > > I did build a new system using the profile plasma/systemd/merge_usr and did
> > > not any change to the libraries used except doing an emerge -qavuDN @world
> > > after updating my make.conf and trying to emerge all is needed for plasma.
> > > This problem occurred  during an emerge-qv @preserved-rebuild.
> > > 
> > > How can I know which library is used by a build?
> > 
> > You would know if you'd set -stdlib=... at some point. Did you? If you do
> > change it, you have to do -e for a full rebuild.
> 
> It could also happen if you started with a LLVM stage3 and moved away from
> LLVM profiles.

I think that this one is the point. Thank you for your help. I will let you informed of the success (or not) of the revdep-rebuild as it checked 442 packages. Give my system some time to process this all (will finish in 2023).
Have a nice evening, and Happy New Year.
Comment 10 Jean-Claude Aciman 2023-01-13 13:58:29 UTC
Hi,
The revdep-rebuild failed (generated the same error on some of the rebuild).
I did reinstall the full system not choosing a LLVM stage3 tarball and all is now ok.
Thank you.