Updating ghostscript-esp from 7.07.1-r10 to 8.15.1, I get the following build error: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: ./obj/../soobj/gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ./obj/../soobj/gp_unix.o: could not read symbols: Bad value collect2: ld returned 1 exit status emerge --info Portage 2.1_pre4-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15-ck3 x86_64) ================================================================= System uname: 2.6.15-ck3 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.0_pre15 ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2-r1 sys-apps/sandbox: 1.2.17 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-r1, 2.16.91.0.3, 2.16.91.0.5 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.15_rc6 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -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.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="" FEATURES="autoconfig ccache confcache distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LC_ALL="en_US" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/gentopia /usr/local/bmg-main /usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="amd64 X aac alsa avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr crypt cups dbus debug dvd dvdr eds emboss encode esd firefox flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml hal idn imlib ipv6 jack java jpeg kde lcms ldap lzw lzw-tiff mad mono mozilla mp3 mpeg ncurses nls nptl ogg opengl pam pdflib perl pic png python qt quicktime readline ruby samba sdl spell sqlite ssl tcpd theora tiff truetype truetype-fonts type1-fonts usb userlocales vorbis xml2 xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_vga video_cards_vesa video_cards_nv" Unset: ASFLAGS, CTARGET, LANG, LDFLAGS, LINGUAS, MAKEOPTS
I too am getting the same problem, also on amd64 system. [ebuild U ] app-text/ghostscript-esp-8.15.1 [7.07.1-r10] USE="X cups gtk threads% xml% -cjk -emacs" 0 kB
+ # *-dynmic breaks compiling without X, see bug 121749 but not having it + # breaks compiling on amd64, bug 121924 + use X && myconf="${myconf} --enable-dynamic" + That fixes it at least for USE=X .. but we still need a proper fix for the amd64 and USE=-X case.
(In reply to comment #2) > + # *-dynmic breaks compiling without X, see bug 121749 but not having it > + # breaks compiling on amd64, bug 121924 > + use X && myconf="${myconf} --enable-dynamic" > + > > That fixes it at least for USE=X .. but we still need a proper fix for the > amd64 and USE=-X case. > When I used the '-fPIC' CFLAG then ghostscript-esp compiles without any problem. So it is an temporaly sollution, the devellopers of ghostscript have to change it so it can compile without the '-fPIC' CFLAG.
yup, USE="-X" is the problem ony my X-less server. ;-)
*** Bug 121985 has been marked as a duplicate of this bug. ***
comment 2 worked for me; after I figured out where to put the extra line in.
- use X && myconf="${myconf} --enable-dynamic" + if use X; then + myconf="${myconf} --enable-dynamic" + elif use amd64; then + append-flags -fPIC + fi I added another workaround here - that should fix it.
reopen, binaries should not get compiled with -fPIC
-fPIC applied unconditionally