Repository navigation
Conversation
Ruby 3.1 and older fail to build there with GCC 15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for the PR. In general I'm not very keen to adding workarounds here, but no objection if ruby-build fixes such issues as then there is no need for a workaround here. The second commit looks great, happy to merge that once ruby-build handles the C23/C17 issue. |
|
I'm making a PR to ruby-build to handle this. |
GCC 15 defaults to C23, which Ruby < 3.2 can't compile as. Detect the GCC version instead of the OS, so that e.g. Ubuntu 26.04 is handled too. The flag keeps going through the cflags configure variable, except for Ruby 2.6 where it goes on CC, because its MJIT header check runs a bare $(CC) and would otherwise fail. Ported from ruby/ruby-builder#31 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
rbenv/ruby-build#2649 and I've cherry-picked your second commit as d86a862 |
|
2.4 - 3.1 are built, except 2.7 which failed unexpectedly, investigating: 2.3 fails like 2.2 and older with |
|
Fix for 2.7: rbenv/ruby-build#2650 |
|
I'll close this as I have integrated the changes, thank you for the help! |
|
👍 Thanks for porting it to ruby-build and getting 2.4 to 3.1 out so quickly. |
ubuntu-latestis moving toubuntu-26.04(actions/runner-images#14748), and setup-ruby has no builds of Ruby 3.1 and older there, so CI jobs across the ecosystem that test those versions onubuntu-latestfail at setup. ruby/actions#156 found 87 repositories in the ruby org alone, and I've been moving such jobs toubuntu-24.04(tdiary/tdiary-core#1418, tdiary/tdiary-contrib#262, tdiary/tdiary-style-gfm#39).They fail to build there because GCC 15 defaults to C23 and GCC 14 made implicit declarations errors. The first commit passes the minimal flags on
CCfor those versions, and the second adds them to the matrix forubuntu-26.04andubuntu-26.04-arm. I built 1.9.3 through 3.1.7 withruby-buildin anubuntu:26.04container, including the https andgem install jsonchecks. I haven't tried arm64.It would be great if you could merge this and publish the binaries. Thanks for maintaining ruby-builder and setup-ruby.
Generated with Claude Code
setup-ruby issue: ruby/setup-ruby#954