Operating System - HP-UX
1834532 Members
2675 Online
110069 Solutions
New Discussion

Linking issues with HP-UX11.11

 
Vignesh_1
New Member

Linking issues with HP-UX11.11

Hi -

Making libxml or libcsoap gives same `ld` error now, prior to this I was getting compilation errors.
Referring:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1082556319024+28353475&threadId
=34855

I was able to compile the source but not link.

So tried making gcc 3.3.3 / 3.3.2 but failed... so I got good old 3.0.4 and was
able to build. Even after having a stable gcc I got the same error :-(

So it was very clear to me now that I needed GNU binutils... but again tragedy struck!!!

ts@ap3dev2 : /neo/builds/binutils-2.14 $ ./configure --prefix=/ts/neo/local/binutils-2.14
loading cache ./config.cache
checking host system type... hppa2.0w-hp-hpux11.11
checking target system type... hppa2.0w-hp-hpux11.11
checking build system type... hppa2.0w-hp-hpux11.11
*** This configuration is not supported in the following subdirectories:
ld
(Any other directories should still work fine.)
checking for hppa2.0w-hp-hpux11.11-ar... (cached) ar
checking for hppa2.0w-hp-hpux11.11-as... no
checking for as... (cached) as
...

Then I came across http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1082590791436+28353475&threadId=531152 ,

but I am not able to understand him ( procura ) much.

Confused please help!

------------
Error:-

$ ./configure --prefix=/ts/neo/local/libxml2-2.6.7
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -Wall -c pattern.c -MT pattern.lo -MD -MP -MF .deps/pattern.TPlo >/dev/null 2>&1
/bin/sh ./libtool --mode=link gcc -g -O2 -Wall -o libxml2.la -rpath /ts/neo/local/libxml2-2.6.7/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 DOCBparser.lo catalog.lo globals.lo threads.lo c14n.lo xmlstring.lo xmlregexp.lo xmlschemas.lo xmlschemastypes.lo xmlunicode.lo xmlreader.lo relaxng.lo dict.lo SAX2.lo xmlwriter.lo legacy.lo chvalid.lo pattern.lo -lpthread -lm
gcc -shared -fPIC -Wl,+h -Wl,libxml2.sl.8 -Wl,+b -Wl,/ts/neo/local/libxml2-2.6.7/lib -o .libs/libxml2.sl.8.7 .libs/SAX.o .libs/entities.o .libs/encoding.o .libs/error.o .libs/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/xmlstring.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 -lpthread -lm -lc
/usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file .libs/SAX.o - shared library must be position independent. Use +z or +Z to recompile.
collect2: ld returned 1 exit status
make[2]: *** [libxml2.la] Error 1
make[2]: Leaving directory `/ts/neo/builds/libxml2-2.6.7'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ts/neo/builds/libxml2-2.6.7'
make: *** [all] Error 2


$ ./configure --prefix=/ts/neo/local/libsoap-1.0.0
$ make
...
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/local/include/libxml2 -g -O2 -Wall -Wp,-MD,.deps/soap-server.pp -c soap-server.c -DPIC -DPIC
cc1: warning: -g is only supported when using GAS on this processor,
cc1: warning: -g option disabled.
soap-server.c: In function `soap_server_entry':
soap-server.c:115: warning: implicit declaration of function `strcmp'
soap-server.c:105: warning: `header' might be used uninitialized in this function
soap-server.c: In function `router_node_new':
soap-server.c:241: warning: implicit declaration of function `strlen'
soap-server.c:242: warning: implicit declaration of function `strcpy'
mv -f soap-server.o .libs/soap-server.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/local/include/libxml2 -g -O2 -Wall -Wp,-MD,.deps/soap-server.pp -c soap-server.c >/dev/null 2>&1
mv -f .libs/soap-server.lo soap-server.lo
/bin/sh ../libtool --mode=link gcc -g -O2 -Wall -o libcsoap-1.0.la -rpath /ts/neo/local/libsoap-1.0.0/lib -version-info 1:0:0 -release 1.0 soap-xml.lo soap-fault.lo soap-env.lo soap-service.lo soap-router.lo soap-client.lo soap-server.lo
rm -fr .libs/libcsoap-1.0.la .libs/libcsoap-1.0.* .libs/libcsoap-1.0-1.0.*
gcc -shared -fPIC -Wl,+h -Wl,libcsoap-1.0-1.0.1 -Wl,+b -Wl,/ts/neo/local/libsoap-1.0.0/lib -o .libs/libcsoap-1.0-1.0.1.0 soap-xml.lo soap-fault.lo soap-env.lo soap-service.lo soap-router.lo soap-client.lo soap-server.lo -lc
/usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file soap-xml.lo - shared library must be position independent. Use +z or +Z to recompile.
collect2: ld returned 1 exit status
make[2]: *** [libcsoap-1.0.la] Error 1
make[2]: Leaving directory `/ts/neo/builds/libsoap-1.0.0/libcsoap'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ts/neo/builds/libsoap-1.0.0'
make: *** [all-recursive-am] Error 2

Your early help would be appreciated.


Thanks
Vignesh
3 REPLIES 3
ranganath ramachandra
Esteemed Contributor

Re: Linking issues with HP-UX11.11

soap-xml.lo should have been built with -fpic or -fPIC compiler option (if you are using gcc).
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Colin Topliss
Esteemed Contributor

Re: Linking issues with HP-UX11.11

If you're using gcc, you should also ensure that you have gnu-make. I had terrible problems in that some code used gnu-make, other code used HP's version of make - and they are not interchangeable.

It wasn't until I installed GCC, binutils, and gnu-make that I was able to get the code I was working on to compile.

Regards

Col.
Vignesh_1
New Member

Re: Linking issues with HP-UX11.11

Thanks all. I used gnu make.
You are very right