Skip to content

Conversation

@thisisnic
Copy link
Member

@thisisnic thisisnic commented Jan 24, 2026

Rationale for this change

Benchmark failing since C++20 upgrade due to lack of C++20 configuration

What changes are included in this PR?

Changes entirely from 🤖 (Claude) with discussion from me regarding optimal approach.

Description as follows:

conda-forge's R package doesn't have CXX20 configured in Makeconf, even though the compiler (gcc 14.3.0) supports C++20. This causes Arrow R package installation to fail with "a C++20 compiler is required" because R CMD config CXX20 returns empty.

This PR adds CXX20 configuration to R's Makeconf before building the Arrow R package in the benchmark hooks, if not already present.

Are these changes tested?

I got 🤖 to try it locally in a container but I'm not convinced we'll know for sure til we try it out properly.

Tested in Docker container with Amazon Linux 2023 + conda-forge R - confirmed R CMD config CXX20 returns empty before patch and g++ after patch.

The only thing we didn't test end-to-end was actually building Arrow R, but that would have taken much longer and the configure check (R CMD config CXX20 returning non-empty) is exactly what Arrow's configure script tests before proceeding.

Are there any user-facing changes?

Nope

@github-actions
Copy link

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

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Jan 24, 2026
@thisisnic
Copy link
Member Author

thisisnic commented Jan 24, 2026

I did some more digging with 🤖 and ended up here @jonkeane - I spent some time asking questions and getting verification from code, so it's a bit over my head, so let me know if this sounds feasible to you!

Problem: conda-forge builds R with gcc 10, which has incomplete C++20 support. R's configure tests for C++20, fails, and leaves CXX20 empty in Makeconf. Even though benchmark machines install gcc 14.3.0 (which does have C++20 support) via the compilers package, R doesn't know to use it for C++20.

Our fix: Check if R CMD config CXX20 returns empty, and if so, append CXX20 settings to Makeconf pointing to g++ (which resolves to gcc 14.3.0 in the conda environment).

Why it works: The compiler is there and capable - R's Makeconf just wasn't configured to use it. Our patch fills in that missing config.

@thisisnic thisisnic marked this pull request as ready for review January 24, 2026 16:54
@jonkeane
Copy link
Member

That sounds ok to me if it works!

@pitrou
Copy link
Member

pitrou commented Jan 26, 2026

@ursabot please benchmark

@rok
Copy link
Member

rok commented Jan 26, 2026

Benchmark runs are scheduled for commit f164e4d. Watch https://buildkite.com/apache-arrow and https://conbench.arrow-dev.org for updates. A comment will be posted here when the runs are complete.

@conbench-apache-arrow
Copy link

Thanks for your patience. Conbench analyzed the 3 benchmarking runs that have been run so far on PR commit f164e4d.

There were 2 benchmark results indicating a performance regression:

The full Conbench report has more details.

@thisisnic
Copy link
Member Author

Looks like the benchmarks are building - I think the one which failed is a timeout though unsure why.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Thanks a lot @thisisnic . This looks good to me! Just one question.

cat ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site

# Ensure CXX20 is configured in R's Makeconf.
# conda-forge's R may have empty CXX20 entries even though the compiler supports it.
Copy link
Member

Choose a reason for hiding this comment

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

Did we report an issue to the corresponding conda-forge feedstock, so that we can get rid of this workaround later?

Copy link
Member Author

Choose a reason for hiding this comment

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

Wasn't sure it was a bug but reported it at conda-forge/r-base-feedstock#401

@pitrou
Copy link
Member

pitrou commented Jan 27, 2026

Looks like the benchmarks are building - I think the one which failed is a timeout though unsure why.

We'll see if that reproduces in later benchmark runs, but this PR can certainly be merged anyway.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jan 27, 2026
@thisisnic thisisnic merged commit de06a52 into apache:main Jan 27, 2026
12 of 13 checks passed
@thisisnic thisisnic removed the awaiting changes Awaiting changes label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants