/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/bt_compare.o: relocation R_X86_64_32S against `CDB___bam_defcmp' can not be used when making a shared object; recompile with -fPIC .libs/bt_compare.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libhtdb.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/htdig-3.2.0_beta6/work/htdig-3.2.0b6/db' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/htdig-3.2.0_beta6/work/htdig-3.2.0b6/db' make: *** [all-recursive] Error 1 Reproducible: Always Steps to Reproduce: 1. emerge htdig 2. 3. Actual Results: htdig should build without errors Portage 2.0.51.22-r1 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11.10 x86_64) ================================================================= System uname: 2.6.11.10 x86_64 AMD Opteron(tm) Processor 144 Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.10 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.5 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=k8 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo.osuosl.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acpi alsa apache2 arts avi berkdb bitmap-fonts bonobo bzlib cdr crypt cups curl dba dv dvd dvdread encode fam font-server fortran gd gdbm gif gpm guile imagemagick imlib ipv6 java jp2 jpeg junit kde libwww lzw lzw-tiff mad motif mp3 mpeg ncurses nls nptl nptlonly ogg oggvorbis opengl pam perl png posix python qt readline rtc samba sasl sdl smime ssl tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xine xml xml2 xpm xrandr xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
I have the exact same problem. /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/bt_compare.o: relocation R_X86_64_32S against `CDB___bam_defcmp' can not be used when making a shared object; recompile with -fPIC .libs/bt_compare.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libhtdb.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/htdig-3.2.0_beta6/work/htdig-3.2.0b6/db' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/htdig-3.2.0_beta6/work/htdig-3.2.0b6/db' make: *** [all-recursive] Error 1 Portage 2.0.51.22-r1 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.12-gentoo-r1 x86_64) ================================================================= System uname: 2.6.12-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.12 dev-lang/python: 2.3.4-r1, 2.4.1-r1 sys-apps/sandbox: 1.2.10 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.5 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="amd64 X acpi ada alsa arts bash-completion berkdb bitmap-fonts cdr crypt curl debugger doc eds esd fam font-server fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 haskell imagemagick imlib ipv6 java jp2 jpeg junit kde libwww live lzw lzw-tiff mad mozilla mp3 mysql ncurses nls nvidia ogg opengl oss pam pascal perl php png python qt readline real reiserfs ruby samba sdl sql sqlite ssl subversion tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales vorbis wxwindows xine xinerama xml xml2 xmms xpm xrandr xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
I had this exact bug. For me, this command resulted in a successful compile: CFLAGS="-march=k8 -O3 -pipe -fPIC" emerge htdig Happy compiling!
Adding -fPIC is no acceptable solution to this BUG. Web-Apps team: I commited a patch which modifies the Makefile.am files to specify -fPIC -DPIC when building object for the shared libraries libhtdb.so and libth.so. Could you relay this to uptream please? TIA In CVS, FIXED!
I'll try, but FYI, htdig development seems to be pretty inactive these days...
Here's what I got from one of the UPSTREAM devs. amd64 folks, please advise. I'll add Geoff to the cc list. ---- I'm confused. Since we basically use libtool to set the compilation flags, are you sure this is an ht://Dig bug or a libtools one? Are we using an outdated libtool for AMD64? Or are we doing something else non-standard with setting the compilation flags for shared libraries? Thanks, -Geoff
emerged htdig-3.2.0_beta6 ~amd64, htdigged and searched without problems!
OK, i found the reason. The build makes 2 big errors. 1st: It globally adds -Wno-deprecated to CPPFLAGS _before_ running configure 2nd: It globally append-flags -Wno-deprecated _before_ running configure Both actions cause configure to do this: configure:7079: gcc -c -march=k8 -O2 -pipe -ftracer -Wno-deprecated Wno-deprecated -Wno-deprecated -Wno-deprecated -Wno-deprecated -fPIC -DPIC conftest.c >&5 cc1: warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C cc1: warning: command line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C configure:7083: $? = 0 configure:7094: result: no rl03: Please remove -Wno-deprecated from the ebuild, or at least move it to a place below configure. I'd favour the first, as gcc complains about it all the way during compile of the ebuild. Further it'd only affects warnings and thus is not necessary for building the package.
14:19 <@rl03> Kugelfang: feel free to make the changes yourself I removed the -Wno-deprecated completely... InCVS