[xml] Solaris: relocation error when linking libxml2 with zlib
- From: Ralf <ralfml alfray com>
- To: xml gnome org
- Subject: [xml] Solaris: relocation error when linking libxml2 with zlib
- Date: Fri, 12 Mar 2004 19:39:08 -0800
Hi!
Summary: Has anyone succeded in compiling libxml2 with zlib support on
Solaris?
Details:
I'm trying to compile libxml2 with zlib support on Solaris (SunOS 5.9
Generic_112234-05 i86pc i386 i86pc) and I get a weird "relocation" error
from the linker. The problem did not exist before when I was not
activating zlib support.
By "activating zlib support", I mean adding --with-zlib=/some/path to
./configure. I do not install zlib in the system, I just compile it
manually and then reference the folder that contains lib/libz.a and
include/z*.h
I've updated all the sources to zlib 1.2.1 and libxml2 2.6.7.
zlib compiles just fine and zlib's example.c runs with no problem. I
also have libpng linked with it and my app uses zlib to read its files,
so zlib works as far as I can tell.
When compiling libxml2, I get this kind of output (everything compiled
just fine; I collapsed the many redundant symbol dumps to save some
bandwidth):
cd "./libsrc"/libxml2-2.6.7 ; make ; make install
make[1]: Entering directory `/home/app/Libs/xml2lib/libsrc/libxml2-2.6.7'
[...]
Making all in .
make[3]: Entering directory `/home/app/Libs/xml2lib/libsrc/libxml2-2.6.7'
/bin/bash ./libtool --mode=link gcc -g -O2 -Wall -o libxml2.la -rpath
/home/app/Libs/xml2lib/./SunOS/lib -version-
info 8:7:6 SAX.lo entities.lo encoding.lo error.lo parserInternals.lo
parser.lo tree.lo hash.lo list.lo xmlIO.lo xmlmemory.lo
uri.lo valid.lo xlink.lo HTMLparser.lo HTMLtree.lo debugXML.lo xpath.lo
xpointer.lo xinclude.lo nanohttp.lo nanoftp.lo DOCBp
arser.lo catalog.lo globals.lo threads.lo c14n.lo xmlstring.lo
xmlregexp.lo xmlschemas.lo xmlschemastypes.lo xmlunicode.lo xm
lreader.lo relaxng.lo dict.lo SAX2.lo xmlwriter.lo legacy.lo chvalid.lo
pattern.lo -lpthread -L/home/app/Libs/xml2lib
/../zlib/./SunOS/lib -R/home/app/Libs/xml2lib/../zlib/./SunOS/lib -lz
-lm -lsocket -lnsl
gcc -shared -Wl,-h -Wl,libxml2.so.2 -o .libs/libxml2.so.2.6.7
.libs/SAX.o .libs/entities.o .libs/encoding.o .libs/error.o .l
ibs/parserInternals.o .libs/parser.o .libs/tree.o .libs/hash.o
.libs/list.o .libs/xmlIO.o .libs/xmlmemory.o .libs/uri.o .libs
/valid.o .libs/xlink.o .libs/HTMLparser.o .libs/HTMLtree.o
.libs/debugXML.o .libs/xpath.o .libs/xpointer.o .libs/xinclude.o .
libs/nanohttp.o .libs/nanoftp.o .libs/DOCBparser.o .libs/catalog.o
.libs/globals.o .libs/threads.o .libs/c14n.o .libs/xmlstri
ng.o .libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o
.libs/xmlunicode.o .libs/xmlreader.o .libs/relaxng.o .libs/
dict.o .libs/SAX2.o .libs/xmlwriter.o .libs/legacy.o .libs/chvalid.o
.libs/pattern.o -R/home/app/Libs/xml2lib/../png
lib/./SunOS/lib -lpthread -L/home/app/Libs/xml2lib/../zlib/./SunOS/lib
-lz -lm -lsocket -lnsl -lc
Text relocation remains referenced
against symbol offset in file
crc_table 0x3d
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(crc32.o)
crc_table 0x63
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(crc32.o)
[...]
crc_table 0xa1
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(crc32.o)
<unknown> 0x1446
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
[...]
configuration_table 0x4bc
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(deflate.o)
configuration_table 0xda8
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(deflate.o)
[...]
static_ltree 0x124
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
bl_order 0x3b1
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
extra_lbits 0x82f
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
base_length 0x843
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
extra_dbits 0x946
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
base_dist 0x963
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
static_l_desc 0xc7e
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
static_d_desc 0xc88
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
static_bl_desc 0xc98
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
bl_order 0x1502
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
bl_order 0x159f
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(trees.o)
<unknown> 0x10
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(zutil.o)
[...]
fwrite 0x158e
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
fread 0x3f
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
[...]
fclose 0x5bd
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
fflush 0xfef
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
malloc 0xa42
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
[...]
malloc 0x3b
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(zutil.o)
strcpy 0x1185
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
strcpy 0x12fc
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
fseek 0xa8f
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
fseek 0xbba
/home/app/Libs/xml2lib/../zlib/./SunOS/lib/libz.a(gzio.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make[3]: *** [libxml2.la] Error 1
The build process then proceeds on performaing a make install of
include/libxml2 then a make install of . which leads yet another link of
libxml2.la with the exact same symptoms, so I skipped that part too.
So here my solaris knownledge stops. Any help appreciated. My guess is
that the problem is more with the user than with libxml2.
R/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]