Holger Joukl | 7 Jun 08:56 2011

Re: Issues getting lxml working on Solaris10 Sparc

James Muse <jfmtopnettlc <at> gmail.com> writes:

> Lxml list members,I am having issues getting lxml working on a Solaris 10
> server.  
> I am getting the below error.  Not sure what I have done wrong, any
> assistance would be greatly appreciated.[user1:/home/user1] python
> Python 2.6.4 (r264:75706, Mar 18 2010, 06:30:18)[GCC 3.4.6] on sunos5Type
>"help", "copyright", "credits" or "license" for more information.
> >>> import lxml
> >>>
> >>>>>> from lxml import etreeTraceback (most recent call last):  File
>"<stdin>", line 1, in <module>ImportError: ld.so.1: python: fatal: relocation
error: file
> /usr/local/lib/python2.6/site-packages/lxml-2.3-py2.6-solaris-2.10-sun4u.egg
> /lxml/etree.so:
> symbol exsltDateXpathCtxtRegister: referenced symbol not found
> >>>I have compiled  and installed the below versions  of required software
from source. 
> libxml2-2.7.8libxslt-1.1.26 I am using Python 2.6.4I suspect there
> is an issue with the libxslt based on the error message.Thanks,James

First, you might want to check if libxml2/libxslt work on their own by trying
out their xmllint and xsltproc command line tools. Be sure to invoke your custom
versions, because there can be a standard sun-provided libxml2/libxslt
installation, see below.

If this works try looking at what ldd etree.so and elfdump -d etree.so gives:
Are there any shared lib dependencies that cannot be fulfilled? Do the expected
library versions get picked up? There might well be a sun-provided (older)
libxml2/libxslt installation on your solaris system, like:

$ /usr/bin/xmllint --version
/usr/bin/xmllint: using libxml version 20623
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP
HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv
ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug

If xmllint/xsltproc won't work then do the ldd/elfdump dance for these binaries.

You should also look at the output of xslt-config (and xml2-config) and see if
this makes sense.


Mailing list for the lxml Python XML toolkit - http://lxml.de/
lxml <at> garetjax.info