Subject: ld: fatal: relocations remain against allocatable but non-writable
To: None <tech-pkg@netbsd.org>
From: julien Touche <julien.touche@lycos.com>
List: tech-pkg
Date: 01/31/2003 14:26:47
hi

i'm testing pkgsrc on Solaris7 as non-root

i encounter the above problem with two important pkg: xpm and ncurses

*** ncurses:
cd c++ && bmake   DESTDIR="" all
cd ../lib && /tmp/obj/devel/ncurses/work/.buildlink/bin/libtool g++ -o 
libncurses++.la ../obj_lo/cursesf.lo ../obj_lo/cursesm.lo 
../obj_lo/cursesw.lo ../obj_lo/cursespad.lo ../obj_lo/cursesp.lo 
../obj_lo/cursslk.lo ../obj_lo/cursesapp.lo ../obj_lo/cursesmain.lo 
-rpath /tmp/bou/lib  -version-info 5:3
g++ -shared -nostdlib  -Wl,-R/tmp/bou/lib -L/tmp/bou/lib 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crti.o 
/usr/ccs/lib/values-Xa.o 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtbegin.o 
../obj_lo/.libs/cursesf.o ../obj_lo/.libs/cursesm.o 
../obj_lo/.libs/cursesw.o ../obj_lo/.libs/cursespad.o 
../obj_lo/.libs/cursesp.o ../obj_lo/.libs/cursslk.o 
../obj_lo/.libs/cursesapp.o ../obj_lo/.libs/cursesmain.o 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66 
-L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib -lstdc++ -lm -lgcc -lc 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtend.o 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtn.o  -Wl,-h 
-Wl,libncurses++.so.5 -o .libs/libncurses++.so.5.3
Text relocation remains                 	referenced
     against symbol		    offset	in file
<unknown>                           0x144 
/usr/local/lib/libstdc++.a(iovfscanf.o)
<unknown>                           0x148 
/usr/local/lib/libstdc++.a(iovfscanf.o)
[snip]
_Q_dtoq                             0xec4 
/usr/local/lib/libstdc++.a(iostream.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status

*** xpm:
===> Building for xpm-3.4k
making all in ./lib...
rm -f libXpm.so.4.11~
LD_RUN_PATH=/usr/openwin/lib /usr/ccs/bin/ld -o libXpm.so.4.11~ -G -z 
text -M mapfile -h libXpm.so.4.11 data.o create.o misc.o rgb.o scan.o 
parse.o hashtab.o  CrBufFrI.o CrDatFrP.o CrPFrBuf.o RdFToI.o WrFFrI.o 
CrBufFrP.o CrIFrBuf.o CrPFrDat.o RdFToP.o WrFFrP.o  CrDatFrI.o 
CrIFrDat.o RdFToDat.o WrFFrDat.o  Attrib.o CrIFrP.o CrPFrI.o Image.o 
Info.o RdFToBuf.o WrFFrBuf.o
Text relocation remains                 	referenced
     against symbol		    offset	in file
<unknown>                           0xba4     	data.o
<unknown>                           0xba8     	data.o
[snip]
__filbuf                            0xa3c     	data.o
ld: fatal: relocations remain against allocatable but non-writable sections
*** Error code 1
make: Fatal error: Command failed for target `libXpm.so.4.11'

for libXpm, the static compile (in *.a) works, but no useful for the rest

$gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95/specs
gcc version 2.95 19990728 (release)

$ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.7-1.273


any ideas ?


Regards

		Julien

note: i have set ld and gcc as CC and LD in $base/etc/mk.conf to be sure ...