Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 503804

Summary: dev-lang/ruby-2.1.1 adds '-msse2 -mfpmath=sse' to CFLAGS unconditionally (?)
Product: Gentoo Linux Reporter: Guy <defuebr>
Component: [OLD] DevelopmentAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: https://bugs.ruby-lang.org/issues/8358
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /var/tmp/portage/dev-lang/ruby-2.1.1/temp/build.log
build.log
emerge --info
ruby-2.1.1-no-forced-sse2.patch

Description Guy 2014-03-08 02:06:52 UTC
Created attachment 372036 [details]
/var/tmp/portage/dev-lang/ruby-2.1.1/temp/build.log

This is not the same as bug# 503854

Also note: I have another x86 system as well as my amd64 system which this package built fine on. This x86 based system is my most minimal system.


i686-pc-linux-gnu-gcc -O2 -march=i686 -fno-strict-aliasing -fPIC  -L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -fstack-protector -Wl,-O1 -Wl,--as-needed main.o dmydln.o miniinit.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o encoding.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o version.o compile.o debug.o iseq.o vm.o vm_dump.o vm_backtrace.o vm_trace.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o strlcpy.o strlcat.o setproctitle.o addr2line.o  dmyext.o   -lpthread -lgmp -ldl -lcrypt -lm   -o miniruby
./miniruby -I./lib -I. -I.ext/common  ./tool/mkconfig.rb -timestamp=.rbconfig.time \
	-install_name=ruby21 \
	-so_name=ruby21 rbconfig.rb
uncommon.mk:543: recipe for target '.rbconfig.time' failed

# emerge --info
Portage 2.2.8-r1 (default/linux/x86/13.0/desktop, gcc-4.8.2, glibc-2.18-r1, 3.13.5 i686)
=================================================================
System uname: Linux-3.13.5-i686-Intel-R-_Pentium-R-_III_CPU_1133MHz-with-gentoo-2.2
KiB Mem:      508812 total,     95540 free
KiB Swap:    2097148 total,   2076052 free
Timestamp of tree: Fri, 07 Mar 2014 21:00:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.4
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo multimedia sping x11 zugaina local
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 Oracle-BCLA-JavaSE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=30"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/multimedia /var/lib/layman/sping /var/lib/layman/x11 /var/lib/layman/zugaina /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa automount berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ipv6 java jpeg lcms libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline ruby sdl session spell sse sse2 ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 x86 xcb xml xv xvid zlib" ABI_X86="32" ALSA_CARDS="intel8x0" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Guy 2014-03-08 02:08:51 UTC
"This is not the same as bug# 503854" is wrong and should be "This is not the same as bug# 503584"
Comment 2 Rafał Mużyło 2014-03-08 07:26:36 UTC
...well, the *initial* problem is obvious: '-msse2 -mfpmath=sse' disagres with your processor.

The question is "does it need to ?".
Comment 3 Andrew Savchenko gentoo-dev 2014-04-13 21:47:15 UTC
Created attachment 374874 [details]
build.log

Same here on ~x86 and Athlon-XP (sse only, no sse2).
Comment 4 Andrew Savchenko gentoo-dev 2014-04-13 21:47:48 UTC
Created attachment 374876 [details]
emerge --info
Comment 5 Andrew Savchenko gentoo-dev 2014-04-13 22:19:37 UTC
Created attachment 374880 [details, diff]
ruby-2.1.1-no-forced-sse2.patch

This patch disables forced sse2 and sse flags.
It is Gentoo policy not to force CFLAGS on users, most people will use -march=native anyway.
Comment 6 Hans de Graaff gentoo-dev 2014-04-14 18:54:21 UTC
I've applied Andrew's patch to ruby-2.1.1-r1, similar to what Arch Linux is doing. Thanks for the report and for providing the patch.