Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98357 - building htdig-3.2-0_beta6 needs -fPIC loving
Summary: building htdig-3.2-0_beta6 needs -fPIC loving
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-07-08 08:17 UTC by Johannes Hirte
Modified: 2005-08-01 05:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Hirte 2005-07-08 08:17:50 UTC
/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
Comment 1 Kenneth Perry 2005-07-09 12:39:37 UTC
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 
 
Comment 2 Brian Rowe 2005-07-09 14:44:04 UTC
I had this exact bug.  For me, this command resulted in a successful compile:

CFLAGS="-march=k8 -O3 -pipe -fPIC" emerge htdig

Happy compiling!
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2005-07-09 17:44:33 UTC
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!
Comment 4 Renat Lumpau (RETIRED) gentoo-dev 2005-07-09 17:47:16 UTC
I'll try, but FYI, htdig development seems to be pretty inactive these days...
Comment 5 Renat Lumpau (RETIRED) gentoo-dev 2005-07-11 19:45:39 UTC
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
Comment 6 fred nijdam 2005-07-19 12:58:19 UTC
emerged htdig-3.2.0_beta6 ~amd64, htdigged and searched without problems!
Comment 7 Danny van Dyk (RETIRED) gentoo-dev 2005-08-01 04:53:21 UTC
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.
Comment 8 Danny van Dyk (RETIRED) gentoo-dev 2005-08-01 05:56:03 UTC
14:19 <@rl03> Kugelfang: feel free to make the changes yourself

I removed the -Wno-deprecated completely... InCVS