Looks like the linking process doesn't play nice with my hardened toolchain: i686-pc-linux-gnu-gcc -Wall -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -I/usr/include/valgrind -O3 -march=athlon-xp -fomit- frame-pointer -pipe -Wdeclaration-after-statement -o callgrind -static -Wl,-defsym,valt_load_address=0xb0000000 -Wl,-T,val t_load_address.lds -nodefaultlibs -nostartfiles -u _start cg-x86.o events.o hash.o bb.o clo.o costs.o bbcc.o command.o debug .o fn.o sim.o callstack.o context.o dump.o jumps.o threads.o main.o data.o static.o -L/usr/lib/valgrind/x86-linux -lcoregrin d -lvex -lgcc cg-x86.o: In function `vgPlain_configure_caches': cg-x86.c:(.text+0x1f): undefined reference to `__guard' cg-x86.c:(.text+0xe0): undefined reference to `__guard' cg-x86.c:(.text+0x108): undefined reference to `__stack_smash_handler' events.o: In function `vgCallgrind_register_eventtype': events.c:(.text+0x20): undefined reference to `__guard' events.c:(.text+0x75): undefined reference to `__stack_smash_handler' events.o: In function `vgCallgrind_get_eventtype': events.c:(.text+0xd6): undefined reference to `__guard' events.c:(.text+0x127): undefined reference to `__guard' events.c:(.text+0x147): undefined reference to `__stack_smash_handler' events.c:(.text+0x15d): undefined reference to `__guard' events.o: In function `vgCallgrind_get_eventtype_byindex': . . . hundreds of similar errors . . . collect2: ld returned 1 exit status make[3]: *** [callgrind] Error 1 make[3]: Leaving directory `/var/tmp/portage/callgrind-0.10.1-r1/work/callgrind-0.10.1/build31' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/callgrind-0.10.1-r1/work/callgrind-0.10.1/build31' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/callgrind-0.10.1-r1/work/callgrind-0.10.1' make: *** [all] Error 2 !!! ERROR: dev-util/callgrind-0.10.1-r1 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile ebuild.sh, line 609: Called die Portage 2.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.14-hardened-r1genkernel.custom i686) ================================================================= System uname: 2.6.14-hardened-r1genkernel.custom i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 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-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer prelink sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X acl adns aim alsa apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 caps cdr cli cpdflib crypt cscope cups curl dbx dga dio directfb doc dri emboss encode esd exif expat fam fbcon ffmpeg flac flash flatfile foomaticdb fortran ftp gd gdbm gif gmp gnome gpm gstreamer gtk gtk2 hardened hardenedphp idn imagemagick imap imlib innodb ipv6 isdnlog jabber java joystick jpeg kde kerberos krb4 lcms ldap libg++ libwww mad mhash mikmod mime ming mmx mng motif mozilla mp3 mpeg mysql mysqli ncurses nis nls nptl nptlonly nsplugin odbc ogg opengl oscar pam pcntl pcre pda pdflib perl php pic pie png posix pppd prelude python qt quicktime readline reflection samba sasl sdl session shared sharedmem simplexml soap sockets speex spell spl sqlite sse ssl svga sysvipc tcltk tcpd threads tidy tiff tokenizer truetype truetype-fonts type1-fonts udev vhosts videos vorbis wmf xine xml xmlrpc xmms xorg xosd xv xvid yahoo zlib elibc_glibc kernel_linux userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 89949 [details] Full emerge log for callgrind-0.10.1-r1
does it compile without hardened? I have to admit, I'm not familar with the hardened toolchain to know how this would affect building callgrind.
I'm not sure if this is the correct way to do it, but I used gcc-config to switch to the vanilla compiler (shown as gcc-vanilla by emerge --info), but received the same result. However, I also discovered that I have an unclean installation of at least one version of gcc. So, I'm going to try to clean everything up before doing more testing.
Well, reemerging an older slotted version of gcc (which was never used in these attempts to emerge callgrind) seems to have fixed the problem. IMHO, this suggests some suspicious cross-slot interaction that should not be. But I'm afraid that's all I know.