Compiling net-dialup/ppp, sys-libs/libcap causes an error with ld: Error: The symbol <NAME OF SYMBOL> has a R_PPC_REL24 relocation, that means <lib_name> was compiled without -fPIC. Compiling with -fPIC in my CFLAGS fixes the problem, but the ebuilds should be fixed. net-dialup/ppp/ppp-2.4.2-r2.ebuild 5c5 < inherit eutils gnuconfig --- > inherit eutils gnuconfig flag-o-matic 60a61 > append-flags "-fPIC" sys-libs/libcap/libcap-1.10-r4.ebuild 43a44 > use ppc && append-flags -fPIC This probably needs a line for ppc64 as well? I have a Powerbook G4 Ti 500Mhz. CFLAGS="-O2 -pipe -mpowerpc-gfxopt -mcpu=7400 -maltivec -mabi=altivec" I would be happy to provide any other information required.
libpcap is a library so it should append-flags -fPIC all the time if the build does not provision for it. I know spanky and myself a while ago talked about this problem in libcap a good some many months ago. We opted to take a debain patch. which solves the problem. So... How the heck is this showing up for you on a ppc. So what you could do to help us out is. hop on your ppc and double check that fPIC is not one of it's CFLAGS. emerge info >> ppc-libcap-emerge.txt ACCEPT_KEYWORDS="ppc" emerge libcap >> ppc-libcap-emerge.txt grep fPIC ppc-libcap-emerge.txt If nothing here then we must fix. Please attach it none the less. I don't think net-dialup@ is the right place for bug # this either.
i can get my ppc back from my gf in the next few days (the weekend for sure) ... then i can track down this bug
Created attachment 32589 [details] Requested output Here's the output from the compile of sys-libs/libcap. I added stderr to the output to show the error. It looks like libcap_wrap isn't being compiled with -fPIC but needs to be.
Created attachment 32592 [details] Same as above for net-dialup/ppp Here's the output from net-dialup/ppp. It looks like buildreq needs to be built with -fPIC.
Created attachment 32594 [details, diff] libcap-pic-fixup.diff SpanKY want to bless or curse this diff? libcap is a shared library so it should always be PIC and not just the cases for alpha/hppa/amd64/ppc internal reference http://www.gentoo.org/proj/en/hardened/pic-internals.xml
net-dialup will want to do the same sort of thing for the shared library parts of pppd but not on the global scale or people will byte your head off ;/
Created attachment 32637 [details] Another log When linking abiword, I get relocation errors as well, it looks like the problem is in ncurses: '/usr/lib/libcurses.a(lib_termcap.o)' was compiled without -fPIC.
here's the fix for ppp: last line of src_unpack() sed -i -e '/^CFLAGS/s:$: -fPIC:' pppd/plugins/radius/radiusclient/lib/Makefile.in || die
added the -fPIC fix for ppp to cvs the libcap error is related to swig ... disable the python module when emerge libcap and it'll work ...
libcap PIC was fine ... it was the python module that was screwing up everything ... i updated the python patch to utilize the PIC object files oh and i have bless your patch solar :) i removed the append-flags crap but fixed the python patch to keep fPIC out of CFLAGS as for the abiword bug, i'm not even going to touch that ... file a bug with gnome if you care
although that curses bug looks like a broken toolchain ... it selected the .a in /usr/lib instead of the .so in /lib ... i'd suggest updating your binutils/gcc to the latest stable on ppc
Upgrading the toolchain to ~ppc latest fixed the remainder of my problems. Thanks!