Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633422 - dev-lang/ruby-2.3.5 (and 2.4.2) fails to install on ARM (miniruby segfault)
Summary: dev-lang/ruby-2.3.5 (and 2.4.2) fails to install on ARM (miniruby segfault)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal major
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 01:39 UTC by Steve Arnold
Modified: 2024-09-13 09:17 UTC (History)
2 users (show)

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


Attachments
build log for 2.3.5 (ruby-2.3.5-arm-build.log,268.10 KB, text/x-log)
2017-10-04 01:40 UTC, Steve Arnold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Arnold archtester gentoo-dev 2017-10-04 01:39:13 UTC
make[2]: 'ruby23' is up to date.
make[2]: Leaving directory '/var/tmp/portage/dev-lang/ruby-2.3.5/work/ruby-2.3.5'
make[1]: Leaving directory '/var/tmp/portage/dev-lang/ruby-2.3.5/work/ruby-2.3.5'
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./armv7a-linux-eabi-fake ./tool/rbinstall.rb --make="make" --dest-dir="/var/tmp/portage/dev-lang/ruby-2.3.5/image/" --extout=".ext" --mflags="" --make-flags=" -j5 --jobserver-auth=4,5 -- DESTDIR=/var/tmp/portage/dev-lang/ruby-2.3.5/image/ V=1" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
make: *** [uncommon.mk:267: do-install-nodoc] Segmentation fault
 * ERROR: dev-lang/ruby-2.3.5::gentoo failed (install phase):
 *   emake failed

On Jetson K1 with latest toolchain, etc.  2.2 (latest) is the only one that builds on this host.
Comment 1 Steve Arnold archtester gentoo-dev 2017-10-04 01:40:34 UTC
Created attachment 497576 [details]
build log for 2.3.5
Comment 2 Steve Arnold archtester gentoo-dev 2017-10-04 01:43:04 UTC
# emerge --info
Portage 2.3.11 (python 2.7.14-final-0, hardened/linux/arm/armv7a, gcc-6.4.0, glibc-2.25-r5, 4.11.0-rc4-tegra-r0 armv7l)
=================================================================
System uname: Linux-4.11.0-rc4-tegra-r0-armv7l-ARMv7_Processor_rev_3_-v7l-with-gentoo-2.4.1
KiB Mem:     2061280 total,    576708 free
KiB Swap:    1548280 total,   1538296 free
Timestamp of repository gentoo: Tue, 03 Oct 2017 10:30:01 +0000
Head commit of repository gentoo: 8e7a474a2e54514039770554fa2ce98b40a91a8a
Head commit of repository arm_support: b64243eb1a6b58660715f0bd3bf5a9733c854cf8

Head commit of repository nerdboy: fc8e912ff19c2db151a84d37af30900577305baa

sh bash 4.4_p12
ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.6::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.9.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.31.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.27::gentoo, 2.28-r2::nerdboy, 2.29.1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r4::ada, 6.3.0::ada, 6.4.0::ada, 7.1.0-r1::ada, 7.2.0::ada
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-umask: 022
    sync-uri: rsync://prime.arnolds.bogus/gentoo-portage
    sync-user: portage:portage
    priority: -1000
    sync-rsync-extra-opts: 

arm_support
    location: /usr/local/arm
    sync-type: git
    sync-umask: 022
    sync-uri: https://github.com/gentoo/arm.git
    sync-user: portage:portage
    masters: gentoo

nerdboy
    location: /usr/local/portage
    sync-type: git
    sync-umask: 022
    sync-uri: https://github.com/sarnold/portage-overlay.git
    sync-user: portage:portage
    masters: gentoo

ada
    location: /var/lib/layman/ada
    sync-umask: 022
    sync-user: portage:portage
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA @GPL-COMPATIBLE @OSI-APPROVED @EULA dlj-1.1 skype-eula googleearth AdobeFlash-10.1 Oracle-BCLA-JavaSE"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=2"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=2 -fuse-linker-plugin"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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"
USE="7zip X acl alsa apache2 arm armada armv5te armv6 armv6t2 berkdb bluetooth bzip2 cacert cairo caps ccache cdda cddb cgroups cli consolekit cracklib crypt cups curl cxx dbus dejavu distcc djvu dri dri3 drm egl eglfs enchant etnaviv evdev expat fam ffmpeg flac fontconfig fortran gbm gd gdbm git gles1 gles2 glib glx gmp gnome-keyring gnome-online-accounts gnutls gpm graphviz gs gstreamer gtk gtk3 gudev guile hardened howl hwdb ibus iconv imlib imx innodb introspection ipv6 jbig jpeg jpeg2k kms libnotify logrotate lto lua lzma modules mp3 ncurses neon networkmanager nls nptl nptlonly ogg openc opengl openmp openpgp opus pam pango pax pax_kernel pcre pdf pic pie pkcs11 png policykit postgres premount pulseaudio python qml qt5 readline sasl seccomp session snmp spell sqlite ssl ssp subversion svg system-icu system-libvpx tcpd threads tiff truetype udev udisks unicode urandom usb v4l vala vorbis vpx wayland weston wheel x264 xattr xml xorg xpm xtpax zeroconf zip zlib" ALSA_CARDS="soc_imx_sgtl5000 usb-audio" APACHE2_MODULES="actions alias auth_digest 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 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 proxy proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en_US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby24 ruby23 ruby22" USERLAND="GNU" VIDEO_CARDS="imx vivante" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Steve Arnold archtester gentoo-dev 2017-10-04 01:58:54 UTC
* same result with gcc-7.2 and binutils-2.29.1
Comment 4 Steve Arnold archtester gentoo-dev 2017-10-04 04:29:23 UTC
Not getting much of a backtrace either; any tips?

(gdb) run
Starting program: /var/tmp/portage/dev-lang/ruby-2.3.5/work/ruby-2.3.5/miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./tool/rubytest.rb --run-opt=--disable-gems
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[New LWP 32660]
[LWP 32660 exited]
process 32657 is executing new program: /var/tmp/portage/dev-lang/ruby-2.3.5/work/ruby-2.3.5/ruby23
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[New LWP 32661]

Thread 3 "ruby23" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 32661]
0xb6d17e98 in pthread_self () from /lib/libc.so.6
(gdb) bt full
#0  0xb6d17e98 in pthread_self () from /lib/libc.so.6
No symbol table info available.
#1  0xb6f3b7d0 in thread_timer (p=0x7f558840) at thread_pthread.c:1546
        gvl = 0x7f558840
#2  0xb6bf4824 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#3  0xb6d076e8 in ?? () from /lib/libc.so.6
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Comment 5 Steve Arnold archtester gentoo-dev 2017-10-04 17:47:04 UTC
Also note this is most likely not hardware related; the jetson builds *everything* without issues, including gcc with Ada about 1000 times getting the armv7 gnat build sorted.  So there is that...
Comment 6 Enrique Domínguez 2017-10-07 11:14:21 UTC
I think it could be related, cross compiling on amd64 results in illegal instruction on install phase too. I could compile and install as user without gentoo patchset. Have you tried compiling and installing as user without patches?
Comment 7 Steve Arnold archtester gentoo-dev 2017-11-20 03:49:48 UTC
As far as I can tell, this looks like it might be glibc-related, as it now segfaults on all the updated armv7 roots I have, but it still builds on the ones with older glibc (2.23/2.4). Other than that I got nothin' until I can test a little more.
Comment 8 Steve Arnold archtester gentoo-dev 2017-11-21 06:04:44 UTC
And a data point that makes even less sense now; I started from an arm root that was on gcc 5.4.0 and (now masked) binutils/glibc, 3 ruby versions installed, each one version back:

$ equery l -op ruby
 * Searching for ruby ...
[I--] [??] dev-lang/ruby-2.2.7:2.2
[-P-] [  ] dev-lang/ruby-2.2.8:2.2
[--O] [  ] dev-lang/ruby-2.3.4:2.3
[--O] [  ] dev-lang/ruby-2.3.4-r3:2.3
[I-O] [  ] dev-lang/ruby-2.3.4-r4:2.3
[--O] [  ] dev-lang/ruby-2.3.5:2.3
[I--] [??] dev-lang/ruby-2.4.1:2.4
[-P-] [  ] dev-lang/ruby-2.4.2:2.4

Upgraded toolchain to 4.13 headers, 2.29.1-r1, gcc 6.4.0, and glibc 2.25-r9, then started upgrading ruby:

ruby-2.2.8: no segfault, installed

ruby-2.3.5: no segfault, installed (coughed a warning about glibc headers)

ruby-2.4.2: no segfault, installed

Still fails on the other root, same everything except glibc was already updated to 2.26.  Any thoughts?
Comment 9 Steve Arnold archtester gentoo-dev 2017-11-21 21:32:17 UTC
So, I installed binary packagess built on system "A" onto system "B" and they still segfault.  Moved the rootfs from system "A" to system "B" and ruby rebuilds itself just fine, so there was something in the system "B" runtime dorking up ruby.  The only difference in the core packages was glibc 2.26 (plus new dep lib) in system "B" root vs. 2.25-r9 in the system "A" root.  Since I have a current tarball snapshot now I will update toolchain on system "A" and test again.
Comment 10 Steve Arnold archtester gentoo-dev 2017-11-21 21:35:26 UTC
System "A" baseline:

# emerge --info
Portage 2.3.13 (python 3.4.6-final-0, hardened/linux/arm/armv7a, gcc-6.4.0, glibc-2.25-r9, 4.11.0-rc4-tegra-r0 armv7l)
=================================================================
System uname: Linux-4.11.0-rc4-tegra-r0-armv7l-ARMv7_Processor_rev_3_-v7l-with-gentoo-2.3
KiB Mem:     2061280 total,   1517532 free
KiB Swap:    1548280 total,   1548280 free
Timestamp of repository gentoo: Tue, 21 Nov 2017 11:30:01 +0000
Head commit of repository gentoo: 015d3afbbaed5832de54c8a947de1a1cd6b8c336
Head commit of repository nerdboy: 97eef219fb174642435a121c8df5de84e0ec2c5e

Head commit of repository arm_support: 725a7a4dc70520358542932d152af6cd355f2a7e

sh bash 4.4_p12
ld GNU gold (Gentoo 2.29.1 p3 2.29.1) 1.14
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.34.9::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.27::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-umask: 022
    sync-uri: rsync://local.net/gentoo-portage
    sync-user: portage:portage
    priority: -1000
    sync-rsync-extra-opts: 

nerdboy
    location: /usr/local/portage
    sync-type: git
    sync-umask: 022
    sync-uri: https://github.com/sarnold/portage-overlay.git
    sync-user: portage:portage
    masters: gentoo
    priority: 0

arm_support
    location: /usr/local/arm
    sync-type: git
    sync-umask: 022
    sync-uri: https://github.com/gentoo/arm.git
    sync-user: portage:portage
    masters: gentoo
    priority: 1

ada
    location: /var/lib/layman/ada
    sync-type: laymansync
    sync-umask: 022
    sync-uri: git://github.com/sarnold/ada-overlay.git
    sync-user: portage:portage
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA @GPL-COMPATIBLE @OSI-APPROVED @EULA dlj-1.1 skype-eula googleearth AdobeFlash-10.1 Oracle-BCLA-JavaSE"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=4"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=4"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap -flto=4 -fuse-linker-plugin"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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"
USE="7zip X acl alsa apache2 arm armada armv5te armv6 armv6t2 berkdb bluetooth bzip2 cacert cairo caps ccache cdda cddb cli consolekit cracklib crypt cups curl cxx dbus dejavu distcc djvu dri dri3 drm egl eglfs enchant etnaviv evdev expat fam ffmpeg flac fontconfig fortran gbm gd gdbm git gles1 gles2 glib glx gmp gnome-keyring gnome-online-accounts gnutls gpm graphviz gs gstreamer gtk gtk3 gudev guile hardened howl hwdb ibus iconv imlib imx innodb introspection ipv6 jbig jpeg jpeg2k kms libnotify logrotate lto lua lzma modules mp3 ncurses neon networkmanager nls nptl nptlonly ogg openc opengl openmp openpgp opus pam pango pax pcre pdf pic pie pkcs11 png policykit postgres premount pulseaudio python qml qt5 readline sasl seccomp session snmp spell sqlite ssl ssp subversion svg system-gcc system-icu system-libvpx tcpd threads tiff truetype udev udisks unicode urandom usb v4l vala vorbis vpx wayland weston wheel x264 xattr xml xorg xpm xtpax zeroconf zip zlib" ALSA_CARDS="soc_imx_sgtl5000 usb-audio" APACHE2_MODULES="actions alias auth_digest 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 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 proxy proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 vfp" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en_US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby24 ruby23 ruby22" USERLAND="GNU" VIDEO_CARDS="imx vivante" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 11 Steve Arnold archtester gentoo-dev 2017-11-22 00:43:03 UTC
Working root on system "B", rebuilt gcc-6.4.0 with USE=ada and ruby is still happy:

>>> dev-lang/ruby-2.3.5 merged.
>>> Regenerating /etc/ld.so.cache...
>>> Auto-cleaning packages...

So I will rule that factor out for now.
Comment 12 Steve Arnold archtester gentoo-dev 2017-11-22 02:42:37 UTC
Upgraded glibc to latest 2.26 and here we go...

./miniruby -I./lib -I. -I.ext/common  ./tool/mkconfig.rb -timestamp=.rbconfig.time \
        -arch=armv7a-linux-eabi -version=2.3.5 \
        -install_name=ruby23 \
        -so_name=ruby23 rbconfig.rb
./miniruby -I./lib -I. -I.ext/common  ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc
make: *** [uncommon.mk:625: .rbconfig.time] Segmentation fault
make: *** Waiting for unfinished jobs....
make: *** [uncommon.mk:818: encdb.h] Segmentation fault
Comment 13 Steve Arnold archtester gentoo-dev 2017-11-30 22:12:22 UTC
So, I went back and tried a (slightly older) clean rootfs where ruby didn't segfault, upgraded to latest glibc 2.25, and finished the build update with no ruby issues, whereas glibc 2.26 makes it segfault.

Since the segfaults started happening well before 2.26 was available, but then were fixed by some patch update in 2.25 (sorry I have no idea which patch) my best guess is 2.26 also needs whatever that patch was...

My only workaround is masking glibc/libtirpc/libnsl for now on arm; it should be reproducible on hardened armv7a stage3 by upgrading toolchain and trying to install ruby if anyone else wants to take a stab.