Skip to content

google-cloud-errors: Ruby 3.2 CI fails to build google-protobuf 3.25.8 on ubuntu-26.04 #36685

Closed

Description

@quartzmo

Summary

Since 2026-10-26, the CI (ubuntu-latest, 3.2, --test) job fails for google-cloud-errors. Bundler can't build the google-protobuf 3.25.8 native extension. Every other matrix job passes.

This keeps the nightly CI run red and blocks the release PR #36668. That PR's only change is docs.

Error

From the failed job (runner image ubuntu-26.04, Ruby 3.2.11):

Installing google-protobuf 3.25.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
...
compiling protobuf.c
In file included from .../include/ruby-3.2.0/ruby/internal/arithmetic/long.h:42,
...
error: unknown type name 'bool'
error: 'true' undeclared (first use in this function)
error: 'false' undeclared (first use in this function)
...
An error occurred while installing google-protobuf (3.25.8), and Bundler cannot continue.

Cause

Several facts combine:

  1. ubuntu-latest now resolves to the ubuntu-26.04 runner image, and its GCC defaults to C23.
  2. Ruby 3.2's include/ruby/internal/stdbool.h includes <stdbool.h> only when the build config defines HAVE_STDBOOL_H (source). Ruby 3.3 includes it unconditionally (source), so the 3.3, 3.4 and 4.0 jobs pass.
  3. google-protobuf forces -std=gnu99 in its extconf.rb, so bool is undefined. Native gems that keep the compiler default (json, prism, racc) still build on Ruby 3.2 in the same job.
  4. google-cloud-errors is the only gem that compiles protobuf from source at all. Its Gemfile still pulls the legacy google-gax ~> 1.8, which caps google-protobuf at 3.x. The lockfile has only the source (ruby platform) variant of 3.25.8. The precompiled 3.25.8 build covers only Ruby < 3.4, so it gets dropped from locks generated on newer Ruby. Other gems lock google-protobuf 4.x with precompiled x86_64-linux-gnu builds and never compile it.

The library code doesn't use google-gax. Only the tests reference it: wrapped_gax_test.rb, plus unused requires in two REST error tests.

Proposed fix

Remove the google-gax test dependency and wrapped_gax_test.rb from google-cloud-errors. Then regenerate the lockfile so google-protobuf resolves to 4.x with precompiled builds for Ruby 3.2 through 4.0.

Activity

  1. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Oct 29, 2026
  2. self-assigned this
    on Oct 29, 2026
  3. added
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Oct 29, 2026
  4. added theissue type on Oct 29, 2026
  5. removed theissue type on Oct 29, 2026
  6. added
    type: processA process-related concern. May include testing, release, or the like.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Oct 29, 2026
  7. quartzmo commented on Oct 29, 2026

    @quartzmo
    MemberAuthor
  8. added a commit that references this issue on Nov 1, 2026
    295d36e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions