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

Bug 8290

Summary: ruby ebuild BUG
Product: Gentoo Linux Reporter: Kurt Hindenburg <kurt.hindenburg>
Component: New packagesAssignee: Tom Payne (RETIRED) <twp>
Status: RESOLVED FIXED    
Severity: normal CC: karltk, kennyj449, rphillips
Priority: High    
Version: 1.4_rc1   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Kurt Hindenburg 2002-09-24 01:10:10 UTC
Just upgraded to 1.4 rc1 and ruby won't build.  Could this be a gcc3.2 issue?

chmod 0644
/mnt/zeta/var/tmp/portage/ruby-1.6.7/image//usr/lib/ruby/1.6/irb/ruby-token.rb
lib/irb/completion.rb ->
/mnt/zeta/var/tmp/portage/ruby-1.6.7/image//usr/lib/ruby/1.6/irb/completion.rb
/mnt/zeta/var/tmp/portage/ruby-1.6.7/work/ruby-1.6.7/lib/ftools.rb:33: [BUG]
Segmentation fault
ruby 1.6.7 (2002-03-01) [i686-linux-gnu]
make: *** [install] Aborted

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_install, Line 1, Exitcode 2
!!! (no error message)
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-09-26 10:54:21 UTC
I cannot reproduce this. Tested it with 1.4_rc1, gcc-3.2, CFLAGS="-march=i686
-O3 -pipe", and CFLAGS="-mcpu=pentium -O3", for dev-lang/ruby-1.6.7, even using
nothing but the i386-stage3 tarball.

Unless it stops at the same place every time you compile it, it's most likely a
hardware problem, such as faulty RAM. It may also be a problem with too
aggressive optimisation options; try using just -O3.

Without being able to reproduce this, there's little I can do to fix it. If you
figure out what causes this, please reopen the bug and I'll have another go.
Comment 2 Jon Nials 2002-12-23 20:12:17 UTC
The exact problem occurs at the exact same place for me as well.  Just to ensure
it is not a memory problem, I have run it 10 times in a row, each failing at the
exact same spot.

I have a very unagressive set of CFLAGS....

CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer"

HOWEVER, if you remove -fomit-frame-pointer it compiles cleanly.

I am running 1.4 fully updated on a regular basis.

I suspect given the flag change causes it to work, this is a GCC 3.2 issue.
Comment 3 Kurt Hindenburg 2003-04-23 02:42:18 UTC
As far as I see it you can do one of 3 things:
1. Ignore this.
2. Put an 'ewarn' in the ebuild stating that an over-aggressive CFLAGS will cause compilation problems.
3. Actually checking CFLAGS and removing "bad" options.

#2 seems the easiest.  If the compilation fails, the user will see the warning messages and know to adjust their CFLAGS.

Perhaps putting that you think the problem is -fomit-frame-pointer would be helpful. 
Comment 4 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2003-05-03 08:38:52 UTC
Perhaps the ruby team should have a list of sanctioned optimisation flags? I can't get to this anytime soon, I'm afraid.
Comment 5 Tom Payne (RETIRED) gentoo-dev 2003-05-06 07:03:34 UTC
*** Bug 12545 has been marked as a duplicate of this bug. ***
Comment 6 Tom Payne (RETIRED) gentoo-dev 2003-05-11 06:44:53 UTC
Ebuilds updated to use flag-o-matic/filter-flags. -fomit-frame-pointer was already filtered out when I update this so presumably it's already fixed?

Will keep an eye out for other CFLAGS that cause problems.