* [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
@ 2025-05-14 16:35 christo (Chris Alberti) via ruby-core
2025-05-15 1:16 ` [ruby-core:122111] " nobu (Nobuyoshi Nakada) via ruby-core
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: christo (Chris Alberti) via ruby-core @ 2025-05-14 16:35 UTC (permalink / raw)
To: ruby-core; +Cc: christo (Chris Alberti)
Issue #21340 has been reported by christo (Chris Alberti).
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340
* Author: christo (Chris Alberti)
* Status: Open
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122111] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
@ 2025-05-15 1:16 ` nobu (Nobuyoshi Nakada) via ruby-core
2025-05-15 13:45 ` [ruby-core:122119] " christo (Chris Alberti) via ruby-core
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2025-05-15 1:16 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #21340 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Feedback
Isn't `HAVE_STDBOOL_H` defined?
`HAVE_STD_BOOL_H` should be for `std_bool.h`.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113264
* Author: christo (Chris Alberti)
* Status: Feedback
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122119] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
2025-05-15 1:16 ` [ruby-core:122111] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2025-05-15 13:45 ` christo (Chris Alberti) via ruby-core
2025-05-15 15:31 ` [ruby-core:122120] " alanwu (Alan Wu) via ruby-core
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: christo (Chris Alberti) via ruby-core @ 2025-05-15 13:45 UTC (permalink / raw)
To: ruby-core; +Cc: christo (Chris Alberti)
Issue #21340 has been updated by christo (Chris Alberti).
File config.h_GCC14 added
File config.h_GCC15 added
nobu (Nobuyoshi Nakada) wrote in #note-1:
> Isn't `HAVE_STDBOOL_H` defined?
> `HAVE_STD_BOOL_H` should be for `std_bool.h`.
Not if you build on GCC 15 (or C23) using the ./configure script packaged with the official ruby release tar.gz.
GCC 15 bumps the default C standard to gnu23 which is where the issue is introduced. The problem is that the test in Ruby's _old_ ./configure is broken on C23 because of the new native definitions of bool/true/false. [Read the autoconf commit I linked]((https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60)) for context. They fixed this in 2022.
If you run the included ./configure with GCC 14 or lower, or with GCC 15 with -std=gnu17 or lower, you get a config.h which _does_ define `HAVE_STDBOOL_H`.
If you run the included ./configure with GCC 15 or a lower version with -std=gnu23, you get a config.h which _does not_ define `HAVE_STDBOOL_H`.
If you use the latest autoconf (2.72 on my system) to recreate the ./configure script, then run that new `./configure` on GCC15 (or -std=gnu23), you get a config.h which _does_ correctly define `HAVE_STDBOOL_H`.
Please reopen this... Should be a pretty easy win.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113273
* Author: christo (Chris Alberti)
* Status: Feedback
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122120] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
2025-05-15 1:16 ` [ruby-core:122111] " nobu (Nobuyoshi Nakada) via ruby-core
2025-05-15 13:45 ` [ruby-core:122119] " christo (Chris Alberti) via ruby-core
@ 2025-05-15 15:31 ` alanwu (Alan Wu) via ruby-core
2025-05-16 22:18 ` [ruby-core:122158] " ntkme (Natsuki Natsume) via ruby-core
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-05-15 15:31 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #21340 has been updated by alanwu (Alan Wu).
Status changed from Feedback to Open
We see this on -CI that uses Ubuntu 24.04, since it uses autoconf 2.71 like the environment that makes the release tarballs.
https://github.com/ruby/ruby/actions/runs/15047656643/job/42294231514#step:8:159
> checking for stdbool.h that conforms to C99... no
(OP had a typo in the macro name)
> I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
I think it's here:
https://github.com/ruby/actions/blob/1b13f04f9fff1ddd4c15a9c23b3de3780f7e139c/.github/actions/make-snapshot/action.yml#L25
If we want 2.72, we can't it from Ubuntu for now.
This might also be the cause for #21290.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113274
* Author: christo (Chris Alberti)
* Status: Open
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122158] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (2 preceding siblings ...)
2025-05-15 15:31 ` [ruby-core:122120] " alanwu (Alan Wu) via ruby-core
@ 2025-05-16 22:18 ` ntkme (Natsuki Natsume) via ruby-core
2025-05-21 8:55 ` [ruby-core:122216] " alanwu (Alan Wu) via ruby-core
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ntkme (Natsuki Natsume) via ruby-core @ 2025-05-16 22:18 UTC (permalink / raw)
To: ruby-core; +Cc: ntkme (Natsuki Natsume)
Issue #21340 has been updated by ntkme (Natsuki Natsume).
google-protobuf is also failing to compile native extension on windows ruby head with msys2 gcc 15.
```
In file included from
D:/rubyinstaller-head-x64/include/ruby-3.5.0+1/ruby/defines.h:74,
from
D:/rubyinstaller-head-x64/include/ruby-3.5.0+1/ruby/ruby.h:25,
from D:/rubyinstaller-head-x64/include/ruby-3.5.0+1/ruby.h:38,
from protobuf.h:13,
from protobuf.c:8:
D:/a/_temp/msys64/ucrt64/include/stralign.h: In function 'ua_CharUpperW':
D:/rubyinstaller-head-x64/include/ruby-3.5.0+1/ruby/backward/2/bool.h:31:15:
error: 'true' undeclared (first use in this function)
31 | # define TRUE true
| ^~~~
```
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113308
* Author: christo (Chris Alberti)
* Status: Open
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122216] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (3 preceding siblings ...)
2025-05-16 22:18 ` [ruby-core:122158] " ntkme (Natsuki Natsume) via ruby-core
@ 2025-05-21 8:55 ` alanwu (Alan Wu) via ruby-core
2025-05-21 15:53 ` [ruby-core:122219] " christo (Chris Alberti) via ruby-core
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-05-21 8:55 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #21340 has been updated by alanwu (Alan Wu).
I've pushed commit:2297afda7ff3926c51fea700dfbf0f0eb4fea1e5 which I think should resolve build issues without touching the autoconf version.
@ntkme @christo if you have time, please try building with the latest master branch and see if the build issues are resolved. We can get this backported if so.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113363
* Author: christo (Chris Alberti)
* Status: Open
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122219] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (4 preceding siblings ...)
2025-05-21 8:55 ` [ruby-core:122216] " alanwu (Alan Wu) via ruby-core
@ 2025-05-21 15:53 ` christo (Chris Alberti) via ruby-core
2025-05-22 15:19 ` [ruby-core:122234] " alanwu (Alan Wu) via ruby-core
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: christo (Chris Alberti) via ruby-core @ 2025-05-21 15:53 UTC (permalink / raw)
To: ruby-core; +Cc: christo (Chris Alberti)
Issue #21340 has been updated by christo (Chris Alberti).
alanwu (Alan Wu) wrote in #note-5:
> @ntkme @christo if you have time, please try building with the latest master branch and see if the build issues are resolved. We can get this backported if so.
I can confirm this fixes the issue I reported, even when using the `configure` script from the current stable release.
I tested using the 3.4.4 stable release tarball. Built that as-is with GCC 15.1.0 and tried `gem install geoip2_compat` which failed with the same errors. Then I patched over the modified `stdbool.h` with @alanwu's changes from master, rebuilt ruby, and retried `gem install geoip2_compat` now with no errors.
Thanks for looking into this!
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113367
* Author: christo (Chris Alberti)
* Status: Open
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122234] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (5 preceding siblings ...)
2025-05-21 15:53 ` [ruby-core:122219] " christo (Chris Alberti) via ruby-core
@ 2025-05-22 15:19 ` alanwu (Alan Wu) via ruby-core
2025-05-23 21:09 ` [ruby-core:122264] " ntkme (Natsuki Natsume) via ruby-core
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-05-22 15:19 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #21340 has been updated by alanwu (Alan Wu).
Status changed from Open to Closed
Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED
Thanks!
commit:2297afda7ff3926c51fea700dfbf0f0eb4fea1e5 should also work for the 3.3 branch since it also requires VC 2015. #19982
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113383
* Author: christo (Chris Alberti)
* Status: Closed
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122264] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (6 preceding siblings ...)
2025-05-22 15:19 ` [ruby-core:122234] " alanwu (Alan Wu) via ruby-core
@ 2025-05-23 21:09 ` ntkme (Natsuki Natsume) via ruby-core
2025-05-26 17:38 ` [ruby-core:122299] " alanwu (Alan Wu) via ruby-core
2025-06-14 3:14 ` [ruby-core:122529] " nagachika (Tomoyuki Chikanaga) via ruby-core
9 siblings, 0 replies; 11+ messages in thread
From: ntkme (Natsuki Natsume) via ruby-core @ 2025-05-23 21:09 UTC (permalink / raw)
To: ruby-core; +Cc: ntkme (Natsuki Natsume)
Issue #21340 has been updated by ntkme (Natsuki Natsume).
@alanwu I'd like to request 3.2 backport as other GCC 15 fixes have been back ported e.g. https://bugs.ruby-lang.org/issues/21286
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113407
* Author: christo (Chris Alberti)
* Status: Closed
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122299] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (7 preceding siblings ...)
2025-05-23 21:09 ` [ruby-core:122264] " ntkme (Natsuki Natsume) via ruby-core
@ 2025-05-26 17:38 ` alanwu (Alan Wu) via ruby-core
2025-06-14 3:14 ` [ruby-core:122529] " nagachika (Tomoyuki Chikanaga) via ruby-core
9 siblings, 0 replies; 11+ messages in thread
From: alanwu (Alan Wu) via ruby-core @ 2025-05-26 17:38 UTC (permalink / raw)
To: ruby-core; +Cc: alanwu (Alan Wu)
Issue #21340 has been updated by alanwu (Alan Wu).
We can't backport to 3.2 since that would break older Visual Studio versions that it supports.
Maybe we need to bump autoconf for 3.2.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113443
* Author: christo (Chris Alberti)
* Status: Closed
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [ruby-core:122529] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
` (8 preceding siblings ...)
2025-05-26 17:38 ` [ruby-core:122299] " alanwu (Alan Wu) via ruby-core
@ 2025-06-14 3:14 ` nagachika (Tomoyuki Chikanaga) via ruby-core
9 siblings, 0 replies; 11+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2025-06-14 3:14 UTC (permalink / raw)
To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)
Issue #21340 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED to 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED
ruby_3_3 commit:5de0c228a34dc919b663b547f933fb276333fdce merged revision(s) commit:2297afda7ff3926c51fea700dfbf0f0eb4fea1e5.
----------------------------------------
Bug #21340: Bump autoconf version to properly handle C23 bool/stdbool defines
https://bugs.ruby-lang.org/issues/21340#change-113754
* Author: christo (Chris Alberti)
* Status: Closed
* ruby -v: 3.4.3, 3.5.0, any built with GCC 15 (so C23)
* Backport: 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED
----------------------------------------
Right now if I install a recent release using rbenv or asdf, or manually download the latest release 3.4.3 or the preview 3.5.0, the included `./configure` seems to have been generated by an old version of autoconf. After running `./configure`, I end up with a `config.h` containing `HAVE__BOOL = 1`, but _not_ containing `HAVE_STD_BOOL_H = 1`.
If I grab the source from github (latest, or 3.4.3 tag) and run autoconf myself (I'm currently on 2.72), I get a config.h with both `HAVE__BOOL = 1` and `HAVE_STD_BOOL_H = 1` defined.
This ends up meaning that in the official releases, Ruby's internal/stdbool.h skips using <stdbool.h> and moves on to defining bool/true/false itself.
This is not valid as of C23 (which is now default in GCC 15). On my end I found this because I was seeing build failures in the geoip2_compat gem related to issues with the bool type definition on GCC 15. I submitted a patch to the gem's repo for a workaround (include <stdbool.h> before ruby.h), but this might come back to bite other native extension gem compiles as well.
It looks like autoconf was patched to fix the HAVE_STD_BOOL_H define for C23 in [this commit](https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6dcecb780a69bd208088d666b299e92aa7ae7e80;hp=f6657256a37da44c987c04bf9cd75575dfca3b60).
I can tell that the ./configure included in the official ruby releases was created with an older version of autoconf because I still see the line:
```
Check for stdbool.h that conforms to C99
```
rather than the updated version (which appears in my ./configure created with autoconf 2.72)
```
Check for stdbool.h that conforms to C99 or later
```
I'd happily submit a PR if the setup around packaging the official releases is public and someone can point me to it! I wasn't able to find it on a quick search.
---Files--------------------------------
config.h_GCC14 (14.7 KB)
config.h_GCC15 (14.7 KB)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-06-14 3:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-14 16:35 [ruby-core:122101] [Ruby Bug#21340] Bump autoconf version to properly handle C23 bool/stdbool defines christo (Chris Alberti) via ruby-core
2025-05-15 1:16 ` [ruby-core:122111] " nobu (Nobuyoshi Nakada) via ruby-core
2025-05-15 13:45 ` [ruby-core:122119] " christo (Chris Alberti) via ruby-core
2025-05-15 15:31 ` [ruby-core:122120] " alanwu (Alan Wu) via ruby-core
2025-05-16 22:18 ` [ruby-core:122158] " ntkme (Natsuki Natsume) via ruby-core
2025-05-21 8:55 ` [ruby-core:122216] " alanwu (Alan Wu) via ruby-core
2025-05-21 15:53 ` [ruby-core:122219] " christo (Chris Alberti) via ruby-core
2025-05-22 15:19 ` [ruby-core:122234] " alanwu (Alan Wu) via ruby-core
2025-05-23 21:09 ` [ruby-core:122264] " ntkme (Natsuki Natsume) via ruby-core
2025-05-26 17:38 ` [ruby-core:122299] " alanwu (Alan Wu) via ruby-core
2025-06-14 3:14 ` [ruby-core:122529] " nagachika (Tomoyuki Chikanaga) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).