The -fPIC option is not passed into the link stage for the Java bindings within the pilot-link software. Adding the -fPIC option to the link phase fixes the problem and it will then compile. Reproducible: Always Steps to Reproduce: 1. add java to USE 2. emerge pilot-link 3. Actual Results: link fails with message stating it needs the -fPIC option.
already unmasked. closing
I see that this is closed, but it still doesn't work out of the box with a USE="java". # qpkg blackdown-jdk dev-java/blackdown-jdk * Making all in bindings make[2]: Entering directory `/var/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings' Making all in Java make[3]: Entering directory `/var/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings/Java' /opt/blackdown-jdk-1.4.2_rc1/bin/javac -d . ./org/gnu/pilotlink/AddressRecord.java ./org/gnu/pilotlink/AppInfo .java ./org/gnu/pilotlink/DatebookRecord.java ./org/gnu/pilotlink/MemoRecord.java ./org/gnu/p ilotlink/PilotLink.java ./org/gnu/pilotlink/RawAppInfo.java ./org/gnu/pilotlink/RawRecord.java ./org/gnu/pilotlink/Record.java ./org/gnu/pilotlink/SysInfo.java ./org/gnu/pilotlink /User.java ./test.java g++ -I../../include -I ../../include -I ../../include -I /opt/bla ckdown-jdk-1.4.2_rc1/include -I /opt/blackdown-jdk-1.4.2_rc1/include/linux -L ../../libpisock/.libs -lp isock -shared -o libjpisock.so ./libjpisock.c /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/pilot-link-0.11.8/temp/ ccqspuvO.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /var/tmp/portage/pilot-link-0.11.8/temp/ccqspuvO.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [java_lib] Error 1 make[3]: Leaving directory `/var/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings/Java' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8' make: *** [all-recursive-am] Error 2 !!! ERROR: app-pda/pilot-link-0.11.8 failed. !!! Function src_compile, Line 57, Exitcode 2 !!! (no error message) I got it to compile fine with # "USE= -java" emerge pilot-link
hmmm... oddly, I get the same failure using: CFLAGS="-O2 -pipe -fPIC" The same make.conf fixes bug 32509 for me.
I'm still having this same problem g++ -I../../include -I ../../include -I ../../include -I /opt/blackdown-jdk-1.4.1/include -I /opt/blackdown-jdk-1.4.1/include/linux -L ../../libpisock/.libs -lpisock -shared -o libjpisock.so ./libjpisock.c /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: /mnt/raid0/tmp/portage/pilot-link-0.11.8/temp/ccMNa96V.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /mnt/raid0/tmp/portage/pilot-link-0.11.8/temp/ccMNa96V.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [java_lib] Error 1 make[3]: Leaving directory `/mnt/raid0/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings/Java' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/mnt/raid0/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8/bindings' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/mnt/raid0/tmp/portage/pilot-link-0.11.8/work/pilot-link-0.11.8' make: *** [all-recursive-am] Error 2 !!! ERROR: app-pda/pilot-link-0.11.8 failed. !!! Function src_compile, Line 57, Exitcode 2 !!! (no error message) (01:35:58 Wed Jun 16 2004 root@cid x86_64) ~ $ emerge info Portage 2.0.50-r8 (gcc34-amd64-2004.1, gcc-3.4.0, glibc-2.3.3_pre20040529-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 x86_64 4 Gentoo Base System version 1.4.16 distcc 2.13 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.5 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /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="-O2 -pipe -fomit-frame-pointer" DISTDIR="/mnt/raid0/gentoo/distfiles" FEATURES="autoaddcvs ccache cvs fixpackages sandbox userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/mnt/raid0/gentoo/packages-amd64" PORTAGE_TMPDIR="/mnt/raid0/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/mnt/raid0/gentoo/gentoo-x86" SYNC="rsync://192.168.0.1/gentoo-portage" USE="3ds S3TC X X509 Xaw3d aac aalib accessibility acl acpi activefilter afs aim alsa altivec amd amd64 apache2 apm ardour-ksi arts artswrappersuid atlas audiofile autofs avantgo avi berkdb bidi bindist caps cdr chroot clamav clanJavaScript clanVoice clearpasswd clisp cmucl crypt cscope cups curl dbcp dedicated dga directfb divx4linux dnd doc dv dvd dvdr eim emacs emacs-w3 encode esd ethereal evms2 evo expat ext-png ext-zlib f77 faac faad fam fax fbcon fbdev ffmpeg flac flash fltk fluidsynth foomaticdb freetype fs fullrpc gb gcj gcl gd gd-external gdbm ggi gif gimp gimpprint glade glut gmp gmtfull gmthigh gmtsuppl gmttria gnome gnomedb gnuplot gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile hbci icq idl image imagemagick imap imlib imlib2 innodb ipalias ipv6 jabber jack jack-caps java javacomm javamail javascript jbig jikes joystick jp2 jpeg js junit justify kde ladcca lcd lcms libdsk libg libg++ libgda libwww lids lmtp log4j ltsp lua lucid lzw lzw-tiff maildir make-busybox-symlinks makecheck mcal md5sum menu mikmod milter mixer mng mono motif mozcalendar mozctl mozilla mozinterfaceinfo mozp3p mozsvg mozxmlterm mpeg mpeg4 mpi mplayer msn mule multilib music mysql nas native ncurses neXt nls nptl nvidia nviz oav objc oci8 odbc offensive ofx oggvorbis oldworld openal opengl oscar oss pam parse-clocks passfile pcap pcmcia pcre pda pdflib perl php pic pie plotutils png pnp portaudio ppds prelude propolice psyco python qhull qt quicktime readline regexp rplay ruby samba sasl sdk sdl skey slang slp sndfile socks5 sox speex spell sqlite src ssl svg tcltk tcpd tetex theora tiff timidity transcode transparent-proxy truetype trusted type1 ucs2 usb v4l v4l2 vda vhosts videos vim-with-x virus-scan wmf wsconvert wxwin wxwindows xchattext xemacs xface xforms xfs xine xinerama xml xml2 xmms xosd xprint xv xvid yahoo zeo zlib"
I'm also having this problem, and likewise USE="-java" emerge pilot-link also fixes the problem. ACCEPT_KEYWORDS="~amd64", noticed while building KDE on an emachines m6805.
this was fixed a few days ago