Use append_cflags instead of modifying CFLAGS directly#137
Merged
ioquatix merged 1 commit intosocketry:mainfrom May 22, 2025
Merged
Use append_cflags instead of modifying CFLAGS directly#137ioquatix merged 1 commit intosocketry:mainfrom
ioquatix merged 1 commit intosocketry:mainfrom
Conversation
Contributor
Author
|
@ioquatix would appreciate it if you can take a look here. I got blocked with one of my client projects due to this. |
Member
|
I will sort it out today. |
3d64dac to
d085761
Compare
|
I am running in to this exact issue: trying to bundle install a Ruby project using:
The issue is with io-event: Feels like I have installed every conceivable development tools package there is 🤷 |
Contributor
Author
|
Try updating a gem, fix already landed with a release. |
stanhu
added a commit
to stanhu/cbor-ruby
that referenced
this pull request
Jul 23, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being included when `-std=c99` is in use. This occurs because the standard `configure` script shipped with Ruby does not properly test for `stdbool.h` on C23 compilers. It needs to pick up this change: https://cgit.git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6dcecb780a69bd208088d666b299e92aa7ae7e80 The `append_cflags` approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable. Similar changes: * socketry/io-event#137 * mongodb/bson-ruby#355 Closes cabo#27
stanhu
added a commit
to stanhu/ruby-magic
that referenced
this pull request
Jul 27, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being included when `-std=c99` is in use. This occurs because the standard `configure` script shipped with older Ruby versions (prior to 3.4.5 and 3.3.9) do not properly test for `stdbool.h` on C23 compilers (https://bugs.ruby-lang.org/issues/21340). The `append_cflags` approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable. Similar changes: * socketry/io-event#137 * mongodb/bson-ruby#355 Closes kwilczynski#27
stanhu
added a commit
to stanhu/ruby-magic
that referenced
this pull request
Jul 27, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being included when `-std=c99` is in use. This occurs because the standard `configure` script shipped with older Ruby versions (prior to 3.4.5 and 3.3.9) do not properly test for `stdbool.h` on C23 compilers (https://bugs.ruby-lang.org/issues/21340). The `append_cflags` approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable. Similar changes: * socketry/io-event#137 * mongodb/bson-ruby#355
stanhu
added a commit
to stanhu/cbor-ruby
that referenced
this pull request
Jul 28, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being included when `-std=c99` is in use. This occurs because the standard `configure` script shipped with Ruby does not properly test for `stdbool.h` on C23 compilers. It needs to pick up this change: https://cgit.git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6dcecb780a69bd208088d666b299e92aa7ae7e80 The `append_cflags` approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable. Similar changes: * socketry/io-event#137 * mongodb/bson-ruby#355 Closes cabo#27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linux system with latest GCC 15 can't compile this gem. See more #136
Types of Changes
Use append_cflags instead of modifying CFLAGS directly
According to this thread
https://inbox.vuxu.org/ruby-core/redmine.issue-21290.20250428190637.58020@ruby-lang.org/T/
ed25519gem had a similar issue, and it was resolved by migrating to append_cflags.RubyCrypto/ed25519@c1ee0e0
Let's move this gem to append_cflags as well. This approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable, and should not affect most systems.
In the meantime, it appears that Nobu has merged a wider fix to ruby itself. But this improvement will not hurt in the long term.
Testing
Building this branch with
bake buildworks on my machine. At the same time,mainbranch is failing.Contribution