[lxml-dev] Help getting lxml to work reliably on MacOS-X

Michael Guntsche mike at it-loops.com
Mon Feb 4 16:55:28 CET 2008


On Feb 4, 2008, at 9:45, Stefan Behnel wrote:
<snip>
> When building lxml, please move any installed Cython versions out  
> of the way
> and run the build on the unpacked lxml-2.0.tar.gz release sources.  
> It must say
> "trying to build without Cython" at the beginning.
>

Slight difference here Cython 0.9.6.11 and lxml from current trunk.


> Please provide the following information:
>
> - what package management system (fink/macports) do you use?
>
> - are you using the stock Python or one that is installed separately?
>
> - what library versions are you using of libxml2, libxslt, zlib,  
> libiconv?
>
> - which library versions are preinstalled on your platform?
>   (I do not know how to find that out, can anyone provide  
> instructions here?)
>

With tiger the preinstalled libraries are

lxml2: 2.6.16
lxslt: 1.1.11

To get this information just run

/usr/bin/xml2-config --version
/usr/bin/xslt-config --version

Leopard should have newer libraries but I have no machine right now  
to check that.

> - what library versions does lxml.etree find? (see below)
>

The OS is Macosx Tiger 10.4.11
Python is version 2.5.1 universal binary from www.python.org
package management for (libxml2, libxslt) is macports

TESTED VERSION: 2.0.0-51232
     Python:            (2, 5, 1, 'final', 0)
     lxml.etree:        (2, 0, 0, 51232)
     libxml used:       (2, 6, 31)
     libxml compiled:   (2, 6, 31)
     libxslt used:      (1, 1, 22)
     libxslt compiled:  (1, 1, 22)

All libraries are universal built libraries from macports and linked  
dynamically.
I have not tried static, since macports by default ONLY compiles  
dynamic libraries and everyhing seems to be working fine for me.


>
> Just in case there are people who actually have a working  
> installation,
>
> - has anyone successfully built lxml statically against libxml2/ 
> libxslt?
>

As said before dynamically linked only.

>   * does it work reliably? (see "Testing" below)

ot-test runs through without any crashes. Threads 7-9 throw  
exceptions though, as you said.

>   * did you build with the --without-threads option?
>   * does it work with *and* without that option?
>
Dynamically linked only


> - has anyone managed to get lxml working reliably (see "Testing"  
> below) with
>   a dynamic build?
>
>   * did you set DYLD_LIBRARY_PATH?
>   * is DYLD_LIBRARY_PATH required for you or does it work without?
>   * is there anything special you did to make it work?
>

DYLD_LIBRARY_PATH is not set at all. All I had to do for lxml to find  
the correct libraries was to make sure
that xml2-config and xslt-config from my macports installation is  
found BEFORE the stock versions in /usr/bin.
This way etree links against the correct libraries.

> * if there are crashes, is the install unusable or are there things  
> you can
>     still do reliably?

No crashes at all.

If you need any more information just tell me.

Kind regards,
Michael




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20080204/91952256/attachment.bin 


More information about the lxml-dev mailing list