Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Dec 9, 2025

Rationale for this change

We decided to migrate Arrow C++ to C++20 in this discussion: https://lists.apache.org/thread/48zlj0dn2y0f53y2k37qsr90y781wfnj

What changes are included in this PR?

  1. Build configuration updates (CMake files etc.) to build with C++20 instead of C++17

  2. C++-level fixes to ensure compilation succeeds:

    • Workarounds for deprecation of atomic access on std::shared_ptr<T> (the replacement std::atomic<std::shared_ptr<T>> is unfortunately not supported in all standard library implementations)
    • Workaround for Abseil ABI issues
    • Trivial update to arrow/util/string.h to call a C++20 API (to validate that C++20 is actually enabled)
  3. CI configuration updates to get enough C++20 support on the various platforms:

    • Bump default clang and LLVM versions to 18
    • Use AlmaLinux 10 for release verification (AlmaLinux 8 is still tested on other CI builds)

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes, Arrow C++ will now require a C++20-compliant compiler.

@pitrou
Copy link
Member Author

pitrou commented Dec 9, 2025

@github-actions crossbow submit -g cpp

@github-actions

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Dec 9, 2025

@github-actions crossbow submit -g cpp

@github-actions

This comment was marked as outdated.

@pitrou pitrou added the CI: Extra: Package: Linux Run extra Linux Packages CI label Dec 9, 2025
@pitrou
Copy link
Member Author

pitrou commented Dec 9, 2025

@github-actions crossbow submit wheelcp313*

@github-actions

This comment was marked as outdated.

@pitrou

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Dec 9, 2025

@github-actions crossbow submit -g python

@pitrou
Copy link
Member Author

pitrou commented Dec 9, 2025

@github-actions crossbow submit -g r

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@pitrou

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Dec 15, 2025

@github-actions crossbow submit -g c-glib -g ruby -g r

@github-actions
Copy link

Revision: 9d8b52f

Submitted crossbow builds: ursacomputing/crossbow @ actions-037a71b82f

Task Status
test-debian-c-glib GitHub Actions
test-debian-ruby GitHub Actions
test-ubuntu-c-glib GitHub Actions
test-ubuntu-ruby GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Dec 17, 2025

@github-actions crossbow submit -g verify-rc

@github-actions
Copy link

Revision: 9d8b52f

Submitted crossbow builds: ursacomputing/crossbow @ actions-264dd4e180

Task Status
verify-rc-source-cpp-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-cpp-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-cpp-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-cpp-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-cpp-macos-amd64 GitHub Actions
verify-rc-source-cpp-macos-arm64 GitHub Actions
verify-rc-source-cpp-macos-conda-amd64 GitHub Actions
verify-rc-source-integration-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-integration-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-integration-macos-amd64 GitHub Actions
verify-rc-source-integration-macos-arm64 GitHub Actions
verify-rc-source-integration-macos-conda-amd64 GitHub Actions
verify-rc-source-python-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-python-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-python-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-python-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-python-macos-amd64 GitHub Actions
verify-rc-source-python-macos-arm64 GitHub Actions
verify-rc-source-python-macos-conda-amd64 GitHub Actions
verify-rc-source-ruby-linux-almalinux-10-amd64 GitHub Actions
verify-rc-source-ruby-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-ruby-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-ruby-linux-ubuntu-24.04-amd64 GitHub Actions
verify-rc-source-ruby-macos-amd64 GitHub Actions
verify-rc-source-ruby-macos-arm64 GitHub Actions
verify-rc-source-windows GitHub Actions

@pitrou pitrou force-pushed the gh45885-cxx20 branch 2 times, most recently from 4c8506b to 42fbedc Compare December 18, 2025 10:37
Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

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

+1

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

I think all review comments have been addressed, have I overlooked something @kou @WillAyd @zanmato1984 ?

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

@github-actions crossbow submit -g r -g cpp -g python

@github-actions
Copy link

Revision: 6f165ed

Submitted crossbow builds: ursacomputing/crossbow @ actions-370fa26cd6

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
r-binary-packages GitHub Actions
r-recheck-most GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2 GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.13-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.14 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-cpp-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-r-alpine-linux-cran GitHub Actions
test-r-arrow-backwards-compatibility GitHub Actions
test-r-depsource-bundled Azure
test-r-depsource-system GitHub Actions
test-r-dev-duckdb GitHub Actions
test-r-devdocs GitHub Actions
test-r-extra-packages GitHub Actions
test-r-gcc-11 GitHub Actions
test-r-gcc-12 GitHub Actions
test-r-install-local GitHub Actions
test-r-install-local-minsizerel GitHub Actions
test-r-linux-as-cran GitHub Actions
test-r-linux-rchk GitHub Actions
test-r-linux-sanitizers GitHub Actions
test-r-linux-valgrind GitHub Actions
test-r-m1-san GitHub Actions
test-r-macos-as-cran GitHub Actions
test-r-minimal-build Azure
test-r-offline-maximal GitHub Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-ubuntu-gcc12-custom-ccache Azure
test-r-rhub-ubuntu-release-latest Azure
test-r-rocker-r-ver-latest Azure
test-r-rstudio-r-base-4.2-jammy Azure
test-r-ubuntu-22.04 GitHub Actions
test-r-versions GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

I'm not sure what it's for, but I've re-enabled the test-debian-experimental-cpp-gcc-15 job.

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

@github-actions crossbow submit test-debian-experimental-cpp-gcc-15

@github-actions
Copy link

Revision: 6fa77b0

Submitted crossbow builds: ursacomputing/crossbow @ actions-93c23edec8

Task Status
test-debian-experimental-cpp-gcc-15 GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

@github-actions crossbow submit -g cpp -g python

@github-actions
Copy link

Revision: 6fa77b0

Submitted crossbow builds: ursacomputing/crossbow @ actions-e5d2f93e4c

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2 GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.13-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.14 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-cpp-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-debian-experimental-cpp-gcc-15 GitHub Actions
test-fedora-42-cpp GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

@pitrou
Copy link
Member Author

pitrou commented Dec 18, 2025

Well, let's merge this now.

@pitrou pitrou merged commit 30809c6 into apache:main Dec 18, 2025
66 of 68 checks passed
@pitrou pitrou removed the awaiting change review Awaiting change review label Dec 18, 2025
@pitrou pitrou deleted the gh45885-cxx20 branch December 18, 2025 16:17

foreach(LIB_TARGET ${ARROW_LIBRARIES})
target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_EXPORTING)
# C++17 is required to compile against Arrow C++ headers and libraries
Copy link
Member

Choose a reason for hiding this comment

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

Could you update this "C++17" too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, sorry, it's intriguing that I overlooked these two occurrences.

INCLUDE_DIRS ${MATLAB_ARROW_LIBMEXCLASS_CLIENT_PROXY_LIBRARY_INCLUDE_DIRS}
LINK_LIBRARIES arrow_shared
)
# Use C++17
Copy link
Member

Choose a reason for hiding this comment

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

Could you update this too?

@github-actions github-actions bot added the awaiting changes Awaiting changes label Dec 19, 2025
@kou
Copy link
Member

kou commented Dec 19, 2025

I'm not sure what it's for, but I've re-enabled the test-debian-experimental-cpp-gcc-15 job.

It's for the latest GCC. We should bump this GCC version when new GCC is released. Debian experimental will provide it. For example, GCC 16 isn't released yet but it's already provided: https://packages.debian.org/search?keywords=gcc-16

thisisnic pushed a commit that referenced this pull request Dec 19, 2025
### Rationale for this change

As a followup to #48414, fix the comments that I had forgotten to update.

### Are these changes tested?

No testing required.

### Are there any user-facing changes?

No.

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
Jonahkel pushed a commit to Jonahkel/arrow that referenced this pull request Dec 22, 2025
### Rationale for this change

As a followup to apache#48414, fix the comments that I had forgotten to update.

### Are these changes tested?

No testing required.

### Are there any user-facing changes?

No.

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 30809c6.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 474 possible false positives for unstable benchmarks that are known to sometimes produce them.

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.

7 participants