[xml] linking difficulties on Solaris

I’m having trouble successfully building an executable using the libxml2 libraries.




We are running Solaris 8 on sparc hardware. Therefore, I downloaded the prebuilt binary for Solaris - lxml2-2.4.25-sol8-sparc-local.  Our sys admin performed the pkgadd and the libraries are installed as follows:


$ ls -l /usr/local/libxml/sparc/lib

total 4746

-rw-r--r--   1 bin      bin      1226488 Oct  4 07:43 libxml2.a

-rwxr-xr-x   1 bin      bin          746 Oct  4 07:43 libxml2.la*

lrwxrwxrwx   1 root     other         17 Feb 19 07:35 libxml2.so -> libxml2.so.2.4.25*

lrwxrwxrwx   1 root     other         17 Feb 19 07:35 libxml2.so.2 -> libxml2.so.2.4.25*

-rwxr-xr-x   1 bin      bin      1175788 Oct  4 07:43 libxml2.so.2.4.25*

drwxr-xr-x   2 bin      bin          512 Feb 19 07:35 pkgconfig/

-rw-r--r--   1 bin      bin          246 Oct  4 07:43 xml2Conf.sh


I have a program that includes the following files:


#include <libxml/xmlmemory.h>

#include <libxml/parser.h>


We are using the Sun Forte C 6.0 compiler


compiling and linking the source code as follows


cc -I/usr/local/libxml/include/libxml2 -L/usr/local/libxml/sparc/lib –o xml_proto xml_proto.c -lxml2


yields the following error at run-time:


ld.so.1: xml_proto: fatal: libxml2.so.2: open failed: No such file or directory


I’m not familiar with shared object libraries and how they are linked.


I know this is probably trivial for most, but any assistance is greatly appreciated.




Jeff Blain


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/2002

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]