[#123414] [Ruby Bug#21629] Ruby-3.4.7 fails to build using clang / llvm — "debo (David Bohman) via ruby-core" <ruby-core@...>

Issue #21629 has been reported by debo (David Bohman).

18 messages 2025/10/07

[#123433] [Ruby Misc#21630] Suggest @Earlopain for core contributor — "kddnewton (Kevin Newton) via ruby-core" <ruby-core@...>

Issue #21630 has been reported by kddnewton (Kevin Newton).

9 messages 2025/10/08

[#123484] [Ruby Bug#21640] Core Pathname is missing 3 methods / is partially-defined — "Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>

Issue #21640 has been reported by Eregon (Benoit Daloze).

21 messages 2025/10/15

[#123504] [Ruby Bug#21645] Can't `require "resolve"` on Windows under Bundler without warnings — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21645 has been reported by Earlopain (Earlopain _).

9 messages 2025/10/20

[#123506] [Ruby Misc#21646] Propose Luke Gruber as a Ruby committer — "jhawthorn (John Hawthorn) via ruby-core" <ruby-core@...>

Issue #21646 has been reported by jhawthorn (John Hawthorn).

8 messages 2025/10/20

[#123576] [Ruby Bug#21654] Set#new calls extra methods compared to previous versions — "tenderlovemaking (Aaron Patterson) via ruby-core" <ruby-core@...>

Issue #21654 has been reported by tenderlovemaking (Aaron Patterson).

16 messages 2025/10/29

[#123582] [Ruby Bug#21655] segfault when building 3.3.10, regression from 3.3.9 — "kurly (Greg Kubaryk) via ruby-core" <ruby-core@...>

Issue #21655 has been reported by kurly (Greg Kubaryk).

15 messages 2025/10/29

[#123586] [Ruby Misc#21656] Exclude dependabot PRs from automated gem release notes — "Earlopain (Earlopain _) via ruby-core" <ruby-core@...>

Issue #21656 has been reported by Earlopain (Earlopain _).

8 messages 2025/10/29

[#123595] [Ruby Misc#21657] Question: Is Ruby 4.0 planned for December 2025 or later? — "dmitry.pogrebnoy (Dmitry Pogrebnoy) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNjU3IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGRtaXRyeS5wb2dyZWJub3kgKERtaXRy

22 messages 2025/10/29

[#123626] [Ruby Bug#21659] rstring.h error: missing initializer for field ‘len’ of ‘struct RString’ [-Werror=missing-field-initializers] starting in ruby-3.3.10 — "wsfulton (William Fulton) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNjU5IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHdzZnVsdG9uIChXaWxsaWFtIEZ1bHRv

10 messages 2025/10/31

[ruby-core:123421] [Ruby Bug#21629] Ruby-3.4.7 fails to build using clang / llvm

From: "k0kubun (Takashi Kokubun) via ruby-core" <ruby-core@...>
Date: 2025-10-07 23:18:27 UTC
List: ruby-core #123421
Issue #21629 has been updated by k0kubun (Takashi Kokubun).

File ruby-log-2.txt added
Status changed from Open to Feedback

> Attaching the build log for ruby-3.4.7.

Could you also include the logs of configure and the commands you ran (both configure and make)? As an example, I've attached mine.

As attached in the log, it succeeded with llvm-21. So this is not necessarily and issue of Ruby 3.4.7 with LLVM 21 on macOS. As such, I strongly encourage you to test it after upgrading your macOS to a non-EOL version.

----------------------------------------
Bug #21629: Ruby-3.4.7 fails to build using clang / llvm
https://bugs.ruby-lang.org/issues/21629#change-114788

* Author: debo (David Bohman)
* Status: Feedback
* ruby -v: ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-darwin16]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Here is the error I encountered. This is using clang version 21.1.3 as the compiler toolchain on Darwin.

```
DYLD_LIBRARY_PATH=.:../../.. ASAN_OPTIONS=detect_leaks=0 "clang -I../../../.ext/include/x86_64-darwin16 -I../../../../ruby-3.4.7/include -I../../../../ruby-3.4.7/ext/-test-/public_header_warnings -I/usr/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fdeclspec  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef  -fno-common -pipe  -D_TEST_OK -Werror -c conftest.c"
In file included from conftest.c:1:
In file included from ../../../../ruby-3.4.7/include/ruby.h:38:
In file included from ../../../../ruby-3.4.7/include/ruby/ruby.h:28:
In file included from ../../../../ruby-3.4.7/include/ruby/internal/arithmetic.h:24:
In file included from ../../../../ruby-3.4.7/include/ruby/internal/arithmetic/char.h:29:
../../../../ruby-3.4.7/include/ruby/internal/core/rstring.h:398:24: error: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
../../../../ruby-3.4.7/include/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */
```

The configuration is the following:

```
CC=clang CXX=clang++ CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ../ruby-3.4.7/configure --enable-shared --with-rdoc=ri,html
```


---Files--------------------------------
ruby-log.txt (432 KB)
ruby-log-2.txt (372 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/


In This Thread