[lxml-dev] Segfault and bus error when importing lxml.html.clean after importing webbrowser
Jon Rosebaugh
chairos at gmail.com
Sat Feb 2 12:31:45 CET 2008
No luck. Apparently I need a universal build of libxml2 and libxslt in
order for lxml to build, and I can't figure out how to compile those
manually. I tried telling lxml to statically link against the
universal builds provided by macports, but I got segfaulting again.
On Sat, Feb 2, 2008 at 3:50 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
>
>
> Jon Rosebaugh wrote:
> > My production deployment will actually be on Debian Linux; this is
> > just my development machine. That said, I tried looking at the static
> > build directions, but they're for Windows. I did download all the
> > source archives for the various libraries, but I believe I have to
> > configure them in a certain way for the static build?
>
> No, normally they build everything you need for both static and dynamic linking.
>
> I have no idea how MacOS-X works here, but you should already have the
> libraries installed on your system, maybe you just need the development
> packages with header files and static build libs.
>
> But if you have the source directories, something like this might work:
>
> # cd /path/to/libxml2-src
> # ./configure CFLAGS="whatever you use" --without-python
> # make
> # cd /path/to/libxslt-src
> # ./configure CFLAGS="whatever you use" --without-python \
> --with-libxml-src=/path/to/libxml2-src
> # make
>
> and then open lxml's setup.py and set the static include dirs to
>
> /path/to/libxml2-src/include
> /path/to/libxslt-src/libxslt
> /path/to/libxslt-src/libexslt
> + the normal system include dirs for zlib, iconv, etc.
>
> and the static lib dirs to
>
> /path/to/libxml2-src/.libs
> /path/to/libxslt-src/libxslt/.libs
> /path/to/libxslt-src/libexslt/.libs
>
> You may have to add something like "-liconv" and "-lz" to the static cflags to
> compile against the other libs, or maybe you need to link those statically
> also. Just try it out. The compiler calls from the standard build of lxml will
> give you hints what else you need.
>
> Hope that helps,
> Stefan
>
>
More information about the lxml-dev
mailing list