gives: .... a - sec/dst/openssldsa_link.o a - sec/dst/opensslrsa_link.o a - sec/dst/gssapi_link.o a - sec/dst/gssapictx.o ranlib libdns.a touch timestamp gcc -fPIC -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3 -I./include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/dns/include -I../../lib/dns/include -I../../lib/dns/sec/dst/include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -DVERSION=\"9.2.3\" -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -c dig.c gcc -fPIC -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3 -I./include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/dns/include -I../../lib/dns/include -I../../lib/dns/sec/dst/include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -DVERSION=\"9.2.3\" -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -c dighost.c gcc -fPIC -o dig dig.o dighost.o libdns.so libisc.so -lnsl /usr/lib/gcc-lib/alphaev56-unknown-linux-gnu/3.3.2/../../../../alphaev56-unknown-linux-gnu/bin/ld: dig: hidden symbol `fstat' in /usr/lib/libc_nonshared.a(fstat.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [dig] Error 1 Reproducible: Always Steps to Reproduce: 1.CFLAGS="-fPIC" emerge bind-tools 2. 3. Actual Results: see in the detailed message.. Expected Results: Just link dig.
What purpose does "-fPIC" serve, and can you live without it in your CFLAGS? Perhaps this is an upstream incompatability and I should filter this flag...?
whithout -fPIC (see also bug 33336) it stops compiling even before this. Trying to link an earlier program.
Can you attach the output of emerge up to and including the error, as well as your emerge info?
Created attachment 20884 [details] emerge info
Created attachment 20885 [details] build with -fPIC
Having a similar problem on sparc: gcc -mcpu=v8 -mtune=v9 -O2 -pipe -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3 -I./include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/dns/include -I../../lib/dns/include -I../../lib/dns/sec/dst/include -I/var/tmp/portage/bind-tools-9.2.3/work/bind-9.2.3/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/nothreads/include -DVERSION=\"9.2.3\" -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -c dighost.c gcc -mcpu=v8 -mtune=v9 -O2 -pipe -o dig dig.o dighost.o libdns.so libisc.so -lnsl /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.2/../../../../sparc-unknown-linux-gnu/bin/ld: dig: hidden symbol `__umoddi3' in /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.2/libgcc.a(_umoddi3.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [dig] Error 1 emerge info: System uname: 2.4.22-sparc-r0 sparc64 sun4u Gentoo Base System version 1.4.3.12 distcc 2.11.2 sparc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) ccache version 2.3 [enabled] ACCEPT_KEYWORDS="sparc ~sparc" CFLAGS="-mcpu=v8 -mtune=v9 -O2 -pipe" CHOST="sparc-unknown-linux-gnu" COMPILER="gcc3" CXXFLAGS="-mcpu=v8 -mtune=v9 -O2 -pipe" MAKEOPTS="-j3" USE="sparc apm crypt encode fbcon foomaticdb gif jpeg mad mikmod mpeg ncurses oss png pdflib spell truetype xv xml2 xmms zlib gtkhtml gdbm berkdb slang readline arts bonobo guile sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gtk motif opengl cdr cups X gtk2 gnome -alsa -kde -qt -java -avi -apache2 -ldap -nls"
A note on the sparc problem. bind-9.2.3 itself builds fine, and bind-tools-9.2.3 will build fine if you don't adjust dig's makefile. Why changing those paths causes this, I have no clue.
My opinion, is this is something beyond bind-tools and is an issue in gcc and/or binutils. bind-tools failure: gcc -march=athlon -Os -pipe -fomit-frame-pointer -fforce-addr -fstack-protector -o dig dig.o dighost.o libdns.so libisc.so -lnsl /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: dig: hidden symbol `__stack_smash_handler' in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcc.a(_stack_smash_handler.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [dig] Error 1 firebird-db: gcc foot.o \ allp.o source/remote/merge.o \ -o gds_pipe -Lsource/jrd -Lsource/interbase/lib -lgds -ldl -lcrypt /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: gds_pipe: hidden symbol `__stack_smash_handler' in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libgcc.a(_stack_smash_handler.oS) is referenced by DSO collect2: ld returned 1 exit status make[1]: *** [gds_pipe] Error 1 make[1]: Leaving directory `/usr/obj/portage/firebird-1.0.3/work/interbase/jrd' make: *** [gds_pipe] Error 2 On my x86 box, the _stack_smash_handler.oS is the object referenced as the error. on my sparc box, the error is similar to the one reported by todd and Weeve. I haven't tried compiling these packages on mips yet to see what (if any) errors it might give, but I wouldn't be surprised if they were there and gave similar ones.
Just tested 9.2.3 on my i386 machine (P3-700) and it worked flawlessly. No errors, no failed compiles, just nothing. I previously had bind-tools 9.2.2 installed, so this is an upgrade. So is the problem fixed, or does it just not affect my system somehow?
still broken on sparc at least with 9.2.3
The hidden symbol problem is resolved now, probably fixed after an update of the gcc compiler during december. BTW, I didn't see a new version of this ebuild published and therefore didn't test before. On my alpha it works now.
However it is still broken on sparc.
if this is fixed on x86, can it be unmasked? it WFM on P-3 700.
I've reverted bind-tools's build options and committed 9.2.3-r1 to ~arch. Please test on various arch's (I can only test x86 and ppc) and report success/failure.
Looking good on sparc, compiled fine and works as expected.
Now compiles fine on alpha; dig, host & nslookup work as expected.
I'm going to call this one fixed. At a later date I'll again attempt to get BIND and its tools to use shared libraries and make nice, compact binaries that all play well with one another.
Can you unmask 9.2.3 then, please? it's been over 2 months now. Why the mask?
It's not masked at present; it was marked -arch (essentially masked on all platforms), it has been changed to ~arch, and since I haven't received any bug reports regarding the ebuild, I'll likely arch it for x86 and ppc and wait for other arch maintainers to do likewise. If you want to update and test the new bind-tools, run; ACCEPT_KEYWORDS="~x86" emerge bind-tools (Replacing "x86" with your architecture of choice).