[lxml-dev] Fedora Core 4 and lxml

I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error :
building 'lxml.etree' extension Traceback (most recent call last): File "setup.py", line 29, in ? cmdclass = {'build_ext': build_pyx} File "/usr/lib/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/distutils/command/install.py", line 506, in run self.run_command('build') File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/distutils/command/build_ext.py", line 279, in run self.build_extensions() File "/usr/lib/python2.4/distutils/command/build_ext.py", line 405, in build_extensions self.build_extension(ext) File "/usr/lib/python2.4/distutils/command/build_ext.py", line 442, in build_extension sources = self.swig_sources(sources, ext) TypeError: swig_sources() takes exactly 2 arguments (3 given)
Does someone has an idea on how to solve this problem ?
Thanks in advance.

Fabien SCHWOB wrote:
I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error : [...] TypeError: swig_sources() takes exactly 2 arguments (3 given)
http://codespeak.net/pipermail/lxml-dev/2006-March/000954.html
Stefan

Stefan Behnel wrote:
Fabien SCHWOB wrote:
I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error : [...] TypeError: swig_sources() takes exactly 2 arguments (3 given)
http://codespeak.net/pipermail/lxml-dev/2006-March/000954.html
How do we make sure people don't run into this one again? Get a patch accepted by Pyrex?
Actually we should start releasing with the generated .c code included so people won't need Pyrex anymore. That'll be the best approach for at least people using the release.
Regards,
Martijn

Martijn Faassen wrote:
Stefan Behnel wrote:
Fabien SCHWOB wrote:
I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error : [...] TypeError: swig_sources() takes exactly 2 arguments (3 given)
http://codespeak.net/pipermail/lxml-dev/2006-March/000954.html
How do we make sure people don't run into this one again? Get a patch accepted by Pyrex?
Like that's ever gonna happen ... :)
Actually we should start releasing with the generated .c code included so people won't need Pyrex anymore. That'll be the best approach for at least people using the release.
etree.c is currently included when you run python setup.py sdist or anything in that line, so it will be in 0.9 and work around all bugs that normal users can encounter from that side. And developers who want to contribute to lxml can well read some documentation first...
You should add the bug fix above to the Pyrex section of installation.html on the web page.
Stefan

Stefan Behnel a écrit :
How do we make sure people don't run into this one again? Get a patch accepted by Pyrex?
Like that's ever gonna happen ... :)
Actually we should start releasing with the generated .c code included so people won't need Pyrex anymore. That'll be the best approach for at least people using the release.
etree.c is currently included when you run python setup.py sdist or anything in that line, so it will be in 0.9 and work around all bugs that normal users can encounter from that side. And developers who want to contribute to lxml can well read some documentation first...
You should add the bug fix above to the Pyrex section of installation.html on the web page.
+1 and even host a temporary branch/fork of Pyrex with all the necessary patches included in the lxml repos for the convenience of lxml hackers.
Once the patches are included in upstream Pyrex we can get rid of the local branch.

Olivier Grisel wrote:
host a temporary branch/fork of Pyrex with all the necessary patches included in the lxml repos for the convenience of lxml hackers.
Once the patches are included in upstream Pyrex we can get rid of the local branch.
Ok, I think that's a good idea. Since there will be no real development on Pyrex on our side, I simply imported it into
https://codespeak.net/svn/lxml/pyrex
It's the patched version of 0.9.3.1. It also contains an SRPM and an RPM, so people can download a working version right away.
http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1.tar.gz http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.src.rpm http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.noarch.rpm
Fabien, please try these.
Stefan

Stefan Behnel wrote:
Olivier Grisel wrote:
host a temporary branch/fork of Pyrex with all the necessary patches included in the lxml repos for the convenience of lxml hackers.
Once the patches are included in upstream Pyrex we can get rid of the local branch.
Ok, I think that's a good idea. Since there will be no real development on Pyrex on our side, I simply imported it into
Good idea under the circumstances. Unfortunate too. Perhaps we should tell them we forked it because they don't fix the problems or accept our patches to get them to do somthing. :)
It's the patched version of 0.9.3.1. It also contains an SRPM and an RPM, so people can download a working version right away.
http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1.tar.gz http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.src.rpm http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.noarch.rpm
Oh, cool.
Regards,
Martijn

Ok, I think that's a good idea. Since there will be no real development on Pyrex on our side, I simply imported it into
https://codespeak.net/svn/lxml/pyrex
It's the patched version of 0.9.3.1. It also contains an SRPM and an RPM, so people can download a working version right away.
http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1.tar.gz http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.src.rpm http://codespeak.net/svn/lxml/pyrex/dist/Pyrex-0.9.3.1-1.noarch.rpm
Fabien, please try these.
Thanks, it seems to work !! Now, I can have fun with DOM and XPath. Thanks for your help everybody. And I must say that lxml definitely rocks : a very good and pythonic API, good performance and the support of a lot of "XML friends (xpath, etc..)".

I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error : [...] TypeError: swig_sources() takes exactly 2 arguments (3 given)
http://codespeak.net/pipermail/lxml-dev/2006-March/000954.html
Thanks, this problem is solved, but now I have another one. You can see the log below. The English translation of "erreur: membre gauche de l'affectation invalide" (french) is "error: left member of the assignment is invalid".
Thanks
============8<====== LOGS ========8<================
running build_ext building 'lxml.etree' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c src/lxml/etree.c -o build/temp.linux-i686-2.4/src/lxml/etree.o -w -I/usr/include/libxml2 src/lxml/etree.c: In function __pyx_f_5etree__parseDocument: src/lxml/etree.c:704: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__documentFactory: src/lxml/etree.c:724: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:732: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:746: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__elementTreeFactory: src/lxml/etree.c:1851: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__newElementTree: src/lxml/etree.c:1873: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:1881: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:1904: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:1920: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_8_Element___setslice__: src/lxml/etree.c:2101: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:2178: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_8_Element___getslice__: src/lxml/etree.c:3089: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:3123: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_8_Element_getchildren: src/lxml/etree.c:3684: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:3696: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__elementFactory: src/lxml/etree.c:4163: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4170: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4229: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4242: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4287: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__commentFactory: src/lxml/etree.c:4604: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4610: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4644: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:4666: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__attribFactory: src/lxml/etree.c:5676: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:5682: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:5703: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:5725: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_20ElementChildIterator___init__: src/lxml/etree.c:5750: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:5755: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_20ElementChildIterator___next__: src/lxml/etree.c:5824: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:5848: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_Element: src/lxml/etree.c:6059: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6060: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6096: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6102: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_Comment: src/lxml/etree.c:6155: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6182: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_SubElement: src/lxml/etree.c:6241: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6275: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_ElementTree: src/lxml/etree.c:6332: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6333: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6343: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6352: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6361: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6369: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_tostring: src/lxml/etree.c:6574: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6608: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_parse: src/lxml/etree.c:6689: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:6694: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__find_element_class: src/lxml/etree.c:7519: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7555: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_4XSLT___init__: src/lxml/etree.c:7644: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7649: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_4XSLT___call__: src/lxml/etree.c:7751: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7752: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7753: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7763: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7769: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:7930: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__xsltResultTreeFactory: src/lxml/etree.c:8129: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:8136: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_22XPathDocumentEvaluator___init__: src/lxml/etree.c:8200: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:8201: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:8210: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:8216: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_22XPathDocumentEvaluator__hold: src/lxml/etree.c:8813: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:8913: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__wrapXPathObject: src/lxml/etree.c:9268: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:9438: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__createNodeSetResult: src/lxml/etree.c:9680: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:9724: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__xpathCallback: src/lxml/etree.c:9879: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:9880: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:9921: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:9945: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_9XMLSchema___init__: src/lxml/etree.c:10286: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:10292: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_getProxy: src/lxml/etree.c:11059: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__documentOrRaise: src/lxml/etree.c:11576: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:11581: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:11614: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__documentOf: src/lxml/etree.c:11705: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree__rootNodeOf: src/lxml/etree.c:11782: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_f_5etree_changeDocumentBelowHelper: src/lxml/etree.c:13060: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:13092: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__NodeBase: src/lxml/etree.c:13559: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:13560: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_clear_5etree__NodeBase: src/lxml/etree.c:13591: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__ElementTree: src/lxml/etree.c:13719: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:13720: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_clear_5etree__ElementTree: src/lxml/etree.c:13746: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:13748: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__Element: src/lxml/etree.c:13889: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__Comment: src/lxml/etree.c:14138: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__Attrib: src/lxml/etree.c:14325: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__NamespaceRegistry: src/lxml/etree.c:14641: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree__XSLTResultTree: src/lxml/etree.c:14985: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_clear_5etree__XSLTResultTree: src/lxml/etree.c:15009: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree_XPathDocumentEvaluator: src/lxml/etree.c:15137: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:15138: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:15139: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_clear_5etree_XPathDocumentEvaluator: src/lxml/etree.c:15204: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:15206: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree_XPathElementEvaluator: src/lxml/etree.c:15351: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:15352: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_clear_5etree_XPathElementEvaluator: src/lxml/etree.c:15376: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function __pyx_tp_new_5etree_Parser: src/lxml/etree.c:15951: erreur: membre gauche de l'affectation invalide src/lxml/etree.c: In function initetree: src/lxml/etree.c:16139: erreur: membre gauche de l'affectation invalide src/lxml/etree.c:16801: erreur: membre gauche de l'affectation invalide error: command 'gcc' failed with exit status 1

Fabien SCHWOB à écrit:
I'm trying to build lxml on FC4. I've already installed Pyrex and applied the gcc4-small-patch. But when I'm trying to build lxml with 'python setup.py install' or 'make', I get the following error : [...] TypeError: swig_sources() takes exactly 2 arguments (3 given)
http://codespeak.net/pipermail/lxml-dev/2006-March/000954.html
Thanks, this problem is solved, but now I have another one. You can see the log below. The English translation of "erreur: membre gauche de l'affectation invalide" (french) is "error: left member of the assignment is invalid".
Merci, j'avais compris ça. :)
Are you sure you applied the two patches from http://codespeak.net/lxml/installation.html especially the first one?
Stefan
============8<====== LOGS ========8<================
running build_ext building 'lxml.etree' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c src/lxml/etree.c -o build/temp.linux-i686-2.4/src/lxml/etree.o -w -I/usr/include/libxml2 src/lxml/etree.c: In function ‘__pyx_f_5etree__parseDocument’: src/lxml/etree.c:704: erreur: membre gauche de l'affectation invalide
[...]
participants (4)
-
Fabien SCHWOB
-
Martijn Faassen
-
Olivier Grisel
-
Stefan Behnel