Skip to content

protobuf_29: fix build by pinning abseil to 202407#422705

Merged
K900 merged 1 commit intoNixOS:staging-nextfrom
GaetanLepage:protobuf_29
Jul 5, 2025
Merged

protobuf_29: fix build by pinning abseil to 202407#422705
K900 merged 1 commit intoNixOS:staging-nextfrom
GaetanLepage:protobuf_29

Conversation

@GaetanLepage
Copy link
Contributor

Things done

abseil-cpp_202501 does not provide if_constexpr in its cmake files.
Pinning abseil to 202407 fixes the build.

CMake Error at cmake/tests.cmake:201 (target_link_libraries):
  Target "upb-test" links to:

    absl::if_constexpr

  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):
  CMakeLists.txt:362 (include)

cc @mweinelt

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@GaetanLepage
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 422705 --package google-cloud-cpp
Commit: 1e2891ac71b879b085ac1a2046b343fce8a0ec88


x86_64-linux

❌ 1 package failed to build:
  • google-cloud-cpp

Error logs: `x86_64-linux`
google-cloud-cpp
    * An ALIAS target is missing.

Call Stack (most recent call first):
/nix/store/52ya5pm3gg76sr55i78rdk56ly7v11d7-protobuf-29.5/lib/cmake/protobuf/protobuf-config.cmake:16 (include)
cmake/FindgRPC.cmake:72 (find_package)
CMakeLists.txt:223 (find_package)

-- Generating done (4.1s)
CMake Warning:
Manually-specified variables were not used by the project:

CMAKE_C_COMPILER
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
CMAKE_POLICY_DEFAULT_CMP0025
PROTOC_EXE
Protobuf_PROTOC_EXE

CMake Generate step failed. Build files cannot be regenerated correctly.

@GaetanLepage
Copy link
Contributor Author

google-cloud-cpp still fails to build:

CMake Error at /nix/store/52ya5pm3gg76sr55i78rdk56ly7v11d7-protobuf-29.5/lib/cmake/protobuf/protobuf-targets.cmake:65 (set_target_properties):
  The link interface of target "protobuf::libprotobuf" contains:

    absl::if_constexpr

  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):
  /nix/store/52ya5pm3gg76sr55i78rdk56ly7v11d7-protobuf-29.5/lib/cmake/protobuf/protobuf-config.cmake:16 (include)
  cmake/FindgRPC.cmake:72 (find_package)
  CMakeLists.txt:223 (find_package)

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 5, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 5, 2025
@K900 K900 merged commit 6e6a831 into NixOS:staging-next Jul 5, 2025
27 of 29 checks passed
@GaetanLepage GaetanLepage deleted the protobuf_29 branch July 5, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants