[lxml-dev] problems with custom build

Victor Borda victoryetc at gmail.com
Fri Apr 3 07:53:17 CEST 2009


Hi List,
I was very excited today to find the lxml module for python. As I need to
write some xml checking scripts and finding bash scripting not well suited,
I have decided to give python a try. So far I like it. However, here is the
situation:

1) The target platform has an older RedHat installation with glibc2.3.4, so
none of the binaries for libxml or libxslt were of any use. So I had to
build from source on those. Not too painful.
2) However, trying to get lxml running has been really difficult. I need
help here.
3) The target machine is not connected to the internet. It is not able to
remotely retrieve packages.

Questions/Steps:
0) There don't appear to be any rpm's for lxml. Is this correct?
1) Since I don't have an internet connection from this machine it means I
have to build from source, don't I (ie easy_install is not an option)?
2) I have assumed that I do have to build from source so I have given it a
shot. I copied over the lxml2.2 tar file, unzipped it.
3) I got setuptools-0.6c9-py2.3.egg and dropped in that unzipped directly,
and ran python ez_setup.py which seemed to go fine.
4) Then I ran python setup.py build. The build seemed to go fine.
5) I go to run test.py and I get this error message:

[]# python test.py
Traceback (most recent call last):
  File "test.py", line 595, in ?
    exitcode = main(sys.argv)
  File "test.py", line 558, in main
    test_cases = get_test_cases(test_files, cfg, tracer=tracer)
  File "test.py", line 260, in get_test_cases
    module = import_module(file, cfg, tracer=tracer)
  File "test.py", line 203, in import_module
    mod = __import__(modname)
  File "/home/victorborda/buildstuff/lxml-2.2/src/lxml/html/__init__.py",
line 12, in ?
    from lxml import etree
ImportError: /home/victorborda/buildstuff/lxml-2.2/src/lxml/etree.so:
undefined symbol: xmlSchematronFree

And with that, I tried running 'make test' and got the same result. The
build appeared to go fine. The contents of
lxml-2.2/build/lib.linux-x86_64-2.3/lxml

are:
-rw-r--r--  1 root root    7637 Jun 19  2008 builder.py
-rw-r--r--  1 root root   28750 Nov 23 19:33 cssselect.py
-rw-r--r--  1 root root   18287 May 31  2008 doctestcompare.py
-rw-r--r--  1 root root    7641 Jul  9  2008 ElementInclude.py
-rw-r--r--  1 root root    6407 Feb 27 14:45 _elementpath.py
-rwxr-xr-x  1 root root 3125362 Apr  3 04:49 etree.so
drwxr-xr-x  2 root root    4096 Apr  3 04:49 html
-rw-r--r--  1 root root      21 Oct 22  2007 __init__.py
-rwxr-xr-x  1 root root  846592 Apr  3 04:49 objectify.so
-rw-r--r--  1 root root      87 Mar  2  2008 pyclasslookup.py
-rw-r--r--  1 root root    8229 May 31  2008 sax.py
-rw-r--r--  1 root root     230 May 31  2008 usedoctest.py


-- 
Best Regards,
Victor Borda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090402/3928b71d/attachment.htm 


More information about the lxml-dev mailing list