Skip to content

GH-55440: [C++] Move bundled google-cloud-cpp libraries - #55319

Merged
kou merged 9 commits into
apache:mainfrom
tadeja:fup-54905-gcs-static-bundle
Nov 13, 2026
Merged

kou merged 9 commits into
apache:mainfrom
tadeja:fup-54905-gcs-static-bundle

Conversation

@tadeja

@tadeja tadeja commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

Fix #55440. This is a follow-up to #54905. Bundled google-cloud-cpp remained in libarrow_bundled_dependencies.a, which broke static linking of non-GCS consumers such as arrow-example-s3-static.

What changes are included in this PR?

  • Move bundled google-cloud-cpp into a new libarrow_gcs_bundled_dependencies library, linked via ArrowGcs::arrow_gcs_static and arrow-gcs.pc.
  • Fix GCS static link dependencies and order.
  • Update R and Linux packaging.
  • Add GCS and S3+GCS static-link checks to cpp/examples/minimal_build.
  • Document arrow_gcs_bundled_dependencies in building.rst

Are these changes tested?

Yes. The new minimal_build static-link checks in CI C++ (ARM64 macOS 26 C++ or 15-intel C++ ...) and C++ Extra (AMD64 Debian SIMD Level NONE or AMD64 Alpine Linux ...) and crossbow test-debian-13-cpp-amd64

Are there any user-facing changes?

Yes. Static builds with bundled google-cloud-cpp install a new libarrow_gcs_bundled_dependencies library.
CMake and pkg-config users get it automatically, others must link it after arrow_gcs.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR, could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

@tadeja

tadeja commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

As found in #55317 (comment), the following PR

caused
C++ Extra job AMD64 Debian SIMD Level NONE to start failing on 28 Oct
https://github.com/apache/arrow/actions/runs/40608463298/job/122553847383#step:6:5030

[100%] Linking CXX executable arrow-example-s3-static
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `google::cloud::v3_2::(anonymous namespace)::Timestamp::Timestamp(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)':
/build/cpp/_deps/google_cloud_cpp-src/google/cloud/log.cc:41:(.text+0x29): undefined reference to `absl::debian7::FromChrono(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)'
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `google::cloud::v3_2::(anonymous namespace)::operator<<(std::ostream&, google::cloud::v3_2::(anonymous namespace)::Timestamp const&)':
/build/cpp/_deps/google_cloud_cpp-src/google/cloud/log.cc:47:(.text+0x9f): undefined reference to `absl::debian7::FormatTime[abi:cxx11](absl::debian7::string_view, absl::debian7::Time, absl::debian7::TimeZone)'
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `absl::debian7::UTCTimeZone()':
/usr/include/absl/time/time.h:1277:(.text._ZN4absl7debian711UTCTimeZoneEv[_ZN4absl7debian711UTCTimeZoneEv]+0x9): undefined reference to `absl::debian7::time_internal::cctz::utc_time_zone()'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/arrow-example-s3-static.dir/build.make:144: arrow-example-s3-static] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/arrow-example-s3-static.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

And also test-debian-13-cpp-amd64 is failing since 29 Oct 2026 the same way:
https://github.com/ursacomputing/crossbow/actions/runs/40825143204/job/123286357741#step:7:5014

[100%] Linking CXX executable arrow-example-s3-static
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `google::cloud::v3_2::(anonymous namespace)::Timestamp::Timestamp(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)':
/build/cpp/_deps/google_cloud_cpp-src/google/cloud/log.cc:41:(.text+0x29): undefined reference to `absl::debian7::FromChrono(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)'
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `google::cloud::v3_2::(anonymous namespace)::operator<<(std::ostream&, google::cloud::v3_2::(anonymous namespace)::Timestamp const&)':
/build/cpp/_deps/google_cloud_cpp-src/google/cloud/log.cc:47:(.text+0x9f): undefined reference to `absl::debian7::FormatTime[abi:cxx11](absl::debian7::string_view, absl::debian7::Time, absl::debian7::TimeZone)'
/usr/bin/ld: /usr/local/lib/libarrow_bundled_dependencies.a(log.cc.o): in function `absl::debian7::UTCTimeZone()':
/usr/include/absl/time/time.h:1277:(.text._ZN4absl7debian711UTCTimeZoneEv[_ZN4absl7debian711UTCTimeZoneEv]+0x9): undefined reference to `absl::debian7::time_internal::cctz::utc_time_zone()'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/arrow-example-s3-static.dir/build.make:144: arrow-example-s3-static] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/arrow-example-s3-static.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

@tadeja

tadeja commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-debian-13-cpp-amd64

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Revision: 2476a34

Submitted crossbow builds: ursacomputing/crossbow @ actions-1fd9f52c9c

Task Status
test-debian-13-cpp-amd64 GitHub Actions

@tadeja tadeja changed the title EXP: [C++] Move bundled google-cloud-cpp libraries GH-55440: [C++] Move bundled google-cloud-cpp libraries Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #55440 has been automatically assigned in GitHub to PR creator.

@raulcd

raulcd commented Nov 11, 2026

Copy link
Copy Markdown
Member

@tadeja, I remembered about this issue now and was trying to find whether it was already fixed or not. Can I help with anything?

@tadeja
tadeja force-pushed the fup-54905-gcs-static-bundle branch from 2476a34 to d152824 Compare November 11, 2026 16:36
@tadeja

tadeja commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-debian-13-cpp-amd64

@github-actions

Copy link
Copy Markdown

Revision: d152824

Submitted crossbow builds: ursacomputing/crossbow @ actions-b7baa33877

Task Status
test-debian-13-cpp-amd64 GitHub Actions

@tadeja tadeja added the CI: Extra: C++ Run extra C++ CI label Nov 11, 2026
@tadeja tadeja added CI: Extra: C++ Run extra C++ CI and removed CI: Extra: C++ Run extra C++ CI labels Nov 11, 2026
@tadeja

tadeja commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit r-binary-packages test-r-offline-maximal test-debian-13-cpp-amd64

@github-actions

Copy link
Copy Markdown

Revision: 2e189b3

Submitted crossbow builds: ursacomputing/crossbow @ actions-4af363edcb

Task Status
r-binary-packages GitHub Actions
test-debian-13-cpp-amd64 GitHub Actions
test-r-offline-maximal GitHub Actions

@tadeja
tadeja marked this pull request as ready for review November 11, 2026 23:12
Copilot AI balanced review requested due to automatic review settings November 12, 2026 10:08
@tadeja

tadeja commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit r-binary-packages test-r-offline-maximal test-debian-13-cpp-amd64

@github-actions

Copy link
Copy Markdown

Revision: 04198cf

Submitted crossbow builds: ursacomputing/crossbow @ actions-788d5c7556

Task Status
r-binary-packages GitHub Actions
test-debian-13-cpp-amd64 GitHub Actions
test-r-offline-maximal GitHub Actions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the GCS static-link dependency changes.

No open issues 🎉

Review effort: Balanced

@tadeja

tadeja commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-r-offline-maximal

@github-actions

Copy link
Copy Markdown

Revision: 04198cf

Submitted crossbow builds: ursacomputing/crossbow @ actions-f295c03c10

Task Status
test-r-offline-maximal GitHub Actions

Copilot AI balanced review requested due to automatic review settings November 12, 2026 12:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the GCS dependency archive separation.

No open issues 🎉

Review effort: Balanced

@tadeja

tadeja commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-debian-13-cpp-amd64

@github-actions

Copy link
Copy Markdown

Revision: 57f6da7

Submitted crossbow builds: ursacomputing/crossbow @ actions-8209b2703a

Task Status
test-debian-13-cpp-amd64 GitHub Actions

@tadeja

tadeja commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-ubuntu-22.04-cpp-bundled test-ubuntu-24.04-cpp-gcc-13-bundled

@github-actions

Copy link
Copy Markdown

Revision: 57f6da7

Submitted crossbow builds: ursacomputing/crossbow @ actions-2f1460b1ff

Task Status
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions

@tadeja

tadeja commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

@raulcd, @kou this is finally ready for a review now.
All failing 3 C++ jobs and R job look unrelated (appear on other PRs too).

Comment on lines +3867 to +3868
set(ARROW_GCS_BUNDLED_STATIC_LIBS
google-cloud-cpp::storage google-cloud-cpp::rest_internal google-cloud-cpp::common

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still trying to get my head around why this is an issue but

list(PREPEND ARROW_BUNDLED_STATIC_LIBS ${AWSSDK_LINK_LIBRARIES})

isn't and we don't seem to require an ARROW_S3_BUNDLED_STATIC_LIBS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, as this is green and fixes a real issue I think we should merge. We should probably create ARROW_S3_BUNDLED_STATIC_LIBS as this might be just coincidence that is not currently failing but we can do that afterwards.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kou kou added the CI: Extra: Package: Linux Run extra Linux Packages CI label Nov 13, 2026

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

I've opened #55583 to clean up ArrowConfig.cmake.in.

Comment thread ci/scripts/cpp_test.sh Resolved
Copilot AI balanced review requested due to automatic review settings November 13, 2026 10:36
@tadeja

tadeja commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-debian-13-cpp-amd64 test-ubuntu-22.04-cpp-bundled test-ubuntu-24.04-cpp-gcc-13-bundled

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change separating bundled GCS dependencies from Arrow’s core archive.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Revision: 3b04d01

Submitted crossbow builds: ursacomputing/crossbow @ actions-b0e1ebe2bb

Task Status
test-debian-13-cpp-amd64 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions

@kou
kou merged commit ab5b422 into apache:main Nov 13, 2026
88 of 92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][CI] Static S3 linking test fails after GCS moved out

4 participants