Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563384 - dev-lang/ruby: mkmf tool runs code with LD_LIBRARY_PATH=/usr/lib which breaks tools relying on rpaths (e.g. binutils)
Summary: dev-lang/ruby: mkmf tool runs code with LD_LIBRARY_PATH=/usr/lib which breaks...
Status: RESOLVED DUPLICATE of bug 564272
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-18 08:38 UTC by Michał Górny
Modified: 2015-11-26 14:18 UTC (History)
5 users (show)

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


Attachments
Build log (build.log,3.56 KB, text/x-log)
2015-10-18 08:38 UTC, Michał Górny
Details
mkmf.log for ruby21 (mkmf.log,974 bytes, text/x-log)
2015-10-18 08:39 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-18 08:38:38 UTC
Created attachment 414828 [details]
Build log

Build log attached, will attach the other log in a minute.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-18 08:39:15 UTC
Created attachment 414830 [details]
mkmf.log for ruby21
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-18 08:43:07 UTC
Portage 2.2.23 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.2.0-pf1-mgorny-amd64+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.2.0-pf1-mgorny-amd64+-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.2
KiB Mem:     4047156 total,    480112 free
KiB Swap:    1502072 total,   1402192 free
Timestamp of repository gentoo: Sun, 18 Oct 2015 07:02:15 +0000
Timestamp of repository games-overlay: Sat, 10 Oct 2015 22:23:35 +0000
Timestamp of repository gnome: Thu, 15 Oct 2015 22:22:26 +0000
Timestamp of repository haskell: Sat, 17 Oct 2015 17:44:59 +0000
Timestamp of repository proaudio: Sat, 17 Oct 2015 17:45:00 +0000
Timestamp of repository sunrise: Mon, 17 Aug 2015 07:21:58 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.2.4 [disabled]
app-shells/bash:          3.1_p23::gentoo, 3.2_p57::gentoo, 4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.2.6::python, 3.3.5-r2::gentoo, 3.4.3::gentoo, 3.5.0-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.3.2-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo-cvs
sys-apps/openrc:          0.18.3::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo, 5.1.0::gentoo, 5.2.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

games-overlay
    location: /var/db/repos/games-overlay
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/games-overlay.git
    masters: gentoo

gnome
    location: /var/db/repos/gnome
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/gnome.git
    masters: gentoo

haskell
    location: /var/db/repos/haskell
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/haskell.git
    masters: gentoo

proaudio
    location: /var/db/repos/proaudio
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/proaudio.git
    masters: gentoo

python
    location: /home/mgorny/git/python-repo
    sync-umask: 027
    masters: gentoo

sunrise
    location: /var/db/repos/sunrise
    sync-type: git
    sync-umask: 027
    sync-uri: https://github.com/gentoo-mirror/sunrise.git
    masters: gentoo

mgorny
    location: /home/mgorny/git/mgorny-repo
    sync-umask: 027
    masters: gentoo
    priority: 10000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CC="x86_64-pc-linux-gnu-gcc-4.9.3"
CFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXX="x86_64-pc-linux-gnu-g++-4.9.3"
CXXFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
DISTDIR="/srv/nfs/common/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --keep-going --quiet-build=n --dynamic-deps=n"
FCFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs binpkg-multi-instance buildpkg cgroup collision-protect config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg"
FFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://gentoo.mirror.web4u.cz/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo.mirror.pw.edu.pl/ http://ftp.vectranet.pl/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/"
INSTALL_MASK=""
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j12"
PKGDIR="/srv/nfs/common/packages/athlon64"
PORTAGE_COMPRESS="lzip"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --times --compress --force --whole-file --delete --stats --timeout=45 --exclude=/distfiles --exclude=/packages --exclude=/local --exclude=CVS --exclude=/metadata/cache --omit-dir-times"
PORTAGE_TMPDIR="/tmp"
USE="3dnow 3dnowext X a52 aac acl adns aio alsa amd64 ayatana bash-completion bluetooth branding btrfs bzip2 cairo caps cdda cdr cli crypt cups curl cxx dbus djvu dri dts dvb dvd dvdr egl emboss exif fftw firefox flac fontconfig fortran gd gif glamor gmp gnuplot gnutls gphoto2 gstreamer gtk iconv idn imagemagick ipv6 jpeg jpeg2k kate latex lcms libass libatomic liblockfile libnotify libproxy libsamplerate libsecret libtiger lz4 lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg mtp multilib ncurses nls nptl ogg openal opencl opengl openmp openvg opus osmesa pam pango pch pcre pcre-jit pdf plotutils png policykit postscript ppds pulseaudio qt3support readline sctp sdl seccomp session slang smp sndfile speex spell sse sse2 sse3 ssl startup-notification svg systemd t1lib tcpd threads tiff truetype udev udisks unicode upower usb v4l2 vaapi vhosts vim-syntax vorbis wavpack wayland webp wmf wxwidgets x264 xattr xcb xft xml xpm xv xvid xvmc zlib zsh-completion" ABI_X86="64 32" ALSA_CARDS="hda-intel emu10k1 mpu401 pcsp virmidi" APACHE2_MODULES="socache_shmcb unixd actions alias deflate filter mime mime_magic negotiation rewrite" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 3dnow 3dnowext sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" LIRC_DEVICES="serial" NGINX_MODULES_HTTP="gzip limit_conn limit_req rewrite spdy uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 jython2_7 pypy python3_5" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 ppc ppc64 ppc64abi32 x86_64" QEMU_USER_TARGETS="aarch64 arm ppc ppc64" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="artec_eplus48u" USERLAND="GNU" VIDEO_CARDS="nouveau radeon vesa r600 s3" 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"
USE_PYTHON="INVALID"
Unset:  CPPFLAGS, CTARGET, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/binutils-2.25.1-r1::gentoo was built with the following:
USE="cxx multitarget nls zlib (-multislot) -static-libs -test -vanilla"
CFLAGS="-march=k8-sse3 -O2 -pipe -frecord-gcc-switches"
CXXFLAGS="-march=k8-sse3 -O2 -pipe -frecord-gcc-switches"


sys-libs/binutils-libs-2.25.1-r1::gentoo was built with the following:
USE="nls zlib -static-libs" ABI_X86="32 64 -x32"


sys-devel/gcc-4.9.3::gentoo was built with the following:
USE="cxx fortran graphite (multilib) nls nptl objc objc++ objc-gc openmp sanitize (-altivec) (-awt) -cilk -debug -doc (-fixed-point) -gcj -go (-hardened) (-libssp) (-multislot) -nopie -nossp -regression-test -vanilla"
CFLAGS="-march=k8-sse3 -O2 -pipe"
CXXFLAGS="-march=k8-sse3 -O2 -pipe"


dev-lang/ruby-2.1.7::gentoo was built with the following:
USE="ipv6 ncurses rdoc readline ssl -berkdb -debug -doc -examples -gdbm -rubytests -socks5 -xemacs" ABI_X86="64"
CFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -fno-strict-aliasing"
CXXFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -fno-strict-aliasing"
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2015-10-20 21:31:08 UTC
*** Bug 563604 has been marked as a duplicate of this bug. ***
Comment 4 Manuel Rüger (RETIRED) gentoo-dev 2015-10-20 21:31:56 UTC
@Michał please use a more descriptive bug subject in future. thanks.
Comment 5 Hans de Graaff gentoo-dev Security 2015-10-21 05:33:06 UTC
At first sight this doesn't look like a ruby issue. Can you still compile other code on this machine? Does the test program as mentioned in the mkmf.log compile outside of ruby?

The symbol in question seems to be related to binutils.

Ruby is a bit too eager to remember flags from when it was compiled itself. This never caused issues in the past, but it might be useful to try and recompile ruby itself and see if that fixes the issue.
Comment 6 Dennis Schridde 2015-10-21 09:14:32 UTC
See-Also: https://bugs.gentoo.org/show_bug.cgi?id=562060
Comment 7 Andreas Proteus 2015-10-21 11:15:23 UTC
(In reply to Hans de Graaff from comment #5)
> but it might be useful to try and
> recompile ruby itself and see if that fixes the issue.

Recompiled ruby.
Problem remains.
Comment 8 Andreas Proteus 2015-10-21 12:22:59 UTC
(In reply to Hans de Graaff from comment #5)
> Does the test program as mentioned in the
> mkmf.log compile outside of ruby?

The test program compiles without errors outside of ruby.

Please note that in my mkmf.log the error is "Segmentation fault" and not "undefined symbol":

"i686-pc-linux-gnu-gcc -o conftest -I/usr/include/ruby-2.1.0/i686-linux -I/usr/include/ruby-2.1.0/ruby/backward -I/usr/include/ruby-2.1.0 -I.  -D_FILE_OFFSET_BITS=64  -march=core2 -O2 -pipe -fno-stack-protector -fno-strict-aliasing -fPIC conftest.c  -L. -L/usr/lib -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined     -lruby21  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
i686-pc-linux-gnu-gcc: internal compiler error: Segmentation fault (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

Finally, all versions of racc in portage fail to compile.
Comment 9 Denis Sokolovsky 2015-10-22 15:10:14 UTC
I have similar problem with build for ruby22 ("undefined symbol: elf32xtensa_size_opt") and downgrading sys-devel/binutils, as suggested in bug #562060, works around this problem.
Comment 10 Andreas Proteus 2015-10-22 20:04:53 UTC
I confirm that with binutils-2.25-r1 racc builds without problems.
Comment 11 SpanKY gentoo-dev 2015-10-23 04:06:18 UTC

*** This bug has been marked as a duplicate of bug 562060 ***
Comment 12 SpanKY gentoo-dev 2015-11-23 10:35:12 UTC
looks like ruby's mkmf tool is broken due to it messing with LD_LIBRARY_PATH.  a patch has been posted here:
https://github.com/chef/omnibus-software/blob/master/config/patches/ruby/ruby-2_1_3-no-mkmf.patch

although i do not use ruby anywhere myself so i can't say whether that's the best route to go.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-26 14:18:05 UTC

*** This bug has been marked as a duplicate of bug 564272 ***