From: Sean Chittenden Date: 2002-07-18T07:56:35+09:00 Subject: ANN ruby-libxml update (Re: error compiling ruby-libxml) > I just downloaded ruby-libxml-20020709 > and tried to compile it on my linux machine > > I have > ruby 1.6.6 > and > libxml 2.4.22 > > I get this error after calling make: > > gcc -fPIC -g -O2 -g -Wall -I/usr/local/include -I/usr/local/include/libxml2 > -I/usr/local/include/libxml2 -I/usr/local/lib/ruby/1.6/i686-linux -I. > -I/usr/local/include -DHAVE_ZLIB_H -DHAVE_DOCBCREATEFILEPARSERCTXT -c -o > ruby_xml_sax_parser.o ruby_xml_sax_parser.c > ruby_xml_sax_parser.c: In function `ruby_xml_sax_parser_new': > ruby_xml_sax_parser.c:21: parse error before `emptySAXHandlerStruct' > ruby_xml_sax_parser.c:52: `emptySAXHandlerStruct' undeclared (first use in > this function) > ruby_xml_sax_parser.c:52: (Each undeclared identifier is reported only once > ruby_xml_sax_parser.c:52: for each function it appears in.) > make: *** [ruby_xml_sax_parser.o] Error 1 For some reason, this works on gcc 3.1 and there weren't any problems. ::shrug:: I've updated CVS to handle this error. The SAX parser isn't close to being done though, so I wouldn't worry about trying to use it. You can create a SAX parser object, but it does nothing for you. libxml has a really tricky memory structure and the order in which memory gets free'ed seems to be. I think what I need to do is setup a destructor.... libxml has its own memory mallocing that I haven't figured how to get working in a nice way with Ruby. I've gotten the DOM interface all balanced out and working nicely, but the SAX stub needs work. Just don't use it for now. :~) -sc PS Here's a new version: http://www.rubynet.org/modules/xml/ruby-libxml/ I'll update the port in a day or so when I finish libxslt. ::grin:: -- Sean Chittenden