While building paludis with gcov support I get: --- 8< --- /bin/sh ../../libtool --tag=CXX --mode=link g++ -I../.. -Wall -Wextra -Wold-style-cast -Wredundant-decls -Wstrict-null-sentinel -Wmissing-noreturn -Woverloaded-virtual -pedantic -O1 -fno-inline-functions -fprofile-arcs -ftest-coverage -pg -g -ggdb3 -o dosha256 dosha256.o ../../paludis/digests/libpaludisdigests.la g++ -I../.. -Wall -Wextra -Wold-style-cast -Wredundant-decls -Wstrict-null-sentinel -Wmissing-noreturn -Woverloaded-virtual -pedantic -O1 -fno-inline-functions -fprofile-arcs -ftest-coverage -pg -g -ggdb3 -o .libs/dosha256 dosha256.o ../../paludis/digests/.libs/libpaludisdigests.so /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: .libs/dosha256: hidden symbol `__gcov_init' in /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcov.a(_gcov.o) is referenced by DSO /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status --- 8< --- The symbol is there and it is definitely not hidden: --- 8< --- [ $ ~ ] nm /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcov.a | grep init 00000090 T __gcov_init --- 8< --- My emerge --info is as follows: --- 8< --- Portage 2.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.15.1 i686) ================================================================= System uname: 2.6.15.1 i686 AMD Athlon(TM) XP 2000+ Gentoo Base System version 1.12.4 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: 0.4.2-r1 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-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.4.3-r1, 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /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/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect cvs distlocks fixpackages metadata-transfer notitles sandbox sfperms sign strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LANG="en_GB.utf8" LINGUAS="en es" 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/overlays/cross-compilers /home/ferdy/gentoo/overlay /usr/local/overlays/zamorate-overlay /usr/portage/local/layman/repodoc-overlay /usr/portage/local/layman/sunrise" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa avi berkdb bitmap-fonts bzip2 cairo cdr cli clisp crypt cups dbus dga dlloader dri dvd dvdr emboss encode ethereal fam fbcon firefox gd gdbm gif gstreamer gtk gtk2 hal imap imlib2 ipv6 isdnlog jpeg libg++ lirc mad maildir mailwrapper mikmod mmx mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png ppds pppd python qt4 quicktime radeon readline reflection samba sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode v4l vorbis win32codecs xml xorg xv zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux linguas_en linguas_es lirc_devices_avermedia userland_GNU video_cards_radeon video_cards_vesa video_cards_fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS --- 8< --- - ferdy
Same error here on amd64.
and how do you reproduce this paludis builds just fine for me with 4.1.1
Build it with CXXFLAGS="-O1 -fno-inline-functions -fprofile-arcs -ftest-coverage -pg -g -ggdb3" to get gcov support and see it bail. - ferdy
Adding LDFLAGS=-lgcov works. I don't know if this is considered a bug but it is definitely a different behaviour from gcc-3.4.6. - ferdy
i'm not sure this is a bug in gcc the problem is that libtool generates paludis/digests/.libs/libpaludisdigests.so with 'g++ -shared -nostdlib ... -pg ... -o .libs/libpaludisdigests.so.12.0.0' then it builds the digest binaries like: g++ ... -pg ... dormd160.c -o dormd160 ../../paludis/digests/.libs/libpaludisdigests.so since libpaludisdigests.so did not have the gcov code pulled in, you now get the failure about gcov symbols being referenced by the DSO
Created attachment 104984 [details] gcov-libtool.tar.bz2 reduced test case ... fails for me with gcc-3.4.x as well
upstream has fixed this
*** Bug 187455 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > upstream has fixed this > upstream for which package? and if it was fixed in January, how come I ran into it yesterday?
as the summary says, it's a bug in libtool. one could therefore draw the conclusion that the upstream libtool project has fixed this in their latest sources.