<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>126779</bug_id>
          
          <creation_ts>2006-03-19 03:38 0000</creation_ts>
          <short_desc>yacas is broken with -fomit-frame-pointer</short_desc>
          <delta_ts>2006-04-15 01:59:20 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>2006.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>rohan@mcgovern.id.au</reporter>
          <assigned_to>sci@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>rohan@mcgovern.id.au</who>
            <bug_when>2006-03-19 03:38:17 0000</bug_when>
            <thetext>On my system, I found that compiling yacas with -fomit-frame-pointer breaks error handling within yacas.

First, yacas failed to work at all.  Running it would cause it to terminate with:
terminate called after throwing an instance of &apos;int&apos;

I ltrace&apos;d it and found it to be caused by a failed dlopen(), looking for libmath.  Executing with the following commandline would work:
LD_LIBRARY_PATH=/usr/lib/yacas yacas

But the error should never have happened in the first place, because any errors attempting to load libmath are supposed to be caught in /usr/share/yacas/yacasinit.ys:

If(Equals(LoadPlugIns,False),
  [
    Use(&quot;base.rep/math.ys&quot;);
  ],
  [
    TrapError(DllLoad(&quot;libmath&quot;),Use(&quot;base.rep/math.ys&quot;));
  ]
  );

After getting yacas to run with LD_LIBRARY_PATH as above, I found that it fails on any invalid command.  Example:

In&gt; This is not a valid command.
terminate called after throwing an instance of &apos;int&apos;

Recompiling without -fomit-frame-pointer made the above problems go away:

In&gt; This is not a valid command.
String(1) : Error parsing expression, near token is

It seems -fomit-frame-pointer breaks yacas&apos; internal error handling.  Please consider filtering it in the ebuild.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2006-04-09 05:02:07 0000</bug_when>
            <thetext>Hi Rohan,

Thanks for your report. Unfortunately, I can not reproduce it
since yacas works just fine compiled with -fomit-frame-pointer
on my box. Your issues with dlopen are strange but hard to
debug for me at the moment. If you still have these
issues please post your emerge --info.

best,
Markus</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rohan@mcgovern.id.au</who>
            <bug_when>2006-04-11 16:39:24 0000</bug_when>
            <thetext>I did some more experimenting, and it seems that the combination of &quot;-Os -fomit-frame-pointer&quot; is what causes the problem.  Sorry for not attaching &apos;emerge --info&apos; the first time around, it did not occur to me that it could be a combination of two or more flags.

The error occurred when I was compiling with CFLAGS=&quot;-march=pentium-m -Os -pipe -fomit-frame-pointer&quot;.  Removing -fomit-frame-pointer OR changing -Os to -O2 makes the problem go away.

My &apos;emerge --info&apos; (with CFLAGS set to those which cause problems):

Gentoo Base System version 1.6.14
Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15-suspend2-r5 i686)
=================================================================
System uname: 2.6.15-suspend2-r5 i686 Intel(R) Celeron(R) M processor         1500MHz
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-march=pentium-m -Os -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /usr/share/namazu/template /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d&quot;
CXXFLAGS=&quot;-march=pentium-m -Os -pipe -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox&quot;
GENTOO_MIRRORS=&quot;http://mirror.pacific.net.au/linux/Gentoo ftp://mirror.pacific.net.au/linux/Gentoo http://ftp.swin.edu.au/gentoo http://gentoo.seren.com/gentoo http://mirror.espri.arizona.edu/gentoo/ http://mirror.isp.net.au/ftp/pub/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.datapipe.net/gentoo ftp://ftp.swin.edu.au/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo/&quot;
LDFLAGS=&quot;-Wl,-O1&quot;
LINGUAS=&quot;en_AU en_GB en&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage /usr/local/portage-java&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X aac aalib acpi aiglx alsa asf audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cap cdparanoia cdr compositor crypt cups curl dbus dhcp directfb divx4linux dlloader doc dri dvd emboss encode ethereal exif expat ext-doc ext-html ext-koffice ext-mail ext-openoffice ext-pdf ext-ppt ext-ps ext-rtf ext-tex ext-xls extras fam fbcon fbsplash firefox flac fontconfig foomaticdb fortran gcj gd gdbm gif glitz glut glx gmp gstreamer guile hal hdf5 i8x0 idn imagemagick imlib ipv6 isdnlog java javascript jikes jpeg junit kde kdeenablefinal kdepim kdgraphics lcms libg++ libwww lua lzo lzw mad mikmod mmx mmx2 mmxext mng mod mono motif mozsvg mp3 mpeg musicbrainz mysql ncurses nls nowin nptl nsplugin objc offensive ogg oggvorbis ole openal opengl oss pam pam_console pcmcia pcre pdf pdflib perl pic png ppds pppd qt rdesktop readline recode rogue samba scanner sdl slang slp sms snmp speex spell sqlite sse sse2 ssl subversion svg tcpd tetex theora threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l v4l2 vcd visualization vorbis wifi win32codecs wma wmf xatrix xattr xcomposite xine xml xml2 xscreensaver xv xvmc zeroconf zlib video_cards_i810 video_cards_i915 input_devices_synaptics input_devices_keyboard input_devices_mouse input_devices_evdev linguas_en_AU linguas_en_GB linguas_en userland_GNU kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cryos@gentoo.org</who>
            <bug_when>2006-04-12 00:54:54 0000</bug_when>
            <thetext>-Os seems to still cause issues with a number of things as I remember it. I would be more tempted to substitute -O2 for -Os in this case rather than filtering -fomit-frame-pointer. Anyone else have any opinions on this?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rohan@mcgovern.id.au</who>
            <bug_when>2006-04-12 02:37:07 0000</bug_when>
            <thetext>I concur with comment #3.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cryos@gentoo.org</who>
            <bug_when>2006-04-15 01:59:20 0000</bug_when>
            <thetext>sci-mathematics/yacas-1.0.61 fixed now - -Os is replaced with -O2. Thanks for reporting the issue.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>