Re: [lxml] Error installing lxml 2.3.5 on OS X 10.6.8
Thanks! I got lxml installed by setting the environment variable like this: $ export LIBXML2_VERSION=2.8.0 Then doing: $ p3 setup.py build --static-deps And finally: $ p3 setup.py install Initially, I thought I could just follow the alternate Mac OS X instructions: 1) Download libxml2-2.8.0.tar.gz and libxslt-1.1.26.tar.gz and place them in a folder I created called libs inside lxml-2.3.5/. 2) Then issue the command: $ p3 setup.py build --static-deps \ --libxml2-version=2.8.0 \ --libxslt-version=1.1.26 \ (and hit return a couple of times) But the output from that command ended with some warnings: ld: warning: in /Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/lib/libexslt.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/lib/libiconv.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/lib/libxml2.a, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/lib/libxslt.a, file was built for unsupported file format which is not the architecture being linked (i386) $ -----Original Message----- From: "Stefan Behnel" [stefan_ml@behnel.de] Date: 08/13/2012 02:42 PM To: "lxml mailing list" <lxml@lxml.de> Subject: Re: [lxml] Error installing lxml 2.3.5 on OS X 10.6.8 7stud, 13.08.2012 20:18:
From: "Stefan Behnel" Date: 08/13/2012 09:24 AM
7stud, 13.08.2012 10:02:
$ tar xfvz lxml-2.3.5.tar.gz
$ cd lxml-2.3.5
$ p3 setup.py build --static-deps Building lxml version 2.3.5. Latest version of libiconv is 1.14 Downloading libiconv into libs/libiconv-1.14.tar.gz Unpacking libiconv-1.14.tar.gz into build/tmp Latest version of libxml2 is 2.9.0-rc1 Downloading libxml2 into libs/libxml2-2.9.0-rc1.tar.gz Unpacking libxml2-2.9.0-rc1.tar.gz into build/tmp Latest version of libxslt is 1.1.26 Downloading libxslt into libs/libxslt-1.1.26.tar.gz Unpacking libxslt-1.1.26.tar.gz into build/tmp Starting build in build/tmp/libiconv-1.14 … … …
Could you provide the error message please? It should have turned up right here.
make[2]: *** [xsltutils.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
====
Is this what you are after?
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include/libxml2 -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include -g -O2 -Wall -c xslt.c -o xslt.o /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include/libxml2 -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include -g -O2 -Wall -c -o xsltutils.lo xsltutils.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include/libxml2 -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include -g -O2 -Wall -c xsltutils.c -o xsltutils.o /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include/libxml2 -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include -g -O2 -Wall -c -o pattern.lo pattern.c xsltutils.c: In function ‘xsltSaveResultTo’: xsltutils.c:1541: warning: passing argument 1 of ‘xmlBufferWriteQuotedString’ from incompatible pointer type xsltutils.c:1554: warning: passing argument 1 of ‘xmlBufferWriteQuotedString’ from incompatible pointer type xsltutils.c: In function ‘xsltSaveResultToString’: xsltutils.c:1758: error: dereferencing pointer to incomplete type xsltutils.c:1759: error: dereferencing pointer to incomplete type xsltutils.c:1761: error: dereferencing pointer to incomplete type xsltutils.c:1762: error: dereferencing pointer to incomplete type libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include/libxml2 -I/Users/me/Downloads/lxml-2.3.5/build/tmp/libxml2/include -g -O2 -Wall -c pattern.c -o pattern.o make[2]: *** [xsltutils.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Yes, that's exactly it. It's failing to build libxslt. Looking further up now, I see that it has downloaded libxml2 2.9.0-rc1. That version is known to be incompatible with the latest libxslt release. You can make it work by setting this environment variable: LIBXML2_VERSION=2.8.0 Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
participants (1)
-
7stud