Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899630 - dev-lang/ruby-3.2.1 failed to emerge (make: *** [uncommon.mk:1216: builtin_binary.inc] Segmentation fault (core dumped))
Summary: dev-lang/ruby-3.2.1 failed to emerge (make: *** [uncommon.mk:1216: builtin_bi...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-05 05:04 UTC by Leonid Kopylov
Modified: 2023-04-10 04:59 UTC (History)
0 users

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


Attachments
build.log (build.log,75.68 KB, text/plain)
2023-03-05 05:05 UTC, Leonid Kopylov
Details
build.log (build.log,75.68 KB, text/plain)
2023-03-05 15:04 UTC, Leonid Kopylov
Details
build.log (build.log,77.17 KB, text/plain)
2023-03-05 15:23 UTC, Leonid Kopylov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Kopylov 2023-03-05 05:04:20 UTC
# emerge -pqv '=dev-lang/ruby-3.2.1::gentoo'
[ebuild  NS   ] dev-lang/ruby-3.2.1 [2.7.7, 3.0.5, 3.1.3] USE="berkdb doc examples gdbm ipv6 jemalloc rdoc ssl tk xemacs -debug -jit -socks5 -static-libs -systemtap"

# emerge --info '=dev-lang/ruby-3.2.1::gentoo'
Portage 3.0.45.2 (python 3.10.10-final-0, default/linux/arm64/17.0/desktop/gnome/systemd/merged-usr, gcc-12, glibc-2.36-r7, 6.2.2-gentoo-arm64 aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.2.2-gentoo-arm64-aarch64-with-glibc2.36
KiB Mem:    32818088 total,  28854084 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Sun, 05 Mar 2023 04:30:01 +0000
Head commit of repository gentoo: 753aa360d46abbdface9d41803ece5f546a4118a
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p2) 2.40.0
ccache version 4.7.4 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.10_p2::gentoo, 3.11.2_p1::gentoo
dev-lang/rust:             1.67.1::gentoo
dev-util/ccache:           4.7.4::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.40-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo, 15.0.7::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://server.kopylovs.net/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA android AnyDesk-TOS geekbench Microsoft-vscode TeamViewer Vivaldi"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fomit-frame-pointer"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="https://mirror.isoc.org.il/pub/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aalib accessibility acl acpi activities alsa ao appindicator archive arm64 aspell audit bash-completion berkdb bidi bluetooth bluray boost branding brotli btrfs bzip2 cairo cdda cddb cdio cdr cgi cli colord contrib cron crypt cryptsetup cups curl dbi dbus designer device-mapper djvu doc dri dts dv dvb dvdr eds emacs enchant encode evdev evo examples executable exif expat experimental extra extras fam fastcgi fbcon ffmpeg fftw flac fluidsynth fontconfig fontforge fortran freetds ftp fuse games gcrypt gd gdbm gdk-pixbuf geoip geolocation gif git glade glib glusterfs gme gmp gnome gnome-keyring gnome-online-accounts gnuplot gnutls go gpg gphoto2 gpm graphite graphviz gsm gssapi gstreamer gtk gtk-doc gtk3 gui guile harfbuzz hdf5 heif highlight hscolour html http http2 ibus iconv icu idn imagemagick imap imlib introspection iodbc ipv6 jack java javascript jbig jemalloc jpeg jpeg2k jpegxl json kde kerberos ladspa lame latex lcms ldap libass libcaca libevent libglvnd libnotify libsamplerate libsecret libtirpc libxml2 lmdb lua lv2 lvm lz4 lzma lzo mad magic maildir man mbedtls mbox memcached midi mmap mng modplug mp3 mp4 mpeg mplayer mtp multimedia musepack mysql nas nautilus ncurses netlink nettle network networkmanager nfs nls nptl nss ntlm odbc offensive ogg openal openexr opengl openmp openssl opus pam pango pcap pcre pdf perl phonon pkcs11 plasma plugins png policykit portaudio postgres postscript ppds pulseaudio python qdbm qml qrcode qt5 raw rdma readline redis rss samba sasl screencast sctp sdl seccomp semantic-desktop sftp share skey smp smtp snappy sndfile sndio snmp sound source sox speech speex spell sql sqlite ssh ssl startup-notification svg symlink syslog systemd taglib tbb tcl telemetry telepathy test-rust theora threads tiff tk tools tracker tremor truetype twolame udev udisks unicode unwind upnp upower usb utils uuid v4l vala vcd vim-syntax vnc vorbis vpx wavpack wayland webengine webkit webp websockets widgets wmf wxwidgets x264 x265 xattr xcb xface xft xinerama xml xmp xpm xscreensaver xv xvid yaml zeroconf zip zlib zsh-completion zstd" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words stage" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en en-US he ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30 ruby31 ruby32" USERLAND="GNU" VIDEO_CARDS="virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Leonid Kopylov 2023-03-05 05:05:03 UTC
Created attachment 856140 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 05:50:33 UTC
/usr/bin/ruby --disable=gems  -r./aarch64-linux-fake ./enc/make_encmake.rb \
  --builtin-encs="enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o" --builtin-transes="enc/trans/newline.o" --module  enc.mk
/usr/bin/ruby --disable=gems  "./tool/generic_erb.rb" -o verconf.h ./template/verconf.h.tmpl
make: *** [uncommon.mk:1216: builtin_binary.inc] Segmentation fault (core dumped)
make: *** Waiting for unfinished jobs....
verconf.h [31;1mupdated[m
encdb.h [31;1mupdated[m
 * ERROR: dev-lang/ruby-3.2.1::gentoo failed (compile phase):
 *   emake failed
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 05:52:59 UTC
What page size is your kernel? IIRC Asahi decided to only support one but I'm not an expert on this so could be wrong, but https://github.com/ruby/ruby/commit/b78f871d838c168789648738e5c67b071beb8a19 seems interesting.
Comment 4 Leonid Kopylov 2023-03-05 06:00:54 UTC
(In reply to Sam James from comment #3)
> What page size is your kernel? IIRC Asahi decided to only support one but
> I'm not an expert on this so could be wrong, but
> https://github.com/ruby/ruby/commit/b78f871d838c168789648738e5c67b071beb8a19
> seems interesting.

how do i find it?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 06:02:30 UTC
zgrep CONFIG_ARM64_*_PAGES /proc/config.gz
Comment 6 Leonid Kopylov 2023-03-05 06:04:11 UTC
(In reply to Sam James from comment #5)
> zgrep CONFIG_ARM64_*_PAGES /proc/config.gz

CONFIG_ARM64_4K_PAGES=y
# CONFIG_ARM64_16K_PAGES is not set
# CONFIG_ARM64_64K_PAGES is not set
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 06:10:25 UTC
Thanks.

You're using systemd, so this should be easyish - could you try get me a backtrace from the coredump? See https://wiki.gentoo.org/wiki/GDB#Enabling_core_dumps. You might need to follow the steps on that page, then you can try 'coredumpctl' and see the Ruby process, then 'coredumpctl debug <the PID of the ruby one>', then type 'bt', and share the output.
Comment 8 Leonid Kopylov 2023-03-05 06:16:28 UTC
(In reply to Sam James from comment #7)
> Thanks.
> 
> You're using systemd, so this should be easyish - could you try get me a
> backtrace from the coredump? See
> https://wiki.gentoo.org/wiki/GDB#Enabling_core_dumps. You might need to
> follow the steps on that page, then you can try 'coredumpctl' and see the
> Ruby process, then 'coredumpctl debug <the PID of the ruby one>', then type
> 'bt', and share the output.

i should run 'emerge ruby:3.2' inside gdb?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 06:26:04 UTC
Can you try running 'coredumpctl' first (no gdb involved) and check if there's a Ruby thing at the bottom of the list with a coredump present?
Comment 10 Leonid Kopylov 2023-03-05 06:26:55 UTC
(In reply to Sam James from comment #9)
> Can you try running 'coredumpctl' first (no gdb involved) and check if
> there's a Ruby thing at the bottom of the list with a coredump present?

# coredumpctl
TIME                          PID UID GID SIG     COREFILE EXE                                                            SIZE
Sun 2023-03-05 07:01:25 IST 80060 250 250 SIGSEGV present  /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K
Sun 2023-03-05 07:03:02 IST 88210 250 250 SIGSEGV present  /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K
Comment 11 Hans de Graaff gentoo-dev Security 2023-03-05 08:15:07 UTC
(In reply to Sam James from comment #3)
> What page size is your kernel? IIRC Asahi decided to only support one but
> I'm not an expert on this so could be wrong, but
> https://github.com/ruby/ruby/commit/b78f871d838c168789648738e5c67b071beb8a19
> seems interesting.

In the report the "jit" USE flag is turned off so YJIT should not have been included.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 08:17:57 UTC
(In reply to Leonid Kopylov from comment #10)
> (In reply to Sam James from comment #9)
> > Can you try running 'coredumpctl' first (no gdb involved) and check if
> > there's a Ruby thing at the bottom of the list with a coredump present?
> 
> # coredumpctl
> TIME                          PID UID GID SIG     COREFILE EXE              
> SIZE
> Sun 2023-03-05 07:01:25 IST 80060 250 250 SIGSEGV present 
> /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K
> Sun 2023-03-05 07:03:02 IST 88210 250 250 SIGSEGV present 
> /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K

Can you run: coredumpctl debug 88210, then when it opens gdb, type 'bt', then share the output?
Comment 13 Leonid Kopylov 2023-03-05 08:19:50 UTC
(In reply to Sam James from comment #12)
> (In reply to Leonid Kopylov from comment #10)
> > (In reply to Sam James from comment #9)
> > > Can you try running 'coredumpctl' first (no gdb involved) and check if
> > > there's a Ruby thing at the bottom of the list with a coredump present?
> > 
> > # coredumpctl
> > TIME                          PID UID GID SIG     COREFILE EXE              
> > SIZE
> > Sun 2023-03-05 07:01:25 IST 80060 250 250 SIGSEGV present 
> > /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K
> > Sun 2023-03-05 07:03:02 IST 88210 250 250 SIGSEGV present 
> > /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby 74.1K
> 
> Can you run: coredumpctl debug 88210, then when it opens gdb, type 'bt',
> then share the output?

# coredumpctl debug 88210
           PID: 88210 (miniruby)
           UID: 250 (portage)
           GID: 250 (portage)
        Signal: 11 (SEGV)
     Timestamp: Sun 2023-03-05 07:03:02 IST (3h 15min ago)
  Command Line: ./miniruby -I./lib -I. -I.ext/common ./tool/generic_erb.rb -o builtin_binary.inc ./template/builtin_binary.inc.tmpl -- --cross=no
    Executable: /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby
 Control Group: /user.slice/user-1000.slice/session-5.scope
          Unit: session-5.scope
         Slice: user-1000.slice
       Session: 5
     Owner UID: 1000 (leonid)
       Boot ID: 5f9ea54a76894f20ba72cda5a90a97a9
    Machine ID: e8305d629178fe76afb239ff63fe4a1d
      Hostname: localhost
       Storage: /var/lib/systemd/coredump/core.miniruby.250.5f9ea54a76894f20ba72cda5a90a97a9.88210.1677992582000000.zst (present)
  Size on Disk: 74.1K
       Message: Process 88210 (miniruby) of user 250 dumped core.

                Module /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby without build-id.
                Module /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby
                Module libgcc_s.so.1 without build-id.
                Module libstdc++.so.6 without build-id.
                Module libc.so.6 without build-id.
                Module libm.so.6 without build-id.
                Module libcrypt.so.2 without build-id.
                Module libgmp.so.10 without build-id.
                Module libjemalloc.so.2 without build-id.
                Module libz.so.1 without build-id.
                Module libsandbox.so without build-id.
                Stack trace of thread 320:
                #0  0x0020aaaabf3fd2f8 n/a (n/a + 0x0)
                #1  0x0000aaaabf3fd2f8 n/a (/var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby + 0x2d2f8)
                #2  0x001affff88c27400 n/a (n/a + 0x0)
                #3  0x0000ffff88c274d8 __libc_start_main (libc.so.6 + 0x274d8)
                ELF object binary architecture: AARCH64

GNU gdb (Gentoo 13.1 vanilla) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby...
(No debugging symbols found in /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/miniruby)
[New LWP 320]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `./miniruby -I./lib -I. -I.ext/common ./tool/generic_erb.rb -o builtin_binary.in'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0020aaaabf3fd2f8 in ?? ()
(gdb) bt
#0  0x0020aaaabf3fd2f8 in ?? ()
#1  0x000000000000000a in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 08:23:56 UTC
OK, not super useful (not your fault).

graaff, could you give leonid some brief instructions to build-but-not-install ruby manually so we can just verify it's not ebuild/sandbox related, then we can get him to report it upstream?
Comment 15 Hans de Graaff gentoo-dev Security 2023-03-05 08:33:56 UTC
(In reply to Sam James from comment #14)
 
> graaff, could you give leonid some brief instructions to
> build-but-not-install ruby manually so we can just verify it's not
> ebuild/sandbox related, then we can get him to report it upstream?

Use "ebuild ruby-3.2.1.ebuild install" ?  That runs as a normal user and as far as I know avoids the sandbox.

Otherwise, if you want to skip the ebuild completely I guess a "./configure; make" in the source should work. Haven't done that in a long time. :-)
Comment 16 Leonid Kopylov 2023-03-05 08:36:47 UTC
(In reply to Hans de Graaff from comment #15)
> (In reply to Sam James from comment #14)
>  
> > graaff, could you give leonid some brief instructions to
> > build-but-not-install ruby manually so we can just verify it's not
> > ebuild/sandbox related, then we can get him to report it upstream?
> 
> Use "ebuild ruby-3.2.1.ebuild install" ?  That runs as a normal user and as
> far as I know avoids the sandbox.
> 
> Otherwise, if you want to skip the ebuild completely I guess a "./configure;
> make" in the source should work. Haven't done that in a long time. :-)

it fails
=> ebuild /var/db/repos/gentoo/dev-lang/ruby/ruby-3.2.1.ebuild install
>>> Existing ${T}/environment for 'ruby-3.2.1' will be sourced. Run
>>> 'clean' to start with a fresh environment.
>>> Checking ruby-3.2.1.tar.xz's mtime...
>>> WORKDIR is up-to-date, keeping...
 * checking ebuild checksums ;-) ...                                                                                                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                        [ ok ]
>>> It appears that 'setup' has already executed for 'ruby-3.2.1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/ruby-3.2.1/.setuped' to force setup.
>>> It appears that 'unpack' has already executed for 'ruby-3.2.1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/ruby-3.2.1/.unpacked' to force unpack.
>>> It appears that 'prepare' has already executed for 'ruby-3.2.1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/ruby-3.2.1/.prepared' to force prepare.
>>> It appears that 'configure' has already executed for 'ruby-3.2.1'; skipping.
>>> Remove '/var/tmp/portage/dev-lang/ruby-3.2.1/.configured' to force configure.
>>> Compiling source in /var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1 ...
make -j6 V=1 'EXTLDFLAGS=-Wl,-O1 -Wl,--as-needed' 'MJIT_CFLAGS=-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fno-strict-aliasing' MJIT_OPTFLAGS= MJIT_DEBUGFLAGS=
        BASERUBY = /usr/bin/ruby --disable=gems
        CC = aarch64-unknown-linux-gnu-gcc
        LD = aarch64-unknown-linux-gnu-ld
        LDSHARED = aarch64-unknown-linux-gnu-gcc -shared
        CFLAGS = -march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fno-strict-aliasing -fPIC
        XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mbranch-protection=pac-ret -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/aarch64-linux -I./include -I. -I./enc/unicode/15.0.0
        CPPFLAGS =
        DLDFLAGS = -Wl,-O1 -Wl,--as-needed -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby32.so.3.2  -fstack-protector-strong -Wl,-O1 -Wl,--as-needed
        SOLIBS =  -lz -lrt -lrt -ljemalloc -lgmp -ldl -lcrypt -lm -lpthread
        LANG = en_US.utf8
        LC_ALL =
        LC_CTYPE = en_US.UTF-8
        MFLAGS = -j6 --jobserver-auth=fifo:/var/tmp/portage/dev-lang/ruby-3.2.1/temp/GMfifo26
        RUSTC = rustc
        YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C opt-level=3 -C overflow-checks=on '--out-dir=/var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1/yjit/target/release/' ./yjit/src/lib.rs
/usr/bin/ruby --disable=gems ./tool/file2lastrev.rb -q --revision.h --srcdir="." --output=revision.h --timestamp=.revision.time
aarch64-unknown-linux-gnu-gcc (Gentoo 12.2.1_p20230121-r1 p10) 12.2.1 20230121
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

aarch64-unknown-linux-gnu-gcc -march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fno-strict-aliasing -fPIC  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mbranch-protection=pac-ret -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/aarch64-linux -I./include -I. -I./enc/unicode/15.0.0     -o loadpath.o -c loadpath.c
revision.h unchanged
./miniruby -I./lib -I. -I.ext/common  ./tool/generic_erb.rb -o builtin_binary.inc \
        ./template/builtin_binary.inc.tmpl -- --cross=no
/usr/bin/ruby --disable=gems  -r./aarch64-linux-fake ./enc/make_encmake.rb \
  --builtin-encs="enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o" --builtin-transes="enc/trans/newline.o" --module  enc.mk
make: *** [uncommon.mk:1216: builtin_binary.inc] Segmentation fault (core dumped)
make: *** Waiting for unfinished jobs....
 * ERROR: dev-lang/ruby-3.2.1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-lang/ruby-3.2.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/ruby-3.2.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/ruby-3.2.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/ruby-3.2.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1'
 * S: '/var/tmp/portage/dev-lang/ruby-3.2.1/work/ruby-3.2.1'
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 14:51:50 UTC
OK, can you try:
1. wget https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
2. untar it somewhere temporary like /tmp/ruby
3. ./configure && make -j $(nproc)
4. If that fails, report it upstream and link it here?
Comment 18 Leonid Kopylov 2023-03-05 14:57:00 UTC
(In reply to Sam James from comment #17)
> OK, can you try:
> 1. wget https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
> 2. untar it somewhere temporary like /tmp/ruby
> 3. ./configure && make -j $(nproc)
> 4. If that fails, report it upstream and link it here?

it seams that is succeeded?? what does it mean?


linking ruby
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1'
make[1]: Leaving directory '/tmp/ruby/ruby-3.2.1'
make[1]: Entering directory '/tmp/ruby/ruby-3.2.1'
make[1]: Nothing to be done for 'note'.
make[1]: Leaving directory '/tmp/ruby/ruby-3.2.1'
Generating RDoc documentation
Parsing sources...
100% [998/998]  yjit.rb

Generating RI format into /tmp/ruby/ruby-3.2.1/.ext/rdoc...

  Files:        998

  Classes:     1031 ( 274 undocumented)
  Modules:      214 (  66 undocumented)
  Constants:   2283 ( 632 undocumented)
  Attributes:  1035 ( 329 undocumented)
  Methods:     9790 (2288 undocumented)

  Total:      14353 (3589 undocumented)
   74.99% documented

  Elapsed: 13.7s
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:00:45 UTC
Could you upload the ebuild's bad build.log again? It looks like a little bit of it is missing at the top(?) -- I want to know the configure args the ebuild uses on your system, so we can try it for the manual build.
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:02:25 UTC
(In reply to Sam James from comment #19)
> Could you upload the ebuild's bad build.log again? It looks like a little
> bit of it is missing at the top(?) -- I want to know the configure args the
> ebuild uses on your system, so we can try it for the manual build.

(the line I need is like: "econf ...")
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:02:58 UTC
(In reply to Sam James from comment #20)
> (In reply to Sam James from comment #19)
> > Could you upload the ebuild's bad build.log again? It looks like a little
> > bit of it is missing at the top(?) -- I want to know the configure args the
> > ebuild uses on your system, so we can try it for the manual build.
> 
> (the line I need is like: "econf ...")

or ./configure ... actually
Comment 22 Leonid Kopylov 2023-03-05 15:04:44 UTC
Created attachment 856212 [details]
build.log
Comment 23 Leonid Kopylov 2023-03-05 15:05:32 UTC
(In reply to Leonid Kopylov from comment #22)
> Created attachment 856212 [details]
> build.log

tried to rebuild again - same issue
Comment 24 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:11:35 UTC
Weird. I'll just figure it out manually from:
 * USE:        arm64 berkdb doc elibc_glibc examples gdbm ipv6 jemalloc kernel_linux rdoc ssl tk userland_GNU xemacs

ok, try manually:
./configure --enable-shared --enable-pthread --disable-rpath --disable-jit-support --disable-yjit
Comment 25 Leonid Kopylov 2023-03-05 15:12:55 UTC
(In reply to Sam James from comment #24)
> Weird. I'll just figure it out manually from:
>  * USE:        arm64 berkdb doc elibc_glibc examples gdbm ipv6 jemalloc
> kernel_linux rdoc ssl tk userland_GNU xemacs
> 
> ok, try manually:
> ./configure --enable-shared --enable-pthread --disable-rpath
> --disable-jit-support --disable-yjit

on ebuild itself or for tar i downloaded?
Comment 26 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:13:40 UTC
(In reply to Leonid Kopylov from comment #25)
> (In reply to Sam James from comment #24)
> > Weird. I'll just figure it out manually from:
> >  * USE:        arm64 berkdb doc elibc_glibc examples gdbm ipv6 jemalloc
> > kernel_linux rdoc ssl tk userland_GNU xemacs
> > 
> > ok, try manually:
> > ./configure --enable-shared --enable-pthread --disable-rpath
> > --disable-jit-support --disable-yjit
> 
> on ebuild itself or for tar i downloaded?

ah, sorry, for tar you downloaded
Comment 27 Leonid Kopylov 2023-03-05 15:16:49 UTC
configure:

Configuration summary for ruby version 3.2.1

   * Installation prefix: /usr/local
   * exec prefix:         ${prefix}
   * arch:                aarch64-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            gcc
   * with thread:         pthread
   * with coroutine:      arm64
   * enable shared libs:  yes
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers \
                          -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value \
                          -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
   * strip command:       strip -S -x
   * install doc:         rdoc
   * MJIT support:        no
   * YJIT support:        no
   * man page type:       doc
   * BASERUBY -v:         ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [aarch64-linux]
Comment 28 Leonid Kopylov 2023-03-05 15:16:59 UTC
make: 

make[2]: Entering directory '/tmp/ruby/ruby-3.2.1/.bundle/gems/debug-1.7.1/ext/debug'
compiling debug.c
compiling iseq_collector.c
compiling ossl_ts.c
linking shared-object debug/debug.so
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot open output file ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:317: ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so] Error 1
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/.bundle/gems/debug-1.7.1/ext/debug'
make[1]: *** [exts.mk:301: .bundle/gems/debug-1.7.1/ext/debug/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling ossl_x509.c
compiling ifaddr.c
compiling ossl_x509attr.c
linking shared-object socket.so
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/socket'
compiling ossl_x509cert.c
compiling ossl_x509crl.c
compiling ossl_x509ext.c
linking shared-object zlib.so
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/zlib'
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
linking shared-object openssl.so
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/ripper'
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/openssl'
make[1]: Leaving directory '/tmp/ruby/ruby-3.2.1'
make: *** [uncommon.mk:331: build-ext] Error 2
Comment 29 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:17:52 UTC
Try ./configure --enable-pthread --disable-jit-support --disable-yjit --disable-debug
Comment 30 Leonid Kopylov 2023-03-05 15:20:44 UTC



configure:
Configuration summary for ruby version 3.2.1

   * Installation prefix: /usr/local
   * exec prefix:         ${prefix}
   * arch:                aarch64-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            gcc
   * with thread:         pthread
   * with coroutine:      arm64
   * enable shared libs:  no
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers \
                          -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value \
                          -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
   * strip command:       strip -S -x
   * install doc:         rdoc
   * MJIT support:        no
   * YJIT support:        no
   * man page type:       doc
   * BASERUBY -v:         ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [aarch64-linux]


make:
Parsing sources...
100% [998/998]  yjit.rb

Generating RI format into /tmp/ruby/ruby-3.2.1/.ext/rdoc...

  Files:        998

  Classes:     1031 ( 274 undocumented)
  Modules:      214 (  66 undocumented)
  Constants:   2283 ( 632 undocumented)
  Attributes:  1035 ( 329 undocumented)
  Methods:     9790 (2287 undocumented)

  Total:      14353 (3588 undocumented)
   75.00% documented

  Elapsed: 13.7s
Comment 31 Leonid Kopylov 2023-03-05 15:20:55 UTC
(In reply to Sam James from comment #29)
> Try ./configure --enable-pthread --disable-jit-support --disable-yjit
> --disable-debug

success
Comment 32 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:21:33 UTC
OK. Back to the ebuild, try: FEATURES="-usersandbox -sandbox -ipc-sandbox -pid-sandbox -mount-sandbox -network-sandbox" emerge -v1 dev-lang/ruby.
Comment 33 Leonid Kopylov 2023-03-05 15:23:27 UTC
Created attachment 856214 [details]
build.log
Comment 34 Leonid Kopylov 2023-03-05 15:23:36 UTC
(In reply to Sam James from comment #32)
> OK. Back to the ebuild, try: FEATURES="-usersandbox -sandbox -ipc-sandbox
> -pid-sandbox -mount-sandbox -network-sandbox" emerge -v1 dev-lang/ruby.

failed
Comment 35 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:25:12 UTC
With tarball (not ebuild): try ./configure --prefix=/usr --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --docdir=/usr/share/doc/ruby-3.2.1 --htmldir=/usr/share/doc/ruby-3.2.1/html --libdir=/usr/lib64 --program-suffix=32 --with-soname=ruby32 --with-readline-dir=/usr --enable-shared --enable-pthread --disable-rpath --with-out-ext=win32,win32ole --with-jemalloc --disable-jit-support --disable-yjit --disable-socks --disable-dtrace --enable-install-doc --enable-ipv6 --disable-static --disable-install-static-library --without-static-linked-ext --disable-debug --enable-option-checking=no
Comment 36 Leonid Kopylov 2023-03-05 15:28:00 UTC
configure:

Configuration summary for ruby version 3.2.1

   * Installation prefix: /usr
   * exec prefix:         ${prefix}
   * arch:                aarch64-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            aarch64-unknown-linux-gnu-gcc
   * with thread:         pthread
   * with coroutine:      arm64
   * enable shared libs:  yes
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers \
                          -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value \
                          -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
   * strip command:       aarch64-unknown-linux-gnu-strip -S -x
   * install doc:         rdoc
   * MJIT support:        no
   * YJIT support:        no
   * man page type:       doc
   * BASERUBY -v:         ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [aarch64-linux]

make:
linking shared-object zlib.so
linking shared-object rbs_extension.so
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot open output file ../../../../../.bundle/extensions/aarch64-linux/3.2.0/rbs-2.8.2/rbs_extension.so: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:317: ../../../../../.bundle/extensions/aarch64-linux/3.2.0/rbs-2.8.2/rbs_extension.so] Error 1
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/.bundle/gems/rbs-2.8.2/ext/rbs_extension'
make[1]: *** [exts.mk:311: .bundle/gems/rbs-2.8.2/ext/rbs_extension/all] Error 2
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/zlib'
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/ext/ripper'
make[1]: Leaving directory '/tmp/ruby/ruby-3.2.1'
make: *** [uncommon.mk:331: build-ext] Error 2
Comment 37 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:31:36 UTC
I don't really understand what this new error means :(

Could you try (tarball, not ebuild):
INSTALL="/usr/bin/install -c" LIBPATHENV="" ./configure --prefix=/usr --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --docdir=/usr/share/doc/ruby-3.2.1 --htmldir=/usr/share/doc/ruby-3.2.1/html --libdir=/usr/lib64 --program-suffix=32 --with-soname=ruby32 --with-readline-dir=/usr --enable-shared --enable-pthread --disable-rpath --with-out-ext=win32,win32ole --with-jemalloc --disable-jit-support --disable-yjit --disable-socks --disable-dtrace --enable-install-doc --enable-ipv6 --disable-static --disable-install-static-library --without-static-linked-ext --disable-debug --enable-option-checking=no

you may then need to do, instead of 'make', this:

LD_LIBRARY_PATH="$(pwd):/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" make V=1 MJIT_OPTFLAGS="" MJIT_DEBUGFLAGS=""
Comment 38 Leonid Kopylov 2023-03-05 15:35:36 UTC
configure:
Configuration summary for ruby version 3.2.1

   * Installation prefix: /usr
   * exec prefix:         ${prefix}
   * arch:                aarch64-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * enable shared:       yes
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            aarch64-unknown-linux-gnu-gcc
   * with thread:         pthread
   * with coroutine:      arm64
   * enable shared libs:  yes
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
   * DLDFLAGS:            -Wl,--compress-debug-sections=zlib
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings \
                          -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers \
                          -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value \
                          -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
   * strip command:       aarch64-unknown-linux-gnu-strip -S -x
   * install doc:         rdoc
   * MJIT support:        no
   * YJIT support:        no
   * man page type:       doc
   * BASERUBY -v:         ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [aarch64-linux]

make:
make[2]: Entering directory '/tmp/ruby/ruby-3.2.1/.bundle/gems/debug-1.7.1/ext/debug'
aarch64-unknown-linux-gnu-gcc -I. -I../../../../../.ext/include/aarch64-linux -I../../../../.././include -I../../../../.././.bundle/gems/debug-1.7.1/ext/debug -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef  -fPIC  -o debug.o -c debug.c
aarch64-unknown-linux-gnu-gcc -I. -I../../../../../.ext/include/aarch64-linux -I../../../../.././include -I../../../../.././.bundle/gems/debug-1.7.1/ext/debug -DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef  -fPIC  -o iseq_collector.o -c iseq_collector.c
rm -f ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so
aarch64-unknown-linux-gnu-gcc -shared -o ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so debug.o iseq_collector.o -L. -L../../../../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,--compress-debug-sections=zlib    -lruby32  -lm -lpthread  -ljemalloc -lc
/usr/lib/gcc/aarch64-unknown-linux-gnu/12/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot open output file ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:317: ../../../../../.bundle/extensions/aarch64-linux/3.2.0/debug-1.7.1/debug/debug.so] Error 1
make[2]: Leaving directory '/tmp/ruby/ruby-3.2.1/.bundle/gems/debug-1.7.1/ext/debug'
make[1]: *** [exts.mk:309: .bundle/gems/debug-1.7.1/ext/debug/all] Error 2
make[1]: Leaving directory '/tmp/ruby/ruby-3.2.1'
make: *** [uncommon.mk:331: build-ext] Error 2
Comment 39 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-05 15:36:15 UTC
ok, I need graaff at this point
Comment 40 Leonid Kopylov 2023-03-16 09:11:48 UTC
i still have this issue. but after omitting "march" from:
COMMON_FLAGS="-march=armv8-a+crypto+crc+lse+rcpc+rdma+dotprod+fp16fml+sb+ssbs+flagm+pauth -O2 -pipe -fomit-frame-pointer"

to be only:
COMMON_FLAGS="-O2 -pipe -fomit-frame-pointer":

# emerge =dev-lang/ruby-3.2.1 -pvq
[ebuild   R   ] dev-lang/ruby-3.2.1  USE="berkdb doc examples gdbm ipv6 jemalloc rdoc ssl tk xemacs -debug -jit -socks5 -static-libs -systemtap"

So what does it mean?