[lxml-dev] Re: etree compile problem

Victor Ng wrote:
Does etree in the trunk line compile for you?
make
Yup, it seems to work just fine: python2.3 setup.py build_ext -i running build_ext building 'lxml.etree' extension creating build creating build/temp.linux-i686-2.3 creating build/temp.linux-i686-2.3/src creating build/temp.linux-i686-2.3/src/lxml gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/usr/include/python2.3 -c src/lxml/etree.c -o build/temp.linux-i686-2.3/src/lxml/etree.o -w gcc -pthread -shared build/temp.linux-i686-2.3/src/lxml/etree.o -lxml2 -o src/lxml/etree.so building 'lxml.dom' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/usr/include/python2.3 -c src/lxml/dom.c -o build/temp.linux-i686-2.3/src/lxml/dom.o -w gcc -pthread -shared build/temp.linux-i686-2.3/src/lxml/dom.o -lxml2 -o src/lxml/dom.so What kind of messages are you getting? Regards, Martijn

dhcp158:~/dev/lxml/trunk victorng$ python2.3 setup.py build_ext -i running build_ext building 'lxml.etree' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c src/lxml/etree.c -o build/temp.darwin-7.6.0-Power_Macintosh-2.3/src/lxml/etree.o -w src/lxml/etree.c:9:25: libxml/dict.h: No such file or directory src/lxml/etree.c:94: error: parse error before "xmlDict" src/lxml/etree.c: In function `__pyx_f_5etree_ElementTree': src/lxml/etree.c:2076: error: dereferencing pointer to incomplete type src/lxml/etree.c:2082: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser___init__': src/lxml/etree.c:2142: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser___del__': src/lxml/etree.c:2163: error: dereferencing pointer to incomplete type src/lxml/etree.c:2167: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser_parseDoc': src/lxml/etree.c:2190: error: dereferencing pointer to incomplete type src/lxml/etree.c:2204: error: dereferencing pointer to incomplete type src/lxml/etree.c:2206: error: structure has no member named `dict' src/lxml/etree.c:2211: error: structure has no member named `dict' src/lxml/etree.c:2214: error: structure has no member named `dict' src/lxml/etree.c:2214: error: dereferencing pointer to incomplete type src/lxml/etree.c:2217: error: structure has no member named `dict' src/lxml/etree.c:2223: error: `XML_PARSE_NOENT' undeclared (first use in this function) src/lxml/etree.c:2223: error: (Each undeclared identifier is reported only once src/lxml/etree.c:2223: error: for each function it appears in.) src/lxml/etree.c:2223: error: `XML_PARSE_NOCDATA' undeclared (first use in this function) src/lxml/etree.c:2236: error: dereferencing pointer to incomplete type src/lxml/etree.c:2240: error: dereferencing pointer to incomplete type src/lxml/etree.c:2240: error: structure has no member named `dict' src/lxml/etree.c:2243: error: dereferencing pointer to incomplete type src/lxml/etree.c:2280: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser_newDoc': src/lxml/etree.c:2291: error: dereferencing pointer to incomplete type src/lxml/etree.c:2297: error: dereferencing pointer to incomplete type src/lxml/etree.c:2299: error: structure has no member named `dict' src/lxml/etree.c:2304: error: structure has no member named `dict' src/lxml/etree.c:2307: error: structure has no member named `dict' src/lxml/etree.c:2307: error: dereferencing pointer to incomplete type src/lxml/etree.c:2310: error: dereferencing pointer to incomplete type src/lxml/etree.c:2316: error: dereferencing pointer to incomplete type src/lxml/etree.c:2320: error: dereferencing pointer to incomplete type src/lxml/etree.c:2320: error: structure has no member named `dict' src/lxml/etree.c:2323: error: dereferencing pointer to incomplete type src/lxml/etree.c:2336: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_XML': src/lxml/etree.c:2355: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_tp_new_5etree_Parser': src/lxml/etree.c:3523: error: dereferencing pointer to incomplete type src/lxml/etree.c: At top level: src/lxml/etree.c:3619: error: invalid application of `sizeof' to an incomplete type error: command 'gcc' failed with exit status 1 dhcp158:~/dev/lxml/trunk victorng$ --- "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." ~ George Bernard Shaw On 23-Nov-04, at 12:52 PM, Martijn Faassen wrote:

Hey, Some version numbers to try to figure this one out: Running on debian unstable libxml2 2.6.11 gcc (GCC) 3.3.5 pyrex 0.9.3 Python 2.3.4 Regards, Martijn

I'm using Python 2.3.0 and libxml2 2.5.4 on my OSX machine as that's what ships standard. If possible - I'd really like to try to avoid having to install a custom libxml2 binary under OSX. I have access to a new Debian x86 machine so I'll try recompiling there. vic --- "Consequences, Schmonsequences, as long as I'm rich." -- Looney Tunes, Ali Baba Bunny (1957, Chuck Jones) On 24-Nov-04, at 12:48 PM, Martijn Faassen wrote:

Victor Ng wrote:
This older version of libxml2 may be the cause: -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c src/lxml/etree.c -o build/temp.darwin-7.6.0-Power_Macintosh-2.3/src/lxml/etree.o -w src/lxml/etree.c:9:25: libxml/dict.h: No such file or directory if 2.5.4 doesn't have dict.h, then that's an easy explanation for what's up. I just downloaded that version, and indeed that file is missing. Note that libxml2 2.5.4 is quite old, going back to feb 20 2003.. While I understand trying to work with OSX defaults, it'll also seriously hamper our ability to stay up to date with libxml2.. You could hack etree.pyx and comment out the dict stuff. This is code to make multiple libxml2 documents share the same dictionary, which is necessary if you want to be able to move nodes between two different documents. If you don't do it, you'll get obscure segfaults and such. I guess that in libxml2.5.4 you run into much less problems with this, as there don't seem to be these dictionaries.. Regards, Martijn

dhcp158:~/dev/lxml/trunk victorng$ python2.3 setup.py build_ext -i running build_ext building 'lxml.etree' extension gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c src/lxml/etree.c -o build/temp.darwin-7.6.0-Power_Macintosh-2.3/src/lxml/etree.o -w src/lxml/etree.c:9:25: libxml/dict.h: No such file or directory src/lxml/etree.c:94: error: parse error before "xmlDict" src/lxml/etree.c: In function `__pyx_f_5etree_ElementTree': src/lxml/etree.c:2076: error: dereferencing pointer to incomplete type src/lxml/etree.c:2082: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser___init__': src/lxml/etree.c:2142: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser___del__': src/lxml/etree.c:2163: error: dereferencing pointer to incomplete type src/lxml/etree.c:2167: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser_parseDoc': src/lxml/etree.c:2190: error: dereferencing pointer to incomplete type src/lxml/etree.c:2204: error: dereferencing pointer to incomplete type src/lxml/etree.c:2206: error: structure has no member named `dict' src/lxml/etree.c:2211: error: structure has no member named `dict' src/lxml/etree.c:2214: error: structure has no member named `dict' src/lxml/etree.c:2214: error: dereferencing pointer to incomplete type src/lxml/etree.c:2217: error: structure has no member named `dict' src/lxml/etree.c:2223: error: `XML_PARSE_NOENT' undeclared (first use in this function) src/lxml/etree.c:2223: error: (Each undeclared identifier is reported only once src/lxml/etree.c:2223: error: for each function it appears in.) src/lxml/etree.c:2223: error: `XML_PARSE_NOCDATA' undeclared (first use in this function) src/lxml/etree.c:2236: error: dereferencing pointer to incomplete type src/lxml/etree.c:2240: error: dereferencing pointer to incomplete type src/lxml/etree.c:2240: error: structure has no member named `dict' src/lxml/etree.c:2243: error: dereferencing pointer to incomplete type src/lxml/etree.c:2280: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_6Parser_newDoc': src/lxml/etree.c:2291: error: dereferencing pointer to incomplete type src/lxml/etree.c:2297: error: dereferencing pointer to incomplete type src/lxml/etree.c:2299: error: structure has no member named `dict' src/lxml/etree.c:2304: error: structure has no member named `dict' src/lxml/etree.c:2307: error: structure has no member named `dict' src/lxml/etree.c:2307: error: dereferencing pointer to incomplete type src/lxml/etree.c:2310: error: dereferencing pointer to incomplete type src/lxml/etree.c:2316: error: dereferencing pointer to incomplete type src/lxml/etree.c:2320: error: dereferencing pointer to incomplete type src/lxml/etree.c:2320: error: structure has no member named `dict' src/lxml/etree.c:2323: error: dereferencing pointer to incomplete type src/lxml/etree.c:2336: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_f_5etree_XML': src/lxml/etree.c:2355: error: dereferencing pointer to incomplete type src/lxml/etree.c: In function `__pyx_tp_new_5etree_Parser': src/lxml/etree.c:3523: error: dereferencing pointer to incomplete type src/lxml/etree.c: At top level: src/lxml/etree.c:3619: error: invalid application of `sizeof' to an incomplete type error: command 'gcc' failed with exit status 1 dhcp158:~/dev/lxml/trunk victorng$ --- "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." ~ George Bernard Shaw On 23-Nov-04, at 12:52 PM, Martijn Faassen wrote:

Hey, Some version numbers to try to figure this one out: Running on debian unstable libxml2 2.6.11 gcc (GCC) 3.3.5 pyrex 0.9.3 Python 2.3.4 Regards, Martijn

I'm using Python 2.3.0 and libxml2 2.5.4 on my OSX machine as that's what ships standard. If possible - I'd really like to try to avoid having to install a custom libxml2 binary under OSX. I have access to a new Debian x86 machine so I'll try recompiling there. vic --- "Consequences, Schmonsequences, as long as I'm rich." -- Looney Tunes, Ali Baba Bunny (1957, Chuck Jones) On 24-Nov-04, at 12:48 PM, Martijn Faassen wrote:

Victor Ng wrote:
This older version of libxml2 may be the cause: -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c src/lxml/etree.c -o build/temp.darwin-7.6.0-Power_Macintosh-2.3/src/lxml/etree.o -w src/lxml/etree.c:9:25: libxml/dict.h: No such file or directory if 2.5.4 doesn't have dict.h, then that's an easy explanation for what's up. I just downloaded that version, and indeed that file is missing. Note that libxml2 2.5.4 is quite old, going back to feb 20 2003.. While I understand trying to work with OSX defaults, it'll also seriously hamper our ability to stay up to date with libxml2.. You could hack etree.pyx and comment out the dict stuff. This is code to make multiple libxml2 documents share the same dictionary, which is necessary if you want to be able to move nodes between two different documents. If you don't do it, you'll get obscure segfaults and such. I guess that in libxml2.5.4 you run into much less problems with this, as there don't seem to be these dictionaries.. Regards, Martijn
participants (2)
-
Martijn Faassen
-
Victor Ng