Ian Bicking | 1 Feb 2008 02:50
Gravatar

Compile error with trunk

I tried rebuilding the trunk, installing cython and deleting the .c 
files I had around.  I got this:

~/src/lxml$ python setup.py develop
Building with Cython 0.9.6.11.
Building lxml version 2.0.beta2-51162.
running develop
running egg_info
writing src/lxml.egg-info/PKG-INFO
writing top-level names to src/lxml.egg-info/top_level.txt
writing dependency_links to src/lxml.egg-info/dependency_links.txt
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.objectify.c' under directory 
'src/lxml'
warning: no files found matching 'lxml.pyclasslookup.c' under directory 
'src/lxml'
warning: no files found matching '*.html' under directory 'doc'
warning: no previously-included files found matching 'src/lxml/etree.pxi'
writing manifest file 'src/lxml.egg-info/SOURCES.txt'
running build_ext
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall 
-Wstrict-prototypes -fPIC -I/usr/include/libxml2 
-I/usr/include/python2.5 -c src/lxml/lxml.etree.c -o 
build/temp.linux-i686-2.5/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c: In function 
‘__pyx_tp_clear_4lxml_5etree__BaseParser’:
src/lxml/lxml.etree.c:91711: error: invalid lvalue in assignment
src/lxml/lxml.etree.c:91714: error: invalid lvalue in assignment
src/lxml/lxml.etree.c:91717: error: invalid lvalue in assignment
(Continue reading)

Stefan Behnel | 1 Feb 2008 07:12
Picon
Favicon

Re: Compile error with trunk

Hi Ian,

Ian Bicking wrote:
> I tried rebuilding the trunk, installing cython and deleting the .c 
> files I had around.

Note that this now requires a "make realclean", "make clean" will keep the .c
files (mostly to keep people from breaking things by accident if they build
without Cython).

>  I got this:
> 
> ~/src/lxml$ python setup.py develop
> Building with Cython 0.9.6.11.
[...]
> building 'lxml.etree' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall 
> -Wstrict-prototypes -fPIC -I/usr/include/libxml2 
> -I/usr/include/python2.5 -c src/lxml/lxml.etree.c -o 
> build/temp.linux-i686-2.5/src/lxml/lxml.etree.o -w
> src/lxml/lxml.etree.c: In function 
> ‘__pyx_tp_clear_4lxml_5etree__BaseParser’:
> src/lxml/lxml.etree.c:91711: error: invalid lvalue in assignment
> src/lxml/lxml.etree.c:91714: error: invalid lvalue in assignment
> src/lxml/lxml.etree.c:91717: error: invalid lvalue in assignment
> src/lxml/lxml.etree.c:91720: error: invalid lvalue in assignment
[...]

There is a bugfix release called Cython 0.9.6.11b. That should fix it.

(Continue reading)

Christian Zagrodnick | 1 Feb 2008 09:58
Gravatar

Re: requesting lxml testimonials?

On 2008-01-31 21:51:48 +0100, Stephan Richter 
<srichter <at> cosmos.phy.tufts.edu> said:
> 
> lxml takes all the pain out of XML.

I couldn't agree more.

--

-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
jholg | 1 Feb 2008 10:03
Picon
Picon

Re: build & performance issues with 2.0beta2


> thanks for the report.

I'm actually pretty late... sorry for that. Maybe I should set up s.th. like a nightly or weekly
checkout/build/test/bench someday.

> Hmm, guess that's something to fix in Cython. The *LongLong() functions
> are a
> recent addition for safe type conversion.
> 
> The line numbers above differ from mine, though. Could you send me the
> source
> code of the lines that failed here?

 110149
 110150 static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
 110151    if (x == Py_True) return 1;
 110152    else if (x == Py_False) return 0;
 110153    else return PyObject_IsTrue(x);
 110154 }
 110155
 110156 static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x) {
 110157     if (PyInt_CheckExact(x)) {
 110158         return PyInt_AS_LONG(x);
 110159     }
 110160     else if (PyLong_CheckExact(x)) {
 110161         return PyLong_AsLongLong(x);
 110162     }
 110163     else {
 110164         PyObject* tmp = PyNumber_Int(x); if (!tmp) return (PY_LONG_LONG)-1;
(Continue reading)

Lawrence Oluyede | 1 Feb 2008 10:16
Picon
Gravatar

Re: requesting lxml testimonials?

I started using lxml heavily for an internal project involving
resolving relaxng schemas and validating financial instruments and I'm
really, really happy to have it in my toolbox.
The great thing about it is you can do pretty much anything with an
intuitive API. Heavy XPath queries, transformations, HTML parsing.
It's definitely a wonder library. I really makes XML bearable as
Stephan said :-)

--

-- 
Lawrence, stacktrace.it - oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
Stefan Behnel | 1 Feb 2008 10:38
Picon
Favicon

Re: build & performance issues with 2.0beta2

Hi,

jholg <at> gmx.de wrote:
>> thanks for the report.
> 
> I'm actually pretty late... sorry for that. Maybe I should set up s.th.
> like a nightly or weekly checkout/build/test/bench someday.

good idea. :)

> 110165         PY_LONG_LONG val = __pyx_PyInt_AsLongLong(tmp);

Ok, so this line failed with

	src/lxml/lxml.etree.c:110165: parse error before `long'

which lets me assume that PY_LONG_LONG is the usual "long long" on your
machine, which apparently fails in gcc 2.95.

Let me guess: your Python install was not compiled with gcc 2.95, was it?

>> It seems to lack catalog support. I thought about adding that test or
>> not. Looks like it's better to leave it out.
> 
> Is that my libmxl2 that's lacking catalog support?

Yes, or maybe just the catalog itself. I have the DocBook DTD locally in my
catalog under

	/usr/share/xml/docbook/schema/dtd/
(Continue reading)

jholg | 1 Feb 2008 11:46
Picon
Picon

Re: build & performance issues with 2.0beta2

Hi Stefan,

> which lets me assume that PY_LONG_LONG is the usual "long long" on your
> machine, which apparently fails in gcc 2.95.
> 
> Let me guess: your Python install was not compiled with gcc 2.95, was it?
> 

It was compiled with 2.95:

0 pytaf <at> adevp02 .../lxml-2.0beta2 $ gcc -dumpversion
2.95.2
0 pytaf <at> adevp02 .../lxml-2.0beta2 $ /apps/pydev/hjoukl/bin/python2.4 setup.py build
Building with Cython 0.9.6.11b.
Building lxml version 2.0.beta2-51091.
running build
running build_py
writing byte-compilation script '/tmp/tmp61b-gM.py'
/apps/pydev/hjoukl/bin/python2.4 -O /tmp/tmp61b-gM.py
removing /tmp/tmp61b-gM.py
running build_ext
building 'lxml.etree' extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/apps/prod//include
-I/apps/prod//include/libxml2 -I/apps/prod/include/libxml2 -I/apps/prod/include
-I/apps/pydev/hjoukl/include/python2.4 -c src/lxml/lxml.etree.c -o
build/temp.solaris-2.8-sun4u-2.4/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsLongLong':
src/lxml/lxml.etree.c:110165: parse error before `long'
src/lxml/lxml.etree.c:110167: `val' undeclared (first use in this function)
src/lxml/lxml.etree.c:110167: (Each undeclared identifier is reported only once
(Continue reading)

Stefan Behnel | 1 Feb 2008 12:07
Picon
Favicon

Re: build & performance issues with 2.0beta2

Hi Holger,

jholg <at> gmx.de wrote:
> src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsLongLong':
> src/lxml/lxml.etree.c:110165: parse error before `long'
> src/lxml/lxml.etree.c:110167: `val' undeclared (first use in this function)
> src/lxml/lxml.etree.c:110167: (Each undeclared identifier is reported only once
> src/lxml/lxml.etree.c:110167: for each function it appears in.)
> src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsUnsignedLongLong':
> src/lxml/lxml.etree.c:110185: parse error before `long'
> src/lxml/lxml.etree.c:110187: `val' undeclared (first use in this function)
> error: command 'gcc' failed with exit status 1

I forwarded this to the Cython list, let's see what that gives.

Stefan
Gilles Lenfant | 1 Feb 2008 12:09
Picon
Gravatar

Re: requesting lxml testimonials?

Le 31 janv. 08 à 21:51, Stephan Richter a écrit :

> On Thursday 31 January 2008, Martijn Faassen wrote:
>> else wants to give a testimonial, together with permission for its  
>> use?
>

[...]

> lxml takes all the pain out of XML.

That's the key point of lxml. THE tool for python and XML, as well as  
for newbies and experienced developers.

>

Regards
--

-- 
Gilles Lenfant
gilles.lenfant <at> gmail.com
Stefan Behnel | 1 Feb 2008 14:35
Picon
Favicon

Re: build & performance issues with 2.0beta2

Hi Holger,

Stefan Behnel wrote:
> jholg <at> gmx.de wrote:
>> src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsLongLong':
>> src/lxml/lxml.etree.c:110165: parse error before `long'
>> src/lxml/lxml.etree.c:110167: `val' undeclared (first use in this function)
>> src/lxml/lxml.etree.c:110167: (Each undeclared identifier is reported only once
>> src/lxml/lxml.etree.c:110167: for each function it appears in.)
>> src/lxml/lxml.etree.c: In function `__pyx_PyInt_AsUnsignedLongLong':
>> src/lxml/lxml.etree.c:110185: parse error before `long'
>> src/lxml/lxml.etree.c:110187: `val' undeclared (first use in this function)
>> error: command 'gcc' failed with exit status 1
> 
> I forwarded this to the Cython list, let's see what that gives.

And it helped! :)

http://comments.gmane.org/gmane.comp.python.cython.devel/588

Here's a fix for Cython.

Stefan
Attachment (gcc295-fix.patch): text/x-patch, 1182 bytes
_______________________________________________
lxml-dev mailing list
lxml-dev <at> codespeak.net
http://codespeak.net/mailman/listinfo/lxml-dev
(Continue reading)


Gmane