From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "mame (Yusuke Endoh)" <noreply@ruby-lang.org>
Subject: [ruby-core:123300] [Ruby Bug#21611] Ruby 3.4.6 can't be built with GCC 15.2.1
Date: Fri, 19 Sep 2025 11:20:50 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-114666.20250919112050.12374@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-21611.20250919110701.12374@ruby-lang.org>
Issue #21611 has been updated by mame (Yusuke Endoh).
Please do not omit the error log.
----------------------------------------
Bug #21611: Ruby 3.4.6 can't be built with GCC 15.2.1
https://bugs.ruby-lang.org/issues/21611#change-114666
* Author: watson1978 (Shizuo Fujita)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Arch Linux provides GCC 15.2.1.
https://archlinux.org/packages/core/x86_64/gcc/
When I build Ruby 3.4.6 with GCC 15.2.1, it cause error:
### How to Reproduce
Here is a Dockerfile to reproduce the error:
```
FROM archlinux:latest
RUN pacman -Syu --noconfirm
RUN pacman -S --noconfirm curl base-devel libffi zlib openssl readline libyaml
RUN curl -O https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.6.tar.gz
RUN tar -xvzf ruby-3.4.6.tar.gz
RUN cd ruby-3.4.6 && ./configure && make -j && make install
```
Then, run `docker build -t ruby . --platform=linux/amd64` command to reproduce the error.
```
$ docker build -t ruby . --platform=linux/amd64
[+] Building 362.6s (9/9) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 332B 0.0s
=> [internal] load metadata for docker.io/library/archlinux:latest 0.3s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/6] FROM docker.io/library/archlinux:latest@sha256:8fe9851fcd8bd23ea0e6bfa99483d8778e40b45e0fd7bb8188c94cbdd8c25a38 0.0s
=> => resolve docker.io/library/archlinux:latest@sha256:8fe9851fcd8bd23ea0e6bfa99483d8778e40b45e0fd7bb8188c94cbdd8c25a38 0.0s
=> CACHED [2/6] RUN pacman -Syu --noconfirm 0.0s
=> [3/6] RUN pacman -S --noconfirm curl base-devel libffi zlib openssl readline libyaml 24.4s
=> [4/6] RUN curl -O https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.6.tar.gz 1.2s
=> [5/6] RUN tar -xvzf ruby-3.4.6.tar.gz 1.1s
=> ERROR [6/6] RUN cd ruby-3.4.6 && ./configure && make -j && make install 335.5s
------
> [6/6] RUN cd ruby-3.4.6 && ./configure && make -j && make install:
0.765 checking for ruby... false
0.888 checking build system type... x86_64-pc-linux-gnu
1.452 checking host system type... x86_64-pc-linux-gnu
1.452 checking target system type... x86_64-pc-linux-gnu
...
288.3 compiling enc/ascii.c
300.8 gcc: fatal error: Killed signal terminated program cc1
301.1 compilation terminated.
301.2 gcc: fatal error: Killed signal terminated program cc1
301.2 compilation terminated.
301.5 make: *** [Makefile:489: complex.o] Error 1
301.5 In file included from ./include/ruby/internal/assume.h:29,
301.5 from ./include/ruby/backward/2/assume.h:24,
301.5 from ./include/ruby/defines.h:72,
301.5 from ./include/ruby/ruby.h:25,
301.5 from ./include/ruby/encoding.h:19,
301.5 from encindex.h:14,
301.5 from compile.c:19:
301.5 compile.c: In function ‘ibf_load_catch_table’:
301.6 make: *** Waiting for unfinished jobs....
301.6 make: *** [Makefile:489: io.o] Error 1
301.7 compile.c:13163:39: warning: taking address of packed member of ‘struct iseq_catch_table’ may result in an unaligned pointer value [-Waddress-of-packed-member]
301.7 13163 | RB_OBJ_WRITE(parent_iseq, &table->entries[i].iseq, catch_iseq);
301.7 ./include/ruby/internal/cast.h:31:29: note: in definition of macro ‘RBIMPL_CAST’
301.7 31 | # define RBIMPL_CAST(expr) (expr)
301.7 | ^~~~
301.7 compile.c:13163:13: note: in expansion of macro ‘RB_OBJ_WRITE’
301.7 13163 | RB_OBJ_WRITE(parent_iseq, &table->entries[i].iseq, catch_iseq);
301.7 | ^~~~~~~~~~~~
301.8 gcc: fatal error: Killed signal terminated program cc1
301.8 compilation terminated.
301.9 make: *** [Makefile:489: process.o] Error 1
309.6 gcc: fatal error: Killed signal terminated program cc1
309.6 compilation terminated.
309.6 make: *** [Makefile:489: vm.o] Error 1
313.7 gcc: fatal error: Killed signal terminated program cc1
313.7 compilation terminated.
313.7 make: *** [Makefile:489: string.o] Error 1
334.5 At top level:
334.5 cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
334.5 cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
334.5 cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
------
Dockerfile:7
--------------------
5 | RUN curl -O https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.6.tar.gz
6 | RUN tar -xvzf ruby-3.4.6.tar.gz
7 | >>> RUN cd ruby-3.4.6 && ./configure && make -j && make install
8 |
--------------------
ERROR: failed to build: failed to solve: ResourceExhausted: process "/bin/sh -c cd ruby-3.4.6 && ./configure && make -j && make install" did not complete successfully: cannot allocate memory
```
--
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/
next prev parent reply other threads:[~2025-09-19 11:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 11:07 [ruby-core:123299] " watson1978 (Shizuo Fujita) via ruby-core
2025-09-19 11:20 ` mame (Yusuke Endoh) via ruby-core [this message]
2025-09-19 11:22 ` [ruby-core:123301] " watson1978 (Shizuo Fujita) via ruby-core
2025-09-19 12:00 ` [ruby-core:123302] " nobu (Nobuyoshi Nakada) via ruby-core
2025-09-29 21:31 ` [ruby-core:123340] " k0kubun (Takashi Kokubun) via ruby-core
2025-10-05 0:45 ` [ruby-core:123393] " nagachika (Tomoyuki Chikanaga) via ruby-core
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-114666.20250919112050.12374@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).