While prelinking I get: prelink: /usr/sbin/dsniff: Cannot prelink against non-PIC shared library /usr/lib/libnids.so.1.18 Is there any problem making libnids a PIC library ? Reproducible: Always Steps to Reproduce: 1.emerge libnids 2.prelink 3. Portage 2.0.51-r15 (default-linux/x86/2004.2, gcc-3.4.3, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686) ================================================================= System uname: 2.6.10-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Gentoo Base System version 1.6.9 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 10:59:12)] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r3 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe -fprefetch-loop-arrays -fforce-addr -falign-functions=4" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe -fprefetch-loop-arrays -fforce-addr -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.ITDNet.net/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac aalib acl acpi alsa arts avi bash-completion berkdb bitmap-fonts cdr crypt cups curl dba doc dvd dvdr emboss encode esd f77 fam flac font-server foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 guile hal howl imagemagick imlib ipv6 ithreads jack java jpeg junit kde ldap libg++ libwww mad mikmod mmap mmx motif mozilla mp3 mpeg mysql ncurses nls nptl nvidia oggvorbis opengl pam pdflib perl plotutils png postgres pthreads python qt quicktime readline sdl session slang spell ssl svga tcltk tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb vhosts xml xml2 xv zlib linguas_en" Unset: ASFLAGS, CBUILD, CTARGET, LDFLAGS
have you tried compiling it with -fPIC? Maybe this link could help you: http://lists.debian.org/debian-powerpc/2004/01/msg00619.html
>> have you tried compiling it with -fPIC? If this is what you mean - I do not have -fPIC in global CFLAGS. I will try playing with the ebuild adding -fPIC. If it helps I will post the updated ebuild here.
CFLAGS="-fPIC" emerge libnids
>>>> CFLAGS="-fPIC" emerge libnids Does not help. Calling 'append-flags -fPIC' in the ebuild also does not help. The thread you pointed me to suggests the problem is libnet being static. Perhaps we should have a dynamic version ? ... or build the static one -fPIC
CFLAGS="-fPIC" emerge libnids libidn it worked for me, good luck
you could try CFLAGS="-fPIC" emerge net-libs/libnet, just in case :P
Hi guys, The problem with using CFLAGS="-fPIC" is that it violates ebuild policy. "If you encounter a package that is not building shared libraries with -fPIC, patch the Makefile to build only the libraries with -fPIC." http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=3&chap=1 It would be nice if we could fix this bug the proper way :-).
Marco and I traced the problem to net-libs/libnet. If we emerge libnet with CFLAGS="-fPIC" and then emerge net-libs/libnids, prelink won't complain. I therefore believe the problem with fPIC lies in net-libs/libnet. A patch/fix to libnet is most likely required so that it builds its shared libraries with -fPIC.
If emergeing it with CFLAGS="-fPIC" worked, shouldn't 'append-flags fPIC' suffice ?
ive taken a patch from debian which causes libnet to generate both a libnet.a and a libnet.so and added it to libnet-1.1.2.1-r1