Trying to emerge gnucash-2.0.2. The compilation fails on my amd64 with the following: x86_64-pc-linux-gnu-gcc -shared .libs/Account.o .libs/FreqSpec.o .libs/Recurrence.o .libs/Group.o .libs/Period.o .libs/Query.o .libs/SchedXaction.o .libs/SX-book.o .libs/SX-ttinfo.o .libs/Scrub.o .libs/Scrub2.o .libs/Scrub3.o .libs/Split.o .libs/TransLog.o .libs/Transaction.o .libs/cap-gains.o .libs/cashobjects.o .libs/gnc-associate-account.o .libs/gnc-budget.o .libs/gnc-commodity.o .libs/gnc-engine.o .libs/gnc-filepath-utils.o .libs/gnc-hooks.o .libs/gnc-lot.o .libs/gnc-pricedb.o .libs/gnc-session.o .libs/gnc-session-scm.o .libs/gncmod-engine.o .libs/policy.o -Wl,--whole-archive ../../lib/libc/.libs/libc-missing.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/var/tmp/portage/gnucash-2.0.2/work/gnucash-2.0.2/src/gnc-module/.libs -Wl,--rpath -Wl,/var/tmp/portage/gnucash-2.0.2/work/gnucash-2.0.2/src/core-utils/.libs -Wl,--rpath -Wl,/var/tmp/portage/gnucash-2.0.2/work/gnucash-2.0.2/lib/libqof/qof/.libs -L/var/tmp/portage/gnucash-2.0.2/work/gnucash-2.0.2/src/core-utils/.libs ../gnc-module/.libs/libgncmodule.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../ -L/usr/lib64 ../core-utils/.libs/libcore-utils.so /usr/lib64/libgwrap-wct.so /usr/lib64/libgwrap-glib.so ../../lib/libqof/qof/.libs/libgncqof.so /usr/lib64/libgthread-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libpopt.so -lm -pthread -march=k8 -pthread -Wl,--export-dynamic -Wl,-soname -Wl,libgncmod-engine.so.0 -o .libs/libgncmod-engine.so.0.0.0 /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/Account.o: relocation R_X86_64_PC32 against `acc_free' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status emerge --info follows Portage 2.1.1-r1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r7 x86_64) ================================================================= System uname: 2.6.17-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3700+ Gentoo Base System version 1.12.5 Last Sync: Tue, 24 Oct 2006 23:30:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.3-r4 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-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O0 -pipe" CHOST="x86_64-pc-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/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=k8 -O0 -pipe" DISTDIR="/mnt/gentoo/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo " MAKEOPTS="-j2" PKGDIR="/mnt/gentoo/packages.amd64" 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="/mnt/gentoo/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 alsa arts berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dlloader dri dv dvd dvdr dvdread eds elibc_glibc emboss encode esd fam ffmpeg firefox flac foomaticdb fortran gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 hal imagemagick input_devices_keyboard input_devices_mouse isdnlog jpeg kde kernel_linux ldap libg++ mad mbox mikmod mjpeg mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection scanner sdl session spell spl ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa vorbis xml xorg xscreensaver xv xvid xvmc zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
This is a bug in GCC 4.1.1. You can work around the issue by replacing the "-O0" in your CFLAGS with "-O2". *** This bug has been marked as a duplicate of 151832 ***