[lxml-dev] Compile failure

According to this: http://codespeak.net/lxml/build.html we should avoid installing Cython but using easy_install to build fails saying the cython generated file is missing I tried to build from source (svn checkout) and had the same issue Last Changed Author: scoder Last Changed Rev: 78186 Last Changed Date: 2010-10-21 13:48:54 -0400 (Thu, 21 Oct 2010) so I install cython anyway and try to compile the source, this also fails : Error converting Pyrex file to C: ------------------------------------------------------------ ... c_child = _findChildForwards(c_node, 0) while c_child is not NULL: if c_child.type == tree.XML_ELEMENT_NODE: for i in range(c_tag_count): if _tagMatchesExactly(c_child, c_ns_tags[2*i], c_ns_tags[2*i+1]): c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) ^ ------------------------------------------------------------ /home/crucial/tmp/lxml/src/lxml/cleanup.pxi:246:64: Cannot assign type 'int' to 'xmlNode *' building 'lxml.etree' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w src/lxml/lxml.etree.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. *but then I succeeded with the old sudo easy_install lxml* because now I have Cython just FYI. so the advice on the build page says not to install Cython but that was the only way I got it to work. building from source in that checkout failed

felix, 26.10.2010 15:28:
According to this: http://codespeak.net/lxml/build.html
we should avoid installing Cython
but using easy_install to build fails saying the cython generated file is missing
I doubt that it's failing because of that. However, you didn't provide the output of the build, so I can't guess what happened that actually made the build fail.
I tried to build from source (svn checkout) and had the same issue
Last Changed Author: scoder Last Changed Rev: 78186 Last Changed Date: 2010-10-21 13:48:54 -0400 (Thu, 21 Oct 2010)
so I install cython anyway
Well, the page above also says: """ Only if you are interested in building lxml from a Subversion checkout (e.g. to test a bug fix that has not been release yet) or if you want to be an lxml developer, then you do need a working Cython installation. """ so you actually *need* Cython for a build from developer sources.
and try to compile the source, this also fails :
Error converting Pyrex file to C: ------------------------------------------------------------ ... c_child = _findChildForwards(c_node, 0) while c_child is not NULL: if c_child.type == tree.XML_ELEMENT_NODE: for i in range(c_tag_count): if _tagMatchesExactly(c_child, c_ns_tags[2*i], c_ns_tags[2*i+1]): c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) ^ ------------------------------------------------------------
/home/crucial/tmp/lxml/src/lxml/cleanup.pxi:246:64: Cannot assign type 'int' to 'xmlNode *'
Looks like you installed an older version of Cython, likely pre-0.12. The current trunk of lxml requires 0.13. The latest build instructions for the SVN trunk are in the SVN trunk as "doc/build.txt", or (not always completely up-to-date) here: http://codespeak.net/lxml/dev/build.html
*but then I succeeded with the old sudo easy_install lxml*
because now I have Cython
Again, I doubt that this is the reason. Stefan

On Sat, Oct 30, 2010 at 10:49 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
felix, 26.10.2010 15:28:
According to this:
http://codespeak.net/lxml/build.html
we should avoid installing Cython
but using easy_install to build fails saying the cython generated file is missing
I doubt that it's failing because of that. However, you didn't provide the output of the build, so I can't guess what happened that actually made the build fail.
sorry, that output had scrolled off by the time I realized I should submit a report. I have another server so fortunately I can fail there and show you. crucial@crucial-systems:~/working/lxml$ python setup.py build /home/crucial/working/lxml/versioninfo.py:53: UserWarning: unrecognized .svn/entries format; skipping /home/crucial/working/lxml/ warn("unrecognized .svn/entries format; skipping "+base) Building lxml version 2.3.beta1. *NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available.* Using build configuration of libxslt 1.1.26 Building against libxml2/libxslt in the following directory: /usr/lib running build running build_py running build_ext building 'lxml.etree' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/libxml2 -I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w gcc: src/lxml/lxml.etree.c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1
The latest build instructions for the SVN trunk are in the SVN trunk as "doc/build.txt", or *(not always completely up-to-date)* here:
exactly
*but then I succeeded with the old sudo easy_install lxml*
because now I have Cython
Again, I doubt that this is the reason.
sudo easy_install lxml failed before after installing Cython it says it uses Cython (not Trying to build without Cython) and it worked. nothing else having changed I thought it was a reasonable guess that it worked because it used Cython because Cython is installed. * *
Stefan

Hi,
On Sat, Oct 30, 2010 at 10:49 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
felix, 26.10.2010 15:28:
According to this:
http://codespeak.net/lxml/build.html
we should avoid installing Cython
but using easy_install to build fails saying the cython generated file is missing
Note that it says """ Since we distribute the Cython-generated .c files with lxml *releases*, however, you do not need Cython to build lxml from the normal *release* sources. """ So the Cython-generated .c files are not in an SVN checkout but should be in the release packages.
Again, I doubt that this is the reason.
sudo easy_install lxml failed before
after installing Cython it says it uses Cython (not Trying to build without Cython) and it worked.
nothing else having changed I thought it was a reasonable guess that it worked because it used Cython because Cython is installed.
I just checked the 2.3beta1 (source) package on pypi and it does contain the .c files: -rw-r--r-- 1000/1000 7102827 Sep 6 09:31 2010 lxml-2.3beta1/src/lxml/lxml.etree.c -rw-r--r-- 1000/1000 1318011 Sep 6 09:33 2010 lxml-2.3beta1/src/lxml/lxml.objectify.c Holger -- GRATIS! Movie-FLAT mit über 300 Videos. Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
participants (3)
-
felix
-
jholg@gmx.de
-
Stefan Behnel