
Paul Everitt wrote:
Stefan Behnel wrote:
Paul Everitt wrote:
Howdy. I was giving the htmlparser branch a try. In trying to compile it, I got:
src/lxml/etree.c: In function '__pyx_f_5etree_10HTMLParser___init__': src/lxml/etree.c:17245: error: 'HTML_PARSE_RECOVER' undeclared (first use in this function) src/lxml/etree.c:17245: error: (Each undeclared identifier is reported only once src/lxml/etree.c:17245: error: for each function it appears in.) src/lxml/etree.c:17256: error: 'HTML_PARSE_COMPACT' undeclared (first use in this function) src/lxml/etree.c: In function 'initetree': src/lxml/etree.c:31135: error: 'HTML_PARSE_RECOVER' undeclared (first use in this function) src/lxml/etree.c:31135: error: 'HTML_PARSE_COMPACT' undeclared (first use in this function) error: command 'gcc' failed with exit status 1
Hmm, I don't see a reason for that error. My clean checkout compiles nicely.
What's your libxml2 version on MacOS? In my include/libxml2/HTMLparser.h it says somewhere around line 175:
$ xmllint --version xmllint: using libxml version 20622
You're not OS X, right?
I'm on Linux. 2.6.22 should work perfectly, I just checked.
typedef enum { HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ HTML_PARSE_NONET = 1<<11,/* Forbid network access */ HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */ } htmlParserOption;
All options known in my place - but then, that's libxml 2.6.23 ...
That will be kinda funny if .22 is the smoking gun. ;^)
If the above enum contains the variables in your system, would you mind sending me the etree.c that Pyrex generated for you?
Yep, I'll send it in a private note. Thanks!
Thanks. I really can't see a problem in there. Maybe it's a compiler issue. I rewrote a part that might have shown a different usage of those two enum values. Could you retry with the current SVN? Stefan