i hope i'm not the only one hitting this problem :) building guile-1.8.5 with -O1 and it'll emerge fine. bumping up to -O2 and it'll segfault: make[3]: Entering directory `/var/tmp/portage/dev-scheme/guile-1.8.5/work/guile-1.8.5/libguile' cat alist.doc arbiters.doc ....... regex-posix.doc | GUILE="/var/tmp/portage/dev-scheme/guile-1.8.5/work/guile-1.8.5/pre-inst-guile" ../scripts/snarf-check-and-output-texi > guile-procedures.texi 12741 Segmentation fault | GUILE="/var/tmp/portage/dev-scheme/guile-1.8.5/work/guile-1.8.5/pre-inst-guile" ../scripts/snarf-check-and-output-texi > guile-procedures.texi make[3]: *** [guile-procedures.texi] Error 1 here's the gdb output: root@G5[ppc] 0:1 .libs # export LD_LIBRARY_PATH=. root@G5[ppc] 0:0 .libs # gdb --args ./guile --help (gdb) r Starting program: /var/tmp/portage/dev-scheme/guile-1.8.5/work/guile-1.8.5/libguile/.libs/guile --help [Thread debugging using libthread_db enabled] [New Thread 0xf7e52430 (LWP 12814)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf7e52430 (LWP 12814)] scm_mark_locations (x=0xfffade48, n=4294967180) at gc-mark.c:435 435 SCM obj = * (SCM *) &x[m]; (gdb) bt #0 scm_mark_locations (x=0xfffade48, n=4294967180) at gc-mark.c:435 #1 0x0ff56178 in scm_threads_mark_stacks () at threads.c:1373 #2 0x0fefb97c in scm_mark_all () at gc-mark.c:82 #3 0x0fefa860 in scm_i_gc (what=<value optimized out>) at gc.c:598 #4 0x0fefaa80 in scm_gc_for_newcell (freelist=0xffac7c4, free_cells=0x10014080) at gc.c:509 #5 0x0ff390ac in make_stringbuf (len=16) at ../libguile/inline.h:186 #6 0x0ff39118 in scm_i_c_make_symbol (name=0xff8cca0 "string-trim-both", len=<value optimized out>, flags=<value optimized out>, hash=<value optimized out>, props=<value optimized out>) at strings.c:430 #7 0x0ff540fc in scm_i_c_mem2symbol (name=0xff8cca0 "string-trim-both", len=16) at symbols.c:136 #8 0x0ff28d88 in scm_c_make_subr (name=0xff8cca0 "string-trim-both", type=85, fcn=0xff4b86c <scm_string_trim_both>) at procs.c:66 #9 0x0ff0898c in create_gsubr (define=1, name=0xff8cca0 "string-trim-both", req=1, opt=3, rst=0, fcn=0xff4b86c <scm_string_trim_both>) at gsubr.c:78 #10 0x0ff440a4 in scm_init_srfi_13 () at ../libguile/srfi-13.x:24 #11 0x0ff0d548 in scm_i_init_guile (base=0xfffade48) at init.c:514 #12 0x0ff571fc in scm_i_init_thread_for_guile (base=0xfffade48, parent=0x0) at threads.c:561 #13 0x0ff5726c in scm_i_with_guile_and_parent (func=0xff0d2bc <invoke_main_func>, data=0xfffade88, parent=<value optimized out>) at threads.c:694 #14 0x0ff57394 in scm_with_guile (func=<value optimized out>, data=<value optimized out>) at threads.c:683 #15 0x0ff0d2a4 in scm_boot_guile (argc=<value optimized out>, argv=<value optimized out>, main_func=<value optimized out>, closure=<value optimized out>) at init.c:350 #16 0x1000228c in main (argc=2, argv=0xfffae134) at guile.c:74 (gdb) and emerge info: Portage 2.1.5.6 (default-linux/ppc/ppc32/2006.1, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25.7 ppc) ================================================================= System uname: 2.6.25.7 ppc PPC970MP, altivec supported Timestamp of tree: Wed, 18 Jun 2008 04:01:01 +0000 distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-lang/python: 2.4.4-r13, 2.5.2-r4 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.15.90.0.3-r5, 2.16.1-r3, 2.16.91.0.3, 2.16.91.0.4, 2.16.91.0.5, 2.16.91.0.6, 2.16.91.0.7, 2.16.92, 2.16.93, 2.16.94, 2.17-r2, 2.17.50.0.2, 2.17.50.0.3, 2.17.50.0.4, 2.17.50.0.5, 2.17.50.0.6, 2.17.50.0.7, 2.17.50.0.8, 2.17.50.0.9, 2.17.50.0.10, 2.17.50.0.11, 2.17.50.0.12, 2.17.50.0.13, 2.17.50.0.14, 2.17.50.0.15, 2.17.50.0.16, 2.17.50.0.17, 2.17.50.0.18, 2.18-r1, 2.18.50.0.1, 2.18.50.0.2, 2.18.50.0.3, 2.18.50.0.4, 2.18.50.0.5, 2.18.50.0.6, 2.18.50.0.7 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="ppc ~ppc" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-Wall -O2 -mcpu=970 -pipe -g" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-Wall -O2 -mcpu=970 -pipe -g" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests buildpkg ccache distlocks noinfo parallel-fetch sandbox sfperms splitdebug unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF8" LDFLAGS="-Wl,-O1 -Wl,-z,relro" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages/powerpc-unknown-linux-gnu" PORTAGE_COMPRESS="lzma" PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/manifest1_obsolete" 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="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://gentoo/gentoo-portage" USE="X a52 aac aalib acl alsa altivec amr apache2 arts asf audiofile berkdb bitmap-fonts bonobo boundschecking bzip2 cairo cddb cdparanoia cdr cli console cracklib crypt css cups curl dbus directfb divx dri dts dvd dvdr dvdread emboss encode exif fame ffmpeg firefox flac fontconfig fortran ftp gd gif gimp glitz gphoto2 gpm gstreamer gtk gtkhtml iconv ieee1394 imagemagick ipv6 isdnlog jbig jpeg jpeg2k kde lcms ldap libcaca libwww lzo mad matroska midi mikmod mjpeg mng modplug mozilla mp3 mp4 mpeg mudflap multislot musepack musicbrainz ncurses nls nptl nptlonly ogg openal opengl openmp pcre pdf perl php png ppc ppds pppd pulseaudio python qt3 qt4 quicktime readline reflection rle samba sasl scanner sdl session sndfile snmp speex spell spl sqlite ssl subversion svg tcl tcltk tcpd tga theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis wma wmp wxwindows x264 xanim xinerama xinetd xml xorg xosd xpm xprint xrandr xv xvid yv12 zip zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard joystick void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia nv nouveau ati r128 radeon vga sisusb" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS_FLAGS
Created attachment 157439 [details] dev-scheme:guile-1.8.5:20080618-142632.log
(In reply to comment #0) > i hope i'm not the only one hitting this problem :) Nope, I experienced exactly the same and came to the same conclusion wrt -O1 versus -O2. emerge --info: Portage 2.1.5.5 (default-linux/ppc/ppc32/2007.0/G4, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24-hardened-r2 ppc) ================================================================= System uname: 2.6.24-hardened-r2 ppc 7447A, altivec supported Timestamp of tree: Wed, 18 Jun 2008 16:31:01 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.3-r4, 2.5.2-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="ppc ~ppc" CBUILD="powerpc-unknown-linux-gnu" CFLAGS="-O2 -mtune=G4 -maltivec -mabi=altivec -Wstrict-aliasing -pipe -msecure-plt" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -mtune=G4 -maltivec -mabi=altivec -Wstrict-aliasing -pipe -msecure-plt" DISTDIR="/packages" FEATURES="buildpkg collision-protect cvs distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://pandemonium.tiscali.de/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LANG="en_GB.UTF-8" LC_ALL="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" 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="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac acl alsa altivec apache2 arts avahi berkdb bitmap-fonts bonobo bzip2 cairo cdr cli cracklib crypt cups dbus divx4linux dlloader dri dvd dvdread eds emboss encode esd exif firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk gtkhtml hal iconv imlib ipv6 isdnlog jpeg jpeg2k kde ldap libnotify libwww mad mdnsresponder-compat midi mikmod mozilla mp3 mpeg mudflap ncurses network nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppc pppd python qt3 qt4 quicktime readline reflection ruby sdl session spell spl ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode userlocales vorbis xine xml xorg xv xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
I also have this problem. As a workaround you can specify custom CFLAGS in /etc/portage/env/dev-libs/guile, without -O2. For example: $ cat /etc/portage/env/dev-libs/guile CFLAGS="-O1 -mcpu=7400 -maltivec -mabi=altivec -pipe" CXXFLAGS="${CFLAGS}"
Created attachment 171705 [details, diff] stack-backwards.patch Could someone on ppc please try the attached patch?
(In reply to comment #4) > Created an attachment (id=171705) [edit] > stack-backwards.patch > > Could someone on ppc please try the attached patch? I'm sorry, but the problem persists.
Created attachment 172411 [details] Fix build issue on mips, mipsel, powerpc and ia64 (stack direction) Another patch to try.
(In reply to comment #6) > Created an attachment (id=172411) [edit] > Fix build issue on mips, mipsel, powerpc and ia64 (stack direction) > > Another patch to try. This doesn't apply cleanly to 1.8.5 and when I apply it manually the compilation still segfaults.
Please try 1.8.6 which contains a lot of build related fixes.
Y(In reply to comment #8) > Please try 1.8.6 which contains a lot of build related fixes. Yes, guile-1.8.6 compiles fine. We also should get this stable before GCC 4.3.
I'm re-opening this bug because, AFAIK, guile-1.8.6 is not stable on ppc/ppc64 at the moment.
dev-scheme/guile-1.8.6 is now stable for ppc/ppc64. It is fixing this bug.