[lxml-dev] problems trying to install lxml 2.2 on Mac OS X

Hi All, I'm getting the following error when trying to install: Building lxml version 2.2. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available. Using build configuration of libxslt 1.1.11 Building against libxml2/libxslt in the following directory: /usr/lib src/lxml/lxml.etree.c:169:31:src/lxml/lxml.etree.c:169:31: error: libxml/schematron.h: No such file or directory error: libxml/schematron.h: No such file or directory <snip> src/lxml/lxml.etree.c:135067: error: dereferencing pointer to incomplete type src/lxml/lxml.etree.c:135068: error: dereferencing pointer to incomplete type src/lxml/lxml.etree.c: At top level: src/lxml/lxml.etree.c:135174: error: invalid application of 'sizeof' to incomplete type 'struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext' lipo: can't figure out the architecture type of: /var/tmp//ccxExHVU.out error: Setup script exited with error: command 'gcc' failed with exit status 1 What am I doing wrong? cheers, Chris

Chris Withers <chris@simplistix.co.uk> writes:
You are using the libxslt supplied by Apple. You need a newer one. I got libxml and libxslt from macports <http://www.macports.org/>. Fink would probably provide another war or look in the last month or two on this list I think someone produced a binary build of lxml for OSX -- Mark

Mark Bestley wrote:
If whoever did that could do a bdist_egg for python 2.6 and give it to Stefan to put on PyPI, that would be perfect... Any chance of that happening? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Stefan Behnel wrote:
10.4.11, but what does that have to do with not wanting to fight this fight myself? If someone else can get the compile working, if they can provide a binary egg, surely that will alleviate the need for other Mac users to go through the pain each time? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Chris Withers wrote:
The difference is that we have binaries for 10.5: http://pypi.python.org/pypi/lxml/2.2.2 Stefan

Stefan Behnel wrote:
Oh, I see... So no, still on 10.4... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Stefan Behnel wrote:
Did you try the 10.5 egg? It doesn't have that many dependencies, so it might even work...
Because I use automated tools (buildout in this case) I can't manually substitute in a "wrong" egg like this...
If they don't: Stefan (E.), any chance to get binaries that run on 10.4?
That would be great :-) Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

On Wed, Aug 12, 2009 at 6:01 PM, Stefan Behnel<stefan_ml@behnel.de> wrote:
I still dont understand why my OSX 10.5 always want to compile lxml. gawel:~/tmp% virtualenv test New python executable in test/bin/python Installing setuptools............done. gawel:~/tmp% cd test && source bin/activate (test)gawel:~/tmp/test% easy_install lxml Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.2.2 Downloading http://codespeak.net/lxml/lxml-2.2.2.tgz ^Cinterrupted (test)gawel:~/tmp/test% easy_install http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-macosx-10.5-i386... Downloading http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-macosx-10.5-i386... Processing lxml-2.2.2-py2.6-macosx-10.5-i386.egg creating /Users/gawel/tmp/test/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-i386.egg Extracting lxml-2.2.2-py2.6-macosx-10.5-i386.egg to /Users/gawel/tmp/test/lib/python2.6/site-packages Adding lxml 2.2.2 to easy-install.pth file Installed /Users/gawel/tmp/test/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-i386.egg Processing dependencies for lxml==2.2.2 Searching for lxml==2.2.2 Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.2.2 Downloading http://codespeak.net/lxml/lxml-2.2.2.tgz Processing lxml-2.2.2.tgz Running lxml-2.2.2/setup.py -q bdist_egg --dist-dir /var/folders/6W/6W87x5wkH1ObxROpTXJbTk+++TI/-Tmp-/easy_install-mOILMS/lxml-2.2.2/egg-dist-tmp-uH7pE4 Building lxml version 2.2.2. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available. Using build configuration of libxslt 1.1.24 Building against libxml2/libxslt in the following directory: /usr/local/lib In file included from src/lxml/lxml.etree.c:139: ...

On Wed, Sep 2, 2009 at 9:46 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Well, I think it's more OSX related. I've build my own egg on my system and it work fine: (tttt)gawel:~/tmp/tttt% easy_install http://release.ingeniweb.com/third-party-dist/lxml-2.2.2-py2.4-macosx-10.3-f... Downloading http://release.ingeniweb.com/third-party-dist/lxml-2.2.2-py2.4-macosx-10.3-f... Processing lxml-2.2.2-py2.4-macosx-10.3-fat.egg creating /Users/gawel/tmp/tttt/lib/python2.4/site-packages/lxml-2.2.2-py2.4-macosx-10.3-fat.egg Extracting lxml-2.2.2-py2.4-macosx-10.3-fat.egg to /Users/gawel/tmp/tttt/lib/python2.4/site-packages Adding lxml 2.2.2 to easy-install.pth file Installed /Users/gawel/tmp/tttt/lib/python2.4/site-packages/lxml-2.2.2-py2.4-macosx-10.3-fat.egg Processing dependencies for lxml==2.2.2 Finished processing dependencies for lxml==2.2.2 As you notice, it's for macosx-10.3, not 10.5 (but I assume I have a 10.5.8). I don't know the difference. Maybe the XCode version installed on the system... I can build an egg for py 2.4 2.5 2.6 if you want to add this on pypi even if it seems that I'm the only one that have this problem. -- Gael

Chris Withers wrote:
The libxml2 installation is (or at least the header files are) too old. http://codespeak.net/lxml/build.html#building-lxml-on-macos-x Stefan

Chris Withers <chris@simplistix.co.uk> writes:
You are using the libxslt supplied by Apple. You need a newer one. I got libxml and libxslt from macports <http://www.macports.org/>. Fink would probably provide another war or look in the last month or two on this list I think someone produced a binary build of lxml for OSX -- Mark

Mark Bestley wrote:
If whoever did that could do a bdist_egg for python 2.6 and give it to Stefan to put on PyPI, that would be perfect... Any chance of that happening? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Stefan Behnel wrote:
10.4.11, but what does that have to do with not wanting to fight this fight myself? If someone else can get the compile working, if they can provide a binary egg, surely that will alleviate the need for other Mac users to go through the pain each time? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Chris Withers wrote:
The difference is that we have binaries for 10.5: http://pypi.python.org/pypi/lxml/2.2.2 Stefan

Stefan Behnel wrote:
Oh, I see... So no, still on 10.4... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Stefan Behnel wrote:
Did you try the 10.5 egg? It doesn't have that many dependencies, so it might even work...
Because I use automated tools (buildout in this case) I can't manually substitute in a "wrong" egg like this...
If they don't: Stefan (E.), any chance to get binaries that run on 10.4?
That would be great :-) Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

On Wed, Aug 12, 2009 at 6:01 PM, Stefan Behnel<stefan_ml@behnel.de> wrote:
I still dont understand why my OSX 10.5 always want to compile lxml. gawel:~/tmp% virtualenv test New python executable in test/bin/python Installing setuptools............done. gawel:~/tmp% cd test && source bin/activate (test)gawel:~/tmp/test% easy_install lxml Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.2.2 Downloading http://codespeak.net/lxml/lxml-2.2.2.tgz ^Cinterrupted (test)gawel:~/tmp/test% easy_install http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-macosx-10.5-i386... Downloading http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-macosx-10.5-i386... Processing lxml-2.2.2-py2.6-macosx-10.5-i386.egg creating /Users/gawel/tmp/test/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-i386.egg Extracting lxml-2.2.2-py2.6-macosx-10.5-i386.egg to /Users/gawel/tmp/test/lib/python2.6/site-packages Adding lxml 2.2.2 to easy-install.pth file Installed /Users/gawel/tmp/test/lib/python2.6/site-packages/lxml-2.2.2-py2.6-macosx-10.5-i386.egg Processing dependencies for lxml==2.2.2 Searching for lxml==2.2.2 Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.2.2 Downloading http://codespeak.net/lxml/lxml-2.2.2.tgz Processing lxml-2.2.2.tgz Running lxml-2.2.2/setup.py -q bdist_egg --dist-dir /var/folders/6W/6W87x5wkH1ObxROpTXJbTk+++TI/-Tmp-/easy_install-mOILMS/lxml-2.2.2/egg-dist-tmp-uH7pE4 Building lxml version 2.2.2. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available. Using build configuration of libxslt 1.1.24 Building against libxml2/libxslt in the following directory: /usr/local/lib In file included from src/lxml/lxml.etree.c:139: ...

On Wed, Sep 2, 2009 at 9:46 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Well, I think it's more OSX related. I've build my own egg on my system and it work fine: (tttt)gawel:~/tmp/tttt% easy_install http://release.ingeniweb.com/third-party-dist/lxml-2.2.2-py2.4-macosx-10.3-f... Downloading http://release.ingeniweb.com/third-party-dist/lxml-2.2.2-py2.4-macosx-10.3-f... Processing lxml-2.2.2-py2.4-macosx-10.3-fat.egg creating /Users/gawel/tmp/tttt/lib/python2.4/site-packages/lxml-2.2.2-py2.4-macosx-10.3-fat.egg Extracting lxml-2.2.2-py2.4-macosx-10.3-fat.egg to /Users/gawel/tmp/tttt/lib/python2.4/site-packages Adding lxml 2.2.2 to easy-install.pth file Installed /Users/gawel/tmp/tttt/lib/python2.4/site-packages/lxml-2.2.2-py2.4-macosx-10.3-fat.egg Processing dependencies for lxml==2.2.2 Finished processing dependencies for lxml==2.2.2 As you notice, it's for macosx-10.3, not 10.5 (but I assume I have a 10.5.8). I don't know the difference. Maybe the XCode version installed on the system... I can build an egg for py 2.4 2.5 2.6 if you want to add this on pypi even if it seems that I'm the only one that have this problem. -- Gael

Chris Withers wrote:
The libxml2 installation is (or at least the header files are) too old. http://codespeak.net/lxml/build.html#building-lxml-on-macos-x Stefan
participants (4)
-
Chris Withers
-
Gael Pasgrimaud
-
Mark Bestley
-
Stefan Behnel