Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21589 - ruby-1.8.0_pre2 breaks with -O3 on Pentium3
Summary: ruby-1.8.0_pre2 breaks with -O3 on Pentium3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tom Payne (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-24 01:00 UTC by Priit Laes (IRC: plaes)
Modified: 2003-06-03 10:39 UTC (History)
1 user (show)

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


Attachments
from /var/tmp/portage/vim-6.2_pre5/work/vim62e/src/auto/ (config.mk,3.53 KB, text/plain)
2003-05-25 02:25 UTC, Priit Laes (IRC: plaes)
Details
emerge output (emerge.output,11.51 KB, text/plain)
2003-05-25 02:35 UTC, Priit Laes (IRC: plaes)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Priit Laes (IRC: plaes) 2003-05-24 01:00:18 UTC
creating auto/config.mk
creating auto/config.h
make: Entering directory `/var/tmp/portage/gvim-6.2_pre5/work/vim62e/src'
CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -march=pentium3 -O3 -pipe -fomit-frame-pointer 
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays  -I/usr/X11R6/include  -DPERL5 
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.0/i686-linux/CORE 
 -I/usr/include/python2.2 -pthread  -I " srcdir=. sh ./osdef.sh
mkdir objects
make: Leaving directory `/var/tmp/portage/gvim-6.2_pre5/work/vim62e/src'
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
make[1]: Entering directory `/var/tmp/portage/gvim-6.2_pre5/work/vim62e/src'
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -march=pentium3 -O3 -pipe -fomit-frame-pointer 
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays  -I/usr/X11R6/include  -DPERL5 
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.0/i686-linux/CORE 
 -I/usr/include/python2.2 -pthread  -I  -o objects/buffer.o buffer.c
gcc: objects/buffer.o: No such file or directory
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -march=pentium3 -O3 -pipe -fomit-frame-pointer 
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays  -I/usr/X11R6/include  -DPERL5 
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.0/i686-linux/CORE 
 -I/usr/include/python2.2 -pthread  -I  -o objects/charset.o charset.c
gcc: objects/charset.o: No such file or directory
make[1]: *** [objects/charset.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [objects/buffer.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/gvim-6.2_pre5/work/vim62e/src'
make: *** [first] Error 2

!!! ERROR: app-editors/gvim-6.2_pre5 failed.
!!! Function src_compile, Line 191, Exitcode 2
!!! emake failed

Same error messages appear when using emerging vim.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-05-24 17:24:25 UTC
Priit - it's recommended in the bug report form to post the output of
emerge info

This helps us with being able to duplicate your build environment and possibly
see problems with your portage setup.
Comment 2 Priit Laes (IRC: plaes) 2003-05-24 18:21:37 UTC
cauchy root # emerge info
Portage 2.0.48 (default-x86-1.4, gcc-3.3, glibc-2.3.2-r2)
=================================================================
System uname: 2.4.20-amd1 i686 Pentium III (Coppermine)
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.linux.no/ ftp://gentoo.linux.no/pub/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/testportage"
USE="x86 -3dfx -3dnow -aalib -acl -acpi -afs alsa apache2 apm -arts -atlas avi berkdb -bonobo -canna -cdr -cjk crypt -cups curl -debug dga directfb -dvb -dvd -emacs encode -esd -ethereal -evo fbcon -firebird flash -freetds -freewnn gb gd -gdbm -ggi gif -gnome -gphoto2 gpm -gps gtk gtk2 gtkhtml -guile icc icc-pgo -imap imlib innodb ipv6 java jikes jpeg -junit -kde -kerberos ladcca lcms -ldap -leim -libg++ -libgda libwww -lirc -maildir -matrox mbox mikmod mmx motif mozilla mpeg mpi -mule mysql -nas ncurses -nhc98 -nls -nocardbus oav -oci8 -odbc oggvorbis opengl oss pam pcmcia -pda pdflib perl -plotutils png pnp -postgres -prebuilt python qt quicktime readline ruby samba sasl -scanner sdl -slang -slp -snmp -socks5 -spell sse ssl -static -svga tcltk tcpd tetex tiff truetype trusted usb wavelan wmf X -Xaw3d xface -xinerama xml xml2 xmms xv -zeo zlib"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://ftp.estpak.ee/gentoo-portage"
FEATURES="sandbox ccache"

---
commandline was: 
USE="gnome vim-with-x" emerge vim
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2003-05-24 20:58:55 UTC
Priit, the problem is right here:
  -I  -o objects/buffer.o buffer.c

The -o is taken as the argument to -I, meaning "include the -o directory".  Then gcc tries to build buffer.c, link against objects/buffer.o (which doesn't exist yet), to produce a.out.  This obviously won't work. 

The question is, where did that stray -I come from?  I ran with your CFLAGS and USE flags without a problem.  At that position in the command-line, the problem could be ruby.  Could you please provide (as an attachment) the full output of the emerge, plus (as another attachment) the content of /var/tmp/portage/vim-6.2_pre5/work/vim62e/src/auto/config.mk after the compilation fails?
Comment 4 Priit Laes (IRC: plaes) 2003-05-25 02:25:22 UTC
Created attachment 12380 [details]
from /var/tmp/portage/vim-6.2_pre5/work/vim62e/src/auto/
Comment 5 Priit Laes (IRC: plaes) 2003-05-25 02:35:50 UTC
Created attachment 12381 [details]
emerge output

Yep... something with ruby seems broken...  i have ruby-1.8.0_pre2
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2003-05-25 12:06:44 UTC
Thanks Priit.  That's very helpful.  Could you also attach the output of

  ruby -r mkmf -e 'Config::CONFIG.sort.each {|x,y| p({x => y})}'
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2003-05-25 12:10:06 UTC
I didn't see this part earlier...

    checking Ruby version... OK
    [BUG] unknown node type 0
    ruby 1.8.0 (2003-03-03) [i686-linux-gnu]

It appears something in your ruby installation really is broken.  My bet is that your CFLAGS break ruby, and therefore break Vim.  How about emerging ruby with CFLAGS="march=pentium3 -O3 -pipe" and see if that fixes the Vim emerge?
Comment 8 Priit Laes (IRC: plaes) 2003-05-25 12:55:00 UTC
It still failed with CFLAGS="-march=pentium3 -O3 -pipe" so tried with -O2 and it worked...
Seems like gcc optimizer bug...
Thanks Aron for your time ;)
Comment 9 Aron Griffis (RETIRED) gentoo-dev 2003-05-25 13:29:02 UTC
Since now this appears to be a gcc/ruby bug, I'm reassigning to Tom Payne to make any necessary modifications to the ruby ebuild.
Comment 10 Tom Payne (RETIRED) gentoo-dev 2003-05-28 09:17:15 UTC
I'm not sure how this should be fixed. It seems that in the ruby ebuild I'll need to check the compiler version and target processor and only replace -O3 with -O2 in specific instances. Suggestions?

Also, ruby-1.8.0_pre2 is really old now and is rightly marked unstable. The "Unknown Node Type" crops up from time-to-time and no-one (not even the ruby developers) seem to know what causes it (it's probably an compiler optimisation side effect) and I'm not aware of any fix. Is there any way of marking it "use at your own risk?" ;-)

Comment 11 Priit Laes (IRC: plaes) 2003-05-28 15:27:03 UTC
Seems fixed now in ruby-1.8.0_pre2-r2.ebuild ;)
Comment 12 Tom Payne (RETIRED) gentoo-dev 2003-06-03 10:39:35 UTC
The problem has probably gone away because of the SOCKS patch: the optimisation flags/source code combination seems very fragile :-(

Marked fixed in the meantime.