Subject: Re: More KDE 1.1.2 build issues on SPARC
To: None <>
From: Greg Earle <earle@isolar.DynDNS.ORG>
List: tech-pkg
Date: 11/05/1999 20:25:36
>>    ld: /usr/lib/c++rt0.o: illegal reloc type mix
> is libcrt++0.o pic or not?

Claims to be:

isolar# file /usr/lib/c++rt0.o
/usr/lib/c++rt0.o: NetBSD/sparc position independent object file not stripped

isolar# ls -l /usr/lib/c++rt0.o
-r--r--r--  1 root  wheel  607 Jul 19 07:30 /usr/lib/c++rt0.o

This is a dead stock 1.4.1 SPARC binary ...

>>    Ugh ... why is this thing trying to invoke the linker directly to create
>>    the .so, and with /usr/lib/c++rt0.o to boot?
> AFAIK, that's actually exactly what it should be doing.  :-)

Doh!  :-)  For some reason that just didn't look quite right ...

> i seem to recall this being noted before -- that crt++0.o wasn't PIC and
> thus caused problems... try rebuilding it -fPIC and see what happens then.

Aha ... interesting:

isolar# cd /usr/src/lib/csu/c++
isolar# make -n
cc -O2 -fpic -Werror   -DLIBC_SCCS -c c++rt0.c

So far so good!

Making all in puke
gmake[3]: Entering directory `/usr/src/pkgsrc/net/kdenetwork/work/kdenetwork-1.
/usr/pkg/bin/pkglibtool-1.2p1 --cplusplus --install-la --mode=link g++  -O2 
sr/pkg/include -I/usr/pkg/include -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib 
sr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib 
ib -L/usr/pkg/lib -o -rpath /usr/X11R6/lib/ksirc -export-dynamic  
nostdlib pframe.lo
rm -f .libs/ .libs/libpframe.* .libs/libpframe.*
/usr/bin/ld -Bshareable -o .libs/ pframe.lo /usr/lib/c++rt0.o
ar cru .libs/libpframe.a pframe.o
ranlib .libs/libpframe.a

Thanks Matt!!!

Now the question is - could /usr/lib/c++rt0.o being -fpic before be the cause
for all those

	ld: /usr/X11R6/lib/libkde<mumble>.a(k<mumble>.o): RRS text relocation \
	at 0xNNNNN for "_<color>"

linker messages I mentioned before?  (If so, I guess I should try and re-build
all of this KDE stuff from scratch, then ... bleah ... )

	- Greg