OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

Build fails due to file conflict with gtest package

Open vani2620 opened this issue 10 months ago • 5 comments

Describe the bug

I'm trying to install this on EndeavourOS via AUR using the pacman wrapper yay. The building of OR-tools, abc, and OpenSTA appear to work perfectly fine, but when it gets around to building OpenROAD itself, the build fails with the following error:

error: failed to commit transaction (conflicting files)
openroad-git: /usr/include/gmock/gmock-actions.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-cardinalities.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-function-mocker.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-matchers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-more-actions.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-more-matchers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-nice-strict.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock-spec-builders.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/gmock.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/custom/README.md exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/custom/gmock-generated-actions.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/custom/gmock-matchers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/custom/gmock-port.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/gmock-internal-utils.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/gmock-port.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gmock/internal/gmock-pp.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-assertion-result.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-death-test.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-matchers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-message.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-param-test.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-printers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-spi.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-test-part.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest-typed-test.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest_pred_impl.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/gtest_prod.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/custom/README.md exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/custom/gtest-port.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/custom/gtest-printers.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/custom/gtest.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-death-test-internal.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-filepath.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-internal.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-param-util.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-port-arch.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-port.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-string.h exists in filesystem (owned by gtest)
openroad-git: /usr/include/gtest/internal/gtest-type-util.h exists in filesystem (owned by gtest)
openroad-git: /usr/lib/cmake/GTest/GTestConfig.cmake exists in filesystem (owned by gtest)
openroad-git: /usr/lib/cmake/GTest/GTestConfigVersion.cmake exists in filesystem (owned by gtest)
openroad-git: /usr/lib/cmake/GTest/GTestTargets-none.cmake exists in filesystem (owned by gtest)
openroad-git: /usr/lib/cmake/GTest/GTestTargets.cmake exists in filesystem (owned by gtest)
openroad-git: /usr/lib/pkgconfig/gmock.pc exists in filesystem (owned by gtest)
openroad-git: /usr/lib/pkgconfig/gmock_main.pc exists in filesystem (owned by gtest)
openroad-git: /usr/lib/pkgconfig/gtest.pc exists in filesystem (owned by gtest)
openroad-git: /usr/lib/pkgconfig/gtest_main.pc exists in filesystem (owned by gtest)
Errors occurred, no packages were upgraded.
 -> error installing: [/home/vanitas/.cache/yay/openroad-git/openroad-git-r27008.6645a5370f-1-x86_64.pkg.tar.zst] - exit status 1

I'm almost certain this is being caused by the inclusion of GoogleTest in the CMakeLists.txt in the main tree, but I don't have enough experience with C/C++ to know how to sidestep this.

Expected Behavior

I expected the package to install properly.

Environment

Git commit: cb7a69d788d96776b417afc2e6bf7f2e77d1a96e
kernel: Linux 6.13.2-arch1-1
os: EndeavourOS 
cmake version 3.31.5
CMake Deprecation Warning at third-party/abc/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenROAD version: v2.0-19008-gcb7a69d788
-- System name: Linux
-- Compiler: GNU 14.2.1
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 17
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- The C compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test C_COMPILER_SUPPORTS__-Wall
-- Performing Test C_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- PerforminCMake Warning (dev) at src/CMakeLists.txt:170 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at src/CMakeLists.txt:262 (message):
  spdlog: SPDLOG_FMT_EXTERNAL=ON


CMake Warning (dev) at src/dpl/CMakeLists.txt:41 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/cts/CMakeLists.txt:36 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/drt/CMakeLists.txt:49 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/utl/CMakeLists.txt:38 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

g Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test C_COMPILER_SUPPORTS__-x
-- Performing Test C_COMPILER_SUPPORTS__-x - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-x
-- Performing Test CXX_COMPILER_SUPPORTS__-x - Failed
-- Performing Test C_COMPILER_SUPPORTS__c++
-- Performing Test C_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__c++
-- Performing Test CXX_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17
-- Performing Test C_COMPILER_SUPPORTS__-std=c++17 - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17
-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17 - Success
-- Performing Test C_COMPILER_SUPPORTS__-fno-exceptions
-- Performing Test C_COMPILER_SUPPORTS__-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-fno-exceptions
-- Performing Test CXX_COMPILER_SUPPORTS__-fno-exceptions - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Found Python3: /usr/bin/python3.13 (found version "3.13.1") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- TCL library: /usr/lib/libtcl.so
-- TCL header: /usr/include/tcl.h
-- Found SWIG: /usr/bin/swig (found suitable version "4.3.0", minimum required is "4.0")
-- Using SWIG >= 4.3.0 -flatstaticmethod flag for python
-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found version "1.87.0")
-- boost: 1.87.0
-- Found GTest: /usr/lib/cmake/GTest/GTestConfig.cmake (found version "1.15.2")
-- GTest: 1.15.2
-- Found Python3: /usr/include/python3.13 (found version "3.13.1") found components: Development Development.Module Development.Embed
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- spdlog: 1.15.1
-- Found BISON: /usr/bin/bison (found version "3.8.2")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- STA version: 2.6.0
-- STA git sha: 6e95d93a44f7c46bb572933f5e2f8a624135820b
-- System name: Linux
-- Compiler: GNU 14.2.1
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- TCL library: /usr/lib/libtcl.so
-- TCL header: /usr/include/tcl.h
-- TCL readline library: NOT FOUND
-- TCL readline header: NOT FOUND
-- CUDD library: /usr/local/lib/libcudd.so
-- CUDD header: /usr/local/include/cudd.h
-- SSTA: 0
-- Found SWIG: /usr/bin/swig (found suitable version "4.3.0", minimum required is "3.0")
-- STA executable: /home/vanitas/.cache/yay/openroad-git/src/OpenROAD/src/sta/app/sta
-- Found Protobuf: /usr/lib/libprotobuf.so (found version "5.29.2")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found OR-Tools: /usr/lib/cmake/ortools (version: 9.11.9999)
-- TCL library: /usr/lib/libtcl.so
-- TCL header: /usr/include/tcl.h
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- GUI is not enabled
-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found version "1.87.0") found components: serialization
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) 
-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found suitable version "1.87.0", minimum required is "1.78")
-- TCL library: /usr/lib/libtcl.so
-- TCL header: /usr/include/tcl.CMake Warning (dev) at src/dst/CMakeLists.txt:43 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/dft/test/CMakeLists.txt:19 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

h
-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found version "1.87.0") found components: serialization system thread
-- Found Boost: /usr/lib/cmake/Boost-1.87.0/BoostConfig.cmake (found version "1.87.0")
-- Found Eigen3: /usr/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.0")
-- TCL readline disabled
-- Tcl Extended disabled
-- Python3 enabled
-- Configuring done (6.2s)
-- Generating done (0.6s)
-- Build files have been written to: /tmp/tmp.bxzgI4JehX

To Reproduce

  1. Use EndeavourOS.
  2. Run yay -S openroad-git.
  3. Press enter at every confirmation message.

Relevant log output


Screenshots

No response

Additional Context

No response

vani2620 avatar Feb 14 '25 04:02 vani2620

I should add, I can't uninstall gtest as it appears to be a system-wide dependency.

vani2620 avatar Feb 14 '25 05:02 vani2620

@QuantamHD any ideas?

maliberty avatar Feb 14 '25 05:02 maliberty

This seems like an Arch specific issue. You can turn off tests in cmake with -DENABLE_TESTS=OFF

https://wiki.archlinux.org/title/Pacman#%22Failed_to_commit_transaction_(conflicting_files)%22_error

QuantamHD avatar Feb 14 '25 07:02 QuantamHD

Small update: I've tried editing the command in the PKGBUILD file with the specified command and no dice on that front--I still get the same error message. I'll try and see if simply syncing dependencies and then editing the CMakeLists.txt file helps any.

vani2620 avatar Feb 15 '25 23:02 vani2620

So running the build manually via the provided script worked fine...

vani2620 avatar Feb 16 '25 02:02 vani2620

Closing as the user has found a solution.

vvbandeira avatar Aug 22 '25 19:08 vvbandeira