Summary: | valgrind 3.1.0 build undefined references | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Graham Murray <graham> |
Component: | [OLD] Development | Assignee: | Maurice van der Pot (RETIRED) <griffon26> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | castan.o, howard_b_golden, ticho |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Graham Murray
2005-12-03 05:46:47 UTC
The problem is that your compiler was built with a hardened gcc. Because valgrind doesn't link with glibc, it is missing some symbols referenced from libgcc. Apart from compiling valgrind with a compiler that was built with a gcc without ssp, I don't know any solutions yet, but I'll look into it. Re Comment #1: FWIW, something must have changed in this version of valgrind about the relationship with a hardened GCC, since AFAIK I've been building previous versions that way without getting the missing symbols. You're right, something did change. Also, the problem you are seeing is not just because of what I said in comment #1. Most of the error messages are actually caused by building valgrind with ssp. I'll add a filter for -fstack-protector to the ebuild. To see what difference that will make, you can build valgrind without -fstack-protector in your CFLAGS. What remains will hopefully be fixed by some changes we're currently discussing. I've modified the ebuild to make sure valgrind is not built with SSP. This should get rid of most of the messages you got. If you still have a few left in libgcc, then it is actually bug #114552 you are seeing. If you see them in valgrind itself, then please reopen this bug. Hope this helps. Thanks for the report. I get similar error, even with updated ebuild (I'm not using -fstack-protector): i686-pc-linux-gnu-gcc -m32 -mpreferred-stack-boundary=2 -fno-stack-protector -O -g -Wmissing-prototypes -Winline -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -march=pentium4 -O2 -pipe -ggdb -fno-pie -fno-stack-protector -Wno-long-long -Wdeclaration-after-statement -o memcheck-x86-linux -static -Wl,-defsym,valt_load_address=0xb0000000 -nodefaultlibs -nostartfiles -u _start -m32 -Wl,-T,../valt_load_address_x86_linux.lds memcheck_x86_linux-mac_leakcheck.o memcheck_x86_linux-mac_malloc_wrappers.o memcheck_x86_linux-mc_main.o memcheck_x86_linux-mac_shared.o memcheck_x86_linux-mc_translate.o ../coregrind/libcoregrind_x86_linux.a ../VEX/libvex_x86_linux.a -lgcc /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc.a(_udivdi3.oS): In function `__udivdi3': /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/libgcc2.c:1127: undefined reference to `__guard' /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/libgcc2.c:1129: undefined reference to `__stack_smash_handler' /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc.a(_umoddi3.oS): In function `__umoddi3': /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/libgcc2.c:1115: undefined reference to `__guard' /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/gcc/libgcc2.c:1121: undefined reference to `__stack_smash_handler' collect2: ld returned 1 exit status make[3]: *** [memcheck-x86-linux] Error 1 make[3]: Leaving directory `/var/tmp/portage/valgrind-3.1.0/work/valgrind-3.1.0/memcheck' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/valgrind-3.1.0/work/valgrind-3.1.0/memcheck' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/valgrind-3.1.0/work/valgrind-3.1.0' make: *** [all] Error 2 # emerge --info Portage 2.0.53 (hardened/x86/2.6, gcc-3.4.4, glibc-2.3.5-r3, 2.6.13-hardened-r2 i686) ================================================================= System uname: 2.6.13-hardened-r2 i686 Intel(R) Celeron(R) CPU 2.60GHz Gentoo Base System version 1.12.0_pre11 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.11 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-r1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/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/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe -ggdb" DISTDIR="/usr/gentoo/distfiles" FEATURES="autoconfig ccache collision-protect cvs digest distlocks nostrip sandbox sfperms sign strict" GENTOO_MIRRORS="http://mirror.gentoo.sk/pub ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo http://ftp.easynet.nl/mirror/gentoo" LC_ALL="sk_SK.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/gentoo/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/gentoo/portage" PORTDIR_OVERLAY="/usr/gentoo/overlay" SYNC="rsync://gentoo.ynet.sk/gentoo-portage" USE="X alsa audiofile bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo cdr crypt curl divx4linux dlloader dvd dvdr dvdread ethereal exif expat faad fam ffmpeg gdbm gif glut gpm gtk gtk2 hardened icecast idn imagemagick imlib java jpeg lcms ldap mad mbox mmx mng moznocompose moznoirc moznomail moznoxft mp3 ncurses nls nntp nptl nptlonly nvidia ogg oggvorbis opengl openssl oss pam pcre perl pic png python readline real recode rtc samba sample sdl slang sse sse2 ssl tcpd tiff truetype type1 udev unicode usb userlocales vim-with-x vorbis x86 xml2 xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS Reopening. That would be bug #114552, which has already been fixed. To get rid of your problem, you need to rebuild gcc and then rebuild valgrind. Ticho confirmed his problem went away. =) |