Evince-0.4 fails to build without -fPIC. <snip> Making all in lib make[2]: Entering directory `/var/tmp/portage/evince-0.4.0-r2/work/evince-0.4.0/lib' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/var/tmp/portage/evince-0.4.0-r2/work/evince-0.4.0/lib' Making all in properties make[2]: Entering directory `/var/tmp/portage/evince-0.4.0-r2/work/evince-0.4.0/properties' /bin/sh ../libtool --mode=link x86_64-pc-linux-gnu-gcc -march=athlon64 -Os -pipe -fomit-frame-pointer -ffast-math -freorder-blocks -o libevince-properties-page.la -rpath /usr/lib64/nautilus/extensions-1.0/ libevince_properties_page_la-ev-properties-main.lo -Wl,--export-dynamic -pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-keyring -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lgthread-2.0 -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lz -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lpoppler-glib -lpoppler -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -ltiff -lz -pthread -Wl,--export-dynamic -lnautilus-extension -lgtk-x11-2.0 -lgnomevfs-2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lbonobo-2 -lgconf-2 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 ../lib/libev.la libevproperties.la libtool: link: warning: `/usr/lib/libjpeg.la' seems to be moved x86_64-pc-linux-gnu-gcc -shared .libs/libevince_properties_page_la-ev-properties-main.o -Wl,--whole-archive ../lib/.libs/libev.a ./.libs/libevproperties.a -Wl,--no-whole-archive /usr/lib64/libgnomeui-2.so -L/usr/lib64 -L/usr/lib -lSM -lICE /usr/lib64/libbonoboui-2.so /usr/lib64/libgnome-keyring.so /usr/lib64/libgnomecanvas-2.so /usr/lib64/libgnome-2.so /usr/lib64/libpopt.so /usr/lib64/libart_lgpl_2.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libglade-2.0.so /usr/lib64/libxml2.so /usr/lib64/libpoppler-glib.so -L/usr/x86_64-pc-linux-gnu/bin -L/usr/x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/../../../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4 /usr/lib64/libpoppler.so /usr/lib64/libtiff.so -lz /usr/lib64/libnautilus-extension.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgnomevfs-2.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libcairo.so /usr/lib64/libgobject-2.0.so /usr/lib64/libbonobo-2.so /usr/lib64/libgconf-2.so /usr/lib64/libbonobo-activation.so /usr/lib64/libORBit-2.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libgthread-2.0.so /usr/lib64/libglib-2.0.so /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/libstdc++.so -L/lib/../lib64 -L/usr/lib/../lib64 -lm -lgcc_s -lc -lkpathsea -march=athlon64 -Wl,--export-dynamic -pthread -pthread -Wl,--export-dynamic -Wl,-soname -Wl,libevince-properties-page.so.0 -o .libs/libevince-properties-page.so.0.0.0/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libkpathsea.a(tex-file.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libkpathsea.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [libevince-properties-page.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/evince-0.4.0-r2/work/evince-0.4.0/properties' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/evince-0.4.0-r2/work/evince-0.4.0' <snip> Evince is a dependency of GNOME 2.12 Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r10 x86_64) ================================================================= System uname: 2.6.12-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -Os -pipe -fomit-frame-pointer -ffast-math -freorder-blocks" 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 /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/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -Os -pipe -fomit-frame-pointer -ffast-math -freorder-blocks" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/" LANG="en_GB.UTF-8" LC_ALL="en_GB.UTF-8" LINGUAS="en_GB zh_CN" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/ibm-overlay /usr/local/mplayer32-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 aac aalib acpi alsa aotuv artworkextra audiofile avi bash-completion berkdb bitmap-fonts bzip2 cap caps cdparanoia cdr cg cjk cpudetection crypt cups curl dbus devil djvu dlloader dmx dts dv dvd dvdr dvdread dvi ecc eds emboss encode exif expat fame ffmpeg firefox flac foomaticdb gcj gif gimp-print gimpprint gkthtml glitz gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal howl icu idea imagemagick imlib imlib2 immqt-bc ipv6 ithreads java javascript jce jikes jpeg jpeg2k junit kdeenablefinal layout-osx-like lcms ldap libcaca libwww live lm_sensors lzo lzw lzw-tiff mad mikmod mmap mng mono mozilla moznocompose moznoirc moznomail mp3 mpeg nautilus ncurses network new-login nls noantlr nobcel nobeanutils nobsh nocommonset nocommonslogging nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino nowin noxalan noxerces nptl numeric nvidia objc offensive ogg oggvorbis openal openexr opengl pam parse-clocks pcre pdflib perl physfs pic png pyste python qt quicktime readline real renamescripts rtc samba sata sdl slang speex spell sqlite ssl staircase startup-notification stencil-buffer svg t1lib tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode updated-acpi usb userlocales v4l v4l2 vcd vorbis wxwindows xim xine xml2 xpm xscreensaver xv xvid xvmc zeroconf zlib linguas_en_GB linguas_zh_CN userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS
Which ebuild is this about? Always put ebuild name into bug summary.
Sorry. My bad. The URL includes a patch from FreeBSD that solves the problem. I think this actually only shows up on AMD64, which requires PIC; I can't verify this, however. I'm currently patching up tetex myself to test that patch.
Just to clarify. The bug is in tetex, specifically libkpathsea. The effect, however, is to make certain other packages, like evince, that links against it, fail to build.
Some interesting documents if you are fixing this yourself. http://www.gentoo.org/proj/en/hardened/pic-internals.xml http://dev.gentoo.org/~solar/pax/misc/check-textrel http://www.gentoo.org/proj/en/hardened/pie-ssp.xml http://www.gentoo.org/proj/en/hardened/pic-guide.xml There is another one that tells you how to enable PIC in an ebuild but I can't seem to find it at the moment.
I patched the Makefile.in for kpathsea, similar (but not identical) to the FreeBSD people. It makes Evince compile, and so GNOME 2.12 install, in any case. I'd provide the patch, but it seems that the 'hack the Makefile.in' is not the preferred method for ebuilds. I don't have any more time to keep on this bug - so I'm unlikely to be able to contribute to the community on this one. It is a problem that WILL affect AMD64 users however, so it might be an idea to add some platform devs to this bug.
*** Bug 108315 has been marked as a duplicate of this bug. ***
tetex 3.0 has a dynamic libkpathsea.. and has the right pic stuff ...
*** Bug 119826 has been marked as a duplicate of this bug. ***
Closing as tetex-3.0_p1-r3 is stable now.