emerging dietlibc 0.29 fails with: bin-i386/diet gcc -pipe -march=pentium2 -O3 -fno-stack-protector -D__dietlibc__ -fno-stack-protector-all -fno-stack-protector -o bin-i386/dnsd contrib/dnsd.c /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `handle': dnsd.c:(.text+0x262): undefined reference to `sendto' dnsd.c:(.text+0x2bf): undefined reference to `socket' /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `recv6': dnsd.c:(.text+0x5ed): undefined reference to `recvmsg' /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `main': dnsd.c:(.text+0x78d): undefined reference to `socket' dnsd.c:(.text+0x7b0): undefined reference to `socket' dnsd.c:(.text+0x812): undefined reference to `bind' dnsd.c:(.text+0x8a6): undefined reference to `setsockopt' dnsd.c:(.text+0x8ce): undefined reference to `setsockopt' dnsd.c:(.text+0x928): undefined reference to `setsockopt' dnsd.c:(.text+0x961): undefined reference to `setsockopt' dnsd.c:(.text+0x996): undefined reference to `setsockopt' /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o:dnsd.c:(.text+0x9b8): more undefined references to `setsockopt' follow /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `main': dnsd.c:(.text+0xa93): undefined reference to `bind' dnsd.c:(.text+0xb43): undefined reference to `recvmsg' dnsd.c:(.text+0xc57): undefined reference to `recvmsg' collect2: ld returned 1 exit status make: *** [bin-i386/dnsd] Error 1 emerge info: Portage 2.0.53_rc7 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 2.6.13-gentoo-r1 i686) ================================================================= System uname: 2.6.13-gentoo-r1 i686 Pentium II (Deschutes) Gentoo Base System version 1.12.0_pre9 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.13 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-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-pipe -march=pentium2 -O3 -fstack-protector" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -march=pentium2 -O3 -fstack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://gentoo.mirror.solnet.ch http://trumpetti.atm.tut.fi/gentoo/" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/home/portagetmp" PORTDIR="/usr/portage" SYNC="rsync://1g.compfort.com.pl/gentoo-portage" USE="x86 alsa apm arts avi berkdb bitmap-fonts bzip2 caps chroot clearpasswd crypt curl eds elf emboss encode expat foomaticdb gd gif glibc-omitfp gmp gpm gstreamer hardened idn imlib kde libg++ libwww mad mbox mhash mikmod minimal motif mp3 mpeg ncurses nptl nptlonly ogg oggvorbis opengl oss pam pam_chroot pam_timestamp pcre pdflib perl png pwdb python qt quicktime readline sdl sendfile sftplogging ssl symlink tcpd threads truetype-fonts type1-fonts udev vorbis xinetd xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Probably hardened gcc is source of this trouble. Try to select vanilla gcc. (In reply to comment #0) > emerging dietlibc 0.29 fails with: > > bin-i386/diet gcc -pipe -march=pentium2 -O3 -fno-stack-protector -D__dietlibc__ > -fno-stack-protector-all -fno-stack-protector -o bin-i386/dnsd contrib/dnsd.c > /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `handle': > dnsd.c:(.text+0x262): undefined reference to `sendto' > dnsd.c:(.text+0x2bf): undefined reference to `socket' > /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `recv6': > dnsd.c:(.text+0x5ed): undefined reference to `recvmsg' > /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `main': > dnsd.c:(.text+0x78d): undefined reference to `socket' > dnsd.c:(.text+0x7b0): undefined reference to `socket' > dnsd.c:(.text+0x812): undefined reference to `bind' > dnsd.c:(.text+0x8a6): undefined reference to `setsockopt' > dnsd.c:(.text+0x8ce): undefined reference to `setsockopt' > dnsd.c:(.text+0x928): undefined reference to `setsockopt' > dnsd.c:(.text+0x961): undefined reference to `setsockopt' > dnsd.c:(.text+0x996): undefined reference to `setsockopt' > /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o:dnsd.c:(.text+0x9b8): > more undefined references to `setsockopt' follow > /home/portagetmp/portage/dietlibc-0.29/temp/ccafwXnA.o: In function `main': > dnsd.c:(.text+0xa93): undefined reference to `bind' > dnsd.c:(.text+0xb43): undefined reference to `recvmsg' > dnsd.c:(.text+0xc57): undefined reference to `recvmsg' > collect2: ld returned 1 exit status > make: *** [bin-i386/dnsd] Error 1
Created attachment 73709 [details] Small fix. dietlibc ebuild is missing -nopie flag, should be fixed. Ebuild with small fix is in the attachment.
indeed, with nopie flag it compiles cleanly. thanks! :)
does this work with dietlibc-0.29-r1?
so, this should finally be fixed in 0.30_pre20060501 (currently masked), please reopen if it still persists..
*** Bug 134854 has been marked as a duplicate of this bug. ***
Confirmed 0.30_pre20060501 compiles.
just a quick note that this has hopefully been fixed instead of work-arounded.. this bug existed only for i386 due to socketcalls being only defined when PIC is disabled... i removed the check and it seems to work (at least compile tested) please test 0.30-r2, thanks
works like a charm for me :) thanks
Reopening.
(In reply to comment #9) > works like a charm for me :) thanks > Good. Closing as FIXED then.
*** Bug 281141 has been marked as a duplicate of this bug. ***
The issue is reintroduced with 0.33_...
can you please test if -nopie fixes the issue?
yup, no pie worked for me this time
nopie added to 0.33_pre*, thanks.