After [bug #915902](https://bugs.gentoo.org/show_bug.cgi?id=915902), the ABSL_BUILD_TEST_HELPERS=ON is always set. This change is introduced because protobuf's test (and seems itself?) needs this flag. The DEPEND of protobuf had been changed to `dev-cpp/abseil-cpp[${MULTILIB_USEDEP},test?]` and then the `test?` was removed for some reason. However, this change causes a hard rely on gtest. Gtest should be added into abseil's DEPEND. Reproducible: Always Steps to Reproduce: emerge abseil without gtest installed Actual Results: * Package: dev-cpp/abseil-cpp-20230802.0-r1:0/20230802 * Repository: gentoo * USE: abi_x86_64 amd64 elibc_glibc kernel_linux * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox * Checking whether python3_12 is suitable ... * dev-lang/python:3.12 ... [ ok ] * Using python3.12 to build (via PYTHON_COMPAT iteration) >>> Unpacking source... >>> Unpacking abseil-cpp-20230802.0.tar.gz to /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work >>> Source unpacked in /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work >>> Preparing source in /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0 ... * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0" * Build directory (BUILD_DIR): "/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build" * Applying abseil-cpp-20230802.0-sdata-tests.patch ... [ ok ] * Fixing shebang in absl/copts/generate_copts.py. >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0 ... * abi_x86_64.amd64: running multilib-minimal_abi_src_configure * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0" * Build directory (BUILD_DIR): "/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64" cmake -C /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_STANDARD=14 -DABSL_ENABLE_INSTALL=TRUE -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_PROPAGATE_CXX_STD=TRUE -DABSL_BUILD_TEST_HELPERS=ON -DABSL_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64/gentoo_toolchain.cmake /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0 loading initial cache file /var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64/gentoo_common_config.cmake -- The CXX compiler identification is GNU 14.1.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 -- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Failed -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGTest.cmake:270 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:150 (find_package) -- Configuring incomplete, errors occurred! * ERROR: dev-cpp/abseil-cpp-20230802.0-r1::gentoo failed (configure phase): * cmake failed * * Call stack: * ebuild.sh, line 136: Called src_configure * environment, line 3440: Called cmake-multilib_src_configure * environment, line 1201: Called multilib-minimal_src_configure * environment, line 2394: Called multilib_foreach_abi 'multilib-minimal_abi_src_configure' * environment, line 2644: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2349: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2347: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure' * environment, line 541: Called multilib-minimal_abi_src_configure * environment, line 2388: Called multilib_src_configure * environment, line 2869: Called cmake_src_configure * environment, line 1471: 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-cpp/abseil-cpp-20230802.0-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-cpp/abseil-cpp-20230802.0-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64' * S: '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0' * Messages for package dev-cpp/abseil-cpp-20230802.0-r1: * ERROR: dev-cpp/abseil-cpp-20230802.0-r1::gentoo failed (configure phase): * cmake failed * * Call stack: * ebuild.sh, line 136: Called src_configure * environment, line 3440: Called cmake-multilib_src_configure * environment, line 1201: Called multilib-minimal_src_configure * environment, line 2394: Called multilib_foreach_abi 'multilib-minimal_abi_src_configure' * environment, line 2644: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2349: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure' * environment, line 2347: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure' * environment, line 541: Called multilib-minimal_abi_src_configure * environment, line 2388: Called multilib_src_configure * environment, line 2869: Called cmake_src_configure * environment, line 1471: 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-cpp/abseil-cpp-20230802.0-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-cpp/abseil-cpp-20230802.0-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0_build-abi_x86_64.amd64' * S: '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/work/abseil-cpp-20230802.0' * * The following package has failed to build, install, or execute postinst: * * (dev-cpp/abseil-cpp-20230802.0-r1:0/20230802::gentoo, ebuild scheduled for merge), Log file: * '/var/tmp/portage/dev-cpp/abseil-cpp-20230802.0-r1/temp/build.log' *
Ah, oops. Thanks.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=812ed0dc593a40ad402f7091f31938d389a67803 commit 812ed0dc593a40ad402f7091f31938d389a67803 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-13 02:53:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-13 02:57:11 +0000 dev-cpp/abseil-cpp: unconditionally depend on gtest This is unfortunate but it's needed given abseil-cpp needs it for some of the libraries it installs. An alternative would be to control the helpers with USE=testlib or something, I guess. Fixes: 53bb853b51f0ccdacba1714a9405e23fbdd96ce2 Bug: https://bugs.gentoo.org/915902 Closes: https://bugs.gentoo.org/934175 Signed-off-by: Sam James <sam@gentoo.org> ...eil-cpp-20230125.3-r2.ebuild => abseil-cpp-20230125.3-r3.ebuild} | 6 ++---- ...eil-cpp-20230802.0-r1.ebuild => abseil-cpp-20230802.0-r2.ebuild} | 6 ++---- ...eil-cpp-20240116.2-r1.ebuild => abseil-cpp-20240116.2-r2.ebuild} | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-)
For the benefit of future maintainers who hopefully will adopt abseil-cpp: I'm not hard-against making it a USE flag like testlib or test-lib, but it's still pretty rare in Gentoo (although far better than conditional file installation based on USE=test), I'm just worried about what happens if any consumers automagically link against it, etc.