Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945643 - dev-lang/ruby-3.3.6-r1 - [gcc-15] console.c: error: static declaration of rb_io_closed_p follows non-static declaration
Summary: dev-lang/ruby-3.3.6-r1 - [gcc-15] console.c: error: static declaration of rb_...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: lto c23-porting
  Show dependency tree
 
Reported: 2024-12-01 17:36 UTC by Toralf Förster
Modified: 2025-04-25 17:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.24 KB, text/plain)
2024-12-01 17:36 UTC, Toralf Förster
Details
dev-lang:ruby-3.3.6-r1:20241201-171634.log.xz (dev-lang:ruby-3.3.6-r1:20241201-171634.log.xz,19.57 KB, application/x-xz)
2024-12-01 17:36 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,5.61 KB, text/plain)
2024-12-01 17:36 UTC, Toralf Förster
Details
environment (environment,108.76 KB, text/plain)
2024-12-01 17:36 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,21.41 KB, application/x-xz)
2024-12-01 17:36 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,355.11 KB, application/x-xz)
2024-12-01 17:36 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,32.50 KB, text/plain)
2024-12-01 17:36 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,26.07 KB, application/x-xz)
2024-12-01 17:36 UTC, Toralf Förster
Details
lazy fix (ruby-3.3.7-r1-fix-mismatched-static.patch,1.93 KB, patch)
2025-04-06 17:47 UTC, Paul Zander
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-12-01 17:36:25 UTC
 1408 |     fptr->mode |= mode;
      |     ^~~~
../../.././include/ruby/io.h:158:9: note: declared here
  158 |     int mode;
      |         ^~~~
console.c: At top level:
console.c:1417:1: error: static declaration of rb_io_closed_p follows non-static declaration
 1417 | rb_io_closed_p(VALUE io)
      | ^~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_abi32+64-20241201-114734

  UNMASKED:
  <sys-devel/gcc-15.0.9999:15

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-15 *
llvm-config: Python 3.12.7
Available Ruby profiles:
  [1]   ruby32 *
Available Rust versions:
  [1]   rust-bin-1.83.0 *

  HEAD of ::gentoo
commit 6113d4e0b1658b78177b813ccad78aac266f506c
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Dec 1 14:48:32 2024 +0000

    2024-12-01 14:48:31 UTC

emerge -qpvO =dev-lang/ruby-3.3.6-r1
[ebuild  NS   ] dev-lang/ruby-3.3.6-r1 [3.2.6-r2] USE="gdbm jit ssl -berkdb -debug -doc -examples (-jemalloc) -socks5 (-static-libs) -systemtap -tk -valgrind -xemacs"
Comment 1 Toralf Förster gentoo-dev 2024-12-01 17:36:25 UTC
Created attachment 912981 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-12-01 17:36:26 UTC
Created attachment 912982 [details]
dev-lang:ruby-3.3.6-r1:20241201-171634.log.xz
Comment 3 Toralf Förster gentoo-dev 2024-12-01 17:36:27 UTC
Created attachment 912983 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2024-12-01 17:36:28 UTC
Created attachment 912984 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-12-01 17:36:29 UTC
Created attachment 912985 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-12-01 17:36:31 UTC
Created attachment 912986 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-12-01 17:36:32 UTC
Created attachment 912987 [details]
qlist-info.txt
Comment 8 Toralf Förster gentoo-dev 2024-12-01 17:36:33 UTC
Created attachment 912988 [details]
temp.tar.xz
Comment 9 Paul Zander 2025-04-06 17:47:42 UTC
Created attachment 923644 [details, diff]
lazy fix

Lazy way of fixing it by making everything static. Works for me for 3.3.7-r1
Comment 10 tdr 2025-04-06 20:06:34 UTC
The provided patch work for both 3.3 and 3.4 slots
(fails applying to earlier slots)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-25 16:04:35 UTC
There was https://github.com/ruby/ruby/commit/e9ba334fd1655c09ad30030773f43e3b710a4a91 but that's not it.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-25 16:08:11 UTC
I don't really get how I didn't hit this (or why it hasn't shown up upstream).
Comment 14 Hans de Graaff gentoo-dev Security 2025-04-25 17:21:20 UTC
It can be reproduced with the CFLAGS thoralf used:  "-Werror=lto-type-mismatch -Werror=strict-aliasing -Werror=odr -flto".
Comment 15 Larry the Git Cow gentoo-dev 2025-04-25 17:36:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a489c482123d205d65a1c604bcaeb1eb49aee8f7

commit a489c482123d205d65a1c604bcaeb1eb49aee8f7
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2025-04-25 17:35:02 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2025-04-25 17:36:32 +0000

    dev-lang/ruby: use -std=gnu17
    
    This avoids a compilation issue in ext/io/console.c when using certain
    CFLAGS.
    
    Bug: https://bugs.gentoo.org/945643
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-lang/ruby/ruby-3.3.8.ebuild | 4 ++++
 dev-lang/ruby/ruby-3.4.3.ebuild | 4 ++++
 2 files changed, 8 insertions(+)