Hi, Emerging dev-scheme/drscheme-4.1 fails with the following: env XFORM_USE_PRECOMP=xsrc/precomp.h ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/salloc.c ./../src/salloc.c env XFORM_USE_PRECOMP=xsrc/precomp.h ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/bignum.c ./../src/bignum.c make[4]: *** [xsrc/salloc.c] Segmentation fault make[4]: *** Waiting for unfinished jobs.... make[4]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2' make[3]: *** [all] Error 2 make[3]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2' make[2]: *** [3m] Error 2 make[2]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme' make[1]: *** [3m] Error 2 make[1]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src' make: *** [all] Error 2 emerge --info follows: root@trillian:~# emerge --info Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686) ================================================================= System uname: 2.6.24-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz Timestamp of tree: Fri, 12 Sep 2008 14:04:02 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13, 2.5.2-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=pentium4 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer notitles parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org" LC_ALL="en_US.UTF-8" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl acpi alsa apache2 apm arts asf audiofile avahi bash-completion berkdb bluetooth bootsplash bzip2 cairo caps cdda cddb cdparanoia cjk cli cracklib crypt cscope css ctype cups curl cvs dbus directfb djvu dri dts dv dvd dvdnav dvdread dvi emacs encode esd exif fam fame fat fbcon ffmpeg flac fortran ftp fuse gcj gd gdbm gif gimpprint glitz glut gnuplot gphoto2 gpm graphviz gstreamer gtk gtkhtml hal haskell howl iconv id3tag idn ieee1394 imagemagick imap imlib ipv6 jack java javascript jpeg jpeg2k justify kde kdeenablefinal kdexdeltas kerberos krb4 ladspa latex lcms ldap libcaca libsamplerate lm_sensors mad mbox mdnsresponder-compat midi mime mjpeg mmx mmxext mng mono mozilla moznocompose moznoirc moznomail mozsvg mp3 mpeg mplayer msn mudflap mule mysql ncurses network nls nptl nsplugin ntfs objc objc++ objc-gc offensive ogg opengl openmp pcre pdf perl php plotutils png pop3d posix ppds python qt3 qt4 quicktime rdesktop readline real reflection reiserfs rtsp ruby samba sasl scanner sdl session slang sndfile snmp sockets softmmu sox speech speex spell spl sse sse2 ssl stream subtitles subversion svg svga svnserve symlink syslog sysvipc tcl tcltk tcpd tetex theora threads tiff timidity tk tokenizer toolbar transcode truetype twolame type1 unicode usb utempter v4l v4l2 vamp vcd vorbis wavpack wifi win32codecs wma wmf x264 x86 xattr xcomposite xine xml xorg xpm xv xvid zeroconf zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dav_svn dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always
I can confirm that `-O3` option is what causes an error; the emerge finishes fine with `-O2`. Probably a GCC issue.
(In reply to comment #1) > I can confirm that `-O3` option is what causes an error; the emerge finishes > fine with `-O2`. Probably a GCC issue. Yup, with -O2 it works. Should this bug be closed or marked as a GCC one? (There seem to be lots of -Ox related GCC bugs reported on bugzilla.)
make[4]: Entering directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2' env XFORM_PRECOMP=yes ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/precomp.h ./precomp.c make[4]: *** [xsrc/precomp.h] Segmentation fault make[4]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2' make[3]: *** [all] Error 2 make[3]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2' make[2]: *** [3m] Error 2 make[2]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme' make[1]: *** [3m] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src' make: *** [all] Error 2 Pretty much the same here. Not necesarily a gcc bug though. The crash happens in scheme_apply which does a lot of error-prone stuff. This could easily be a buffer-overflow that only shows with optimization enabled.
*** Bug 256044 has been marked as a duplicate of this bug. ***
There's no package named dev-scheme/drscheme, which is why I couldn't find this bug (was it renamed?). Please change the summary :) BTW, the segfault still occurs with the latest version - 4.1.4.
yes, it was renamed. The segfault is different, but I'm guessing it's again because of -O3. I'll talk to upstream about it and am open to suggestions.
(In reply to comment #1) > I can confirm that `-O3` option is what causes an error; the emerge finishes > fine with `-O2`. Probably a GCC issue. > I confirm this bug and behavior for -march=amdfam10
Still happens in 4.1.5 (fail with -O3, win with -O2).
I spoke to upstream and I think they fixed this in 4.2. Can someone confirm that please?
(In reply to comment #9) > I spoke to upstream and I think they fixed this in 4.2. > Can someone confirm that please? Fixed in 4.2, I confirm.
Thanks.