Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Build failures with ABSEIL 20240116 and CMAKE 3.30 #2998

Closed
marcalff opened this issue Jul 10, 2024 · 4 comments · Fixed by #3002
Closed

[CI] Build failures with ABSEIL 20240116 and CMAKE 3.30 #2998

marcalff opened this issue Jul 10, 2024 · 4 comments · Fixed by #3002
Assignees
Labels
bug Something isn't working issue:blocking This issue is preventing other fixes

Comments

@marcalff
Copy link
Member

CI started to fail for this build:

CI / CMake test (with abseil) (pull_request) 

The failure is in:

./ci/install_abseil.sh

Failure:

-- Configuring done (0.5s)
CMake Error at CMake/AbseilHelpers.cmake:317 (target_link_libraries):
  The link interface of target "test_allocator" contains:

    GTest::gmock

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  absl/container/CMakeLists.txt:206 (absl_cc_library)


CMake Generate step failed.  Build files cannot be regenerated correctly.
-- Generating done (0.2s)
Error: Process completed with exit code 1.

To investigate, I suspect a regression caused by the new image Version: 20240708.1.0:

Current runner version: '2.317.0'
Operating System
  Ubuntu
  20.04.6
  LTS
Runner Image
  Image: ubuntu-20.04
  Version: 20240708.1.0

Previous runs that builds properly:

Current runner version: '2.317.0'
Operating System
  Ubuntu
  20.04.6
  LTS
Runner Image
  Image: ubuntu-20.04
  Version: 20240701.1.0

See related:

To investigate, CMake was upgraded.

@marcalff marcalff added the bug Something isn't working label Jul 10, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 10, 2024
@marcalff
Copy link
Member Author

Note, github action documents Image Version: 20240708.1.1

There is no trace of Image Version: 20240708.1.0, which is executed by the runner.

@marcalff marcalff added the issue:blocking This issue is preventing other fixes label Jul 10, 2024
@ghelyar
Copy link

ghelyar commented Jul 10, 2024

I had the same problem and came across this when searching for answers.

It seems to be a problem with abseil 20240116.2 (current release) or earlier and CMake 3.30.0, but the master branch of abseil works with CMake 3.30.0, and the 20240116.2 version of abseil works with CMake 3.29.6, so one option would be to pin CMake to 3.29.6 until the next abseil release.

@marcalff
Copy link
Member Author

Thanks @ghelyar

@marcalff
Copy link
Member Author

Further research points to this:

[malff@malff-desktop abseil-cpp]$ pwd
/data/malff/CODE/MY_GITHUB/abseil-cpp
[malff@malff-desktop abseil-cpp]$ git show 779a3565a
commit 779a3565ac6c5b69dd1ab9183e500a27633117d5
Author: Derek Mauro <[email protected]>
Date:   Tue Jan 30 10:13:25 2024 -0800

    Avoid export of testonly target absl::test_allocator in CMake builds
    
    Closes #1536
    
    PiperOrigin-RevId: 602764437
    Change-Id: Ia5c20a3874262a2ddb8797f608af17d7e86dd6d6

diff --git a/absl/container/CMakeLists.txt b/absl/container/CMakeLists.txt
index 449a2cad..ee9ca9c3 100644
--- a/absl/container/CMakeLists.txt
+++ b/absl/container/CMakeLists.txt
@@ -213,6 +213,7 @@ absl_cc_library(
   DEPS
     absl::config
     GTest::gmock
+  TESTONLY
 )
 
 absl_cc_test(

marcalff added a commit to marcalff/opentelemetry-cpp that referenced this issue Jul 11, 2024
@marcalff marcalff changed the title [CI] New build failures for CI / CMake test (with abseil) (pull_request) [CI] BUILD FAILURES WITH ABSEIL 20240116 AND CMAKE 3.30 Jul 11, 2024
@marcalff marcalff removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 11, 2024
@marcalff marcalff self-assigned this Jul 11, 2024
@marcalff marcalff changed the title [CI] BUILD FAILURES WITH ABSEIL 20240116 AND CMAKE 3.30 [CI] Build failures with ABSEIL 20240116 and CMAKE 3.30 Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue:blocking This issue is preventing other fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants