From smparkes at smparkes.net Tue Jan 1 21:41:13 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Tue, 1 Jan 2008 18:41:13 -0800 Subject: [libxml-devel] xpath searching without specifying namespace? Message-ID: <5C597C9B5C994108BBE1F4F1E4F1ACEB@windows.esseff.org> I'm stumbled across this in my own work. mortee says: The docs for XML::XPath.find suggest that if I omit the namespace specification, then "matching nodes from any namespace will be included". and it doesn't. I'd argue this is a doc error. Even if one thought this was a good idea, matching any namespace, under the rubric "make simple things easy", I don't think you're ever going to get libxml to do it. Proper namespace handling is too ingrained. I stumbled upon code that tried to hack the xpath expression to handle default namespaces. Creepy code. There's really no safe solution since the same prefix can mean different things at different points in a doc. The "best" solution is probably to remove the namespace from the root element (and the doctype, if necessary, I guess). But that won't match all default namespaces: you can always write and removing the top level ns isn't going to make //a match both nodes. If you really want to do that, you probably need to parse the doc, walk it, writing out nodes w/o the namespace, and then reparse it. From timothyweatherstone at mac.com Tue Jan 1 14:49:06 2008 From: timothyweatherstone at mac.com (Tim Weatherstone) Date: Tue, 1 Jan 2008 19:49:06 +0000 Subject: [libxml-devel] MAC POWERBOOK G4 (PPC) 1.5 MHz : error msg 'need zlib' Message-ID: <4BFD149A-5F44-4118-B362-314A56A326FE@mac.com> I have done as was suggested: I've read the posts & there are similar messages but unfortunately not ones I can understand or use. So with apologies for my stupidity, please could you suggest ways to get libxml-ruby installed so I can install rubyosa ? The terminal printout is given below. ruby -v gives: ruby 1.8.6 (2007-03-13 patchlevel 0) [universal- darwin8.0] thankyou, regards & happy new year timW ****************************************************** the-laptop:~ timothyapweatherstone$ sudo gem install -r libxml-ruby Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install -r libxml-ruby checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... no checking for atan() in -lm... yes checking for inflate() in -lz... no checking for inflate() in -lzlib... no checking for inflate() in -lzlib1... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-socketlib --without-socketlib --with-nsllib --without-nsllib --with-mlib --without-mlib --with-mlib --without-mlib --with-zlib --without-zlib --with-zliblib --without-zliblib --with-zlib1lib --without-zlib1lib extconf failure: need zlib Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/ libxml-ruby-0.5.2.0 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/libxml- ruby-0.5.2.0/ext/xml/gem_make.out the-laptop:~ timothyapweatherstone$ From Glenn.McCord at gmail.com Mon Jan 7 01:14:08 2008 From: Glenn.McCord at gmail.com (GlennNZ) Date: Sun, 6 Jan 2008 22:14:08 -0800 (PST) Subject: [libxml-devel] Is attribute validation broken? Message-ID: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> I'm following through the w3schools tutorial on xsd and xml validation and I'm trying to get one of the examples to validate. The problem seems to be in validating the attributes because if I strip them out, then it validates fine. I'm blindly following the tutorial but I can't see anything wrong with the xsd file, so dare I question if there is a bug? Stripping out the w3schools example somewhat, if I was to take the following schema: An xml file: and a test script: require 'xml/libxml' include XML xsd_string = "" File.open('validator.xsd', 'r') do |f1| while line = f1.gets xsd_string += line end end doc = Document.file('test.xml') schema = XML::Schema.from_string( xsd_string ) print doc.validate(schema) Then I get the following errors >ruby test.rb false error -- found validity error: No declaration for attribute orderid of element shiporder error -- found validity error: No declaration for attribute noNamespaceSchemaLocation of element shiporder error -- found validity error: No declaration for attribute xmlns:xsi of element shiporder I would have thought that the attribute declaration of orderid would avoid the first error, and that the other two attributes wouldn't need to be declared. If the examples are really unclear, the complete xml and xsd is available at http://www.w3schools.com/schema/schema_example.asp Cheers From danj.3skel at gmail.com Mon Jan 7 20:18:22 2008 From: danj.3skel at gmail.com (Dan Janowski) Date: Mon, 7 Jan 2008 20:18:22 -0500 Subject: [libxml-devel] Is attribute validation broken? In-Reply-To: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> References: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> Message-ID: Please verify your validation results using the libxml2 included binaries, in this case 'xmllint'. There has been no recent work on the validation pass through, which is the same as saying I do not know if the ruby library has any culpability. Thus, try the xmlsoft tools. http://xmlsoft.org/xmllint.html Dan On Jan 7, 2008, at 01:14, GlennNZ wrote: > I'm following through the w3schools tutorial on xsd and xml validation > and I'm trying to get one of the examples to validate. The problem > seems to be in validating the attributes because if I strip them out, > then it validates fine. I'm blindly following the tutorial but I can't > see anything wrong with the xsd file, so dare I question if there is a > bug? > > Stripping out the w3schools example somewhat, if I was to take the > following schema: > > > > > > > > > > > > > > > > > An xml file: > > > > > > > > and a test script: > > require 'xml/libxml' > include XML > > xsd_string = "" > > File.open('validator.xsd', 'r') do |f1| > while line = f1.gets > xsd_string += line > end > end > > doc = Document.file('test.xml') > > schema = XML::Schema.from_string( xsd_string ) > > print doc.validate(schema) > > > Then I get the following errors > >> ruby test.rb > false > error -- found validity error: No declaration for attribute orderid of > element shiporder > error -- found validity error: No declaration for attribute > noNamespaceSchemaLocation of element shiporder > error -- found validity error: No declaration for attribute xmlns:xsi > of element shiporder > > I would have thought that the attribute declaration of orderid would > avoid the first error, and that the other two attributes wouldn't need > to be declared. > > If the examples are really unclear, the complete xml and xsd is > available at http://www.w3schools.com/schema/schema_example.asp > > Cheers > __________ From sam.mulube at gmail.com Tue Jan 8 21:19:07 2008 From: sam.mulube at gmail.com (Sam M.) Date: Tue, 8 Jan 2008 18:19:07 -0800 (PST) Subject: [libxml-devel] Is attribute validation broken? In-Reply-To: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> References: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> Message-ID: <950ed186-23b8-49a6-9ced-d4e45e65336f@j78g2000hsd.googlegroups.com> Hi Glenn, I've just been trying to figure out why I couldn't get XSD validation to work at all, never mind if I stripped out the attributes, and I just spotted a validate_schema method of XML::Document that made validation instantly work for me. So the code you have above would look something like this: ... document = XML::Document.file("test.xml") schema = XML::Schema.from_string(xsd_string) ... document.validate_schema(schema) # should return true if your doc matches your schema Incidentally I couldn't find this method mentioned in the rdocs anywhere I only saw it by spotting it in the list of methods of XML::Document. For example in an irb session: document = XML::Document.new document.methods.sort # prints out all methods that document responds to On Jan 7, 6:14 am, GlennNZ wrote: > I'm following through the w3schools tutorial on xsd and xml validation > and I'm trying to get one of the examples to validate. The problem > seems to be in validating the attributes because if I strip them out, > then it validates fine. I'm blindly following the tutorial but I can't > see anything wrong with the xsd file, so dare I question if there is a > bug? > > Stripping out the w3schools example somewhat, if I was to take the > following schema: > > > > > > > > > > > > > > > > An xml file: > > > > > > > > and a test script: > > require 'xml/libxml' > include XML > > xsd_string = "" > > File.open('validator.xsd', 'r') do |f1| > while line = f1.gets > xsd_string += line > end > end > > doc = Document.file('test.xml') > > schema = XML::Schema.from_string( xsd_string ) > > print doc.validate(schema) > > Then I get the following errors > > >ruby test.rb > > false > error -- found validity error: No declaration for attribute orderid of > element shiporder > error -- found validity error: No declaration for attribute > noNamespaceSchemaLocation of element shiporder > error -- found validity error: No declaration for attribute xmlns:xsi > of element shiporder > > I would have thought that the attribute declaration of orderid would > avoid the first error, and that the other two attributes wouldn't need > to be declared. > > If the examples are really unclear, the complete xml and xsd is > available athttp://www.w3schools.com/schema/schema_example.asp > > Cheers > _______________________________________________ > libxml-devel mailing list > libxml-de... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel From Glenn.McCord at gmail.com Wed Jan 9 17:07:00 2008 From: Glenn.McCord at gmail.com (GlennNZ) Date: Wed, 9 Jan 2008 14:07:00 -0800 (PST) Subject: [libxml-devel] Is attribute validation broken? In-Reply-To: <950ed186-23b8-49a6-9ced-d4e45e65336f@j78g2000hsd.googlegroups.com> References: <9c488907-2d44-4f2a-bcd4-d64c93d21575@s12g2000prg.googlegroups.com> <950ed186-23b8-49a6-9ced-d4e45e65336f@j78g2000hsd.googlegroups.com> Message-ID: <5067daf7-fd3f-45e8-92a4-18763d61b26a@l6g2000prm.googlegroups.com> Yes, you're right. validate_schema is listed as a method of XML::Document but never appears in the method description. Unless there is a ruby syntax quirk I'm not aware of. I did see the validate_schema method in the top right hand methods list, but it says validate_schema(XML::Document), rather than validate_schema(XML::Schema) which confused me somewhat. Unfortunately I've just found out that xmllint doesn't insert missing default values. Well, at least I can validate now. Thanks On Jan 9, 3:19 pm, "Sam M." wrote: > Hi Glenn, > > I've just been trying to figure out why I couldn't get XSD validation > to work at all, never mind if I stripped out the attributes, and I > just spotted a validate_schema method of XML::Document that made > validation instantly work for me. > > So the code you have above would look something like this: > > ... > document = XML::Document.file("test.xml") > schema = XML::Schema.from_string(xsd_string) > ... > > document.validate_schema(schema) # should return true if your doc > matches your schema > > Incidentally I couldn't find this method mentioned in the rdocs > anywhere I only saw it by spotting it in the list of methods of > XML::Document. For example in an irb session: > > document = XML::Document.new > document.methods.sort # prints out all methods that > document responds to > > On Jan 7, 6:14 am, GlennNZ wrote: > > > I'm following through the w3schools tutorial on xsd and xml validation > > and I'm trying to get one of the examples to validate. The problem > > seems to be in validating the attributes because if I strip them out, > > then it validates fine. I'm blindly following the tutorial but I can't > > see anything wrong with the xsd file, so dare I question if there is a > > bug? > > > Stripping out the w3schools example somewhat, if I was to take the > > following schema: > > > > > > > > > > > > > > > > > > > > > > > > > > > An xml file: > > > > > > > > > > > > and a test script: > > > require 'xml/libxml' > > include XML > > > xsd_string = "" > > > File.open('validator.xsd', 'r') do |f1| > > while line = f1.gets > > xsd_string += line > > end > > end > > > doc = Document.file('test.xml') > > > schema = XML::Schema.from_string( xsd_string ) > > > print doc.validate(schema) > > > Then I get the following errors > > > >ruby test.rb > > > false > > error -- found validity error: No declaration for attribute orderid of > > element shiporder > > error -- found validity error: No declaration for attribute > > noNamespaceSchemaLocation of element shiporder > > error -- found validity error: No declaration for attribute xmlns:xsi > > of element shiporder > > > I would have thought that the attribute declaration of orderid would > > avoid the first error, and that the other two attributes wouldn't need > > to be declared. > > > If the examples are really unclear, the complete xml and xsd is > > available athttp://www.w3schools.com/schema/schema_example.asp > > > Cheers > > _______________________________________________ > > libxml-devel mailing list > > libxml-de... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel > > _______________________________________________ > libxml-devel mailing list > libxml-de... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel From marc at bloodnok.com Thu Jan 10 18:06:52 2008 From: marc at bloodnok.com (Marc Munro) Date: Thu, 10 Jan 2008 15:06:52 -0800 Subject: [libxml-devel] libxml crash Message-ID: <1200006412.11500.4.camel@bloodnok.com> This is with libxml and libxsl built from SVN 3 days ago. If I run with gdb, my program runs normally. Any suggestions on how I can further track this down? __ Marc *** glibc detected *** ruby: corrupted double-linked list: 0x0914ed28 *** ======= Backtrace: ========= /lib/libc.so.6[0xb7cf7169] /lib/libc.so.6[0xb7cf88ce] /lib/libc.so.6(cfree+0x90)[0xb7cfc570] /usr/lib/libxml2.so.2(xmlHashFree+0xeb)[0xb7afd64b] /usr/lib/libxml2.so.2(xmlXPathRegisteredFuncsCleanup+0x21)[0xb7b2a821] /usr/lib/libxml2.so.2(xmlXPathFreeContext+0x3d)[0xb7b2a86d] /usr/lib/ruby/1.8/libxml_so.so(ruby_xml_xpath_context_free +0x21)[0xb7bf66d1] /usr/lib/libruby1.8.so.1.8(rb_gc_call_finalizer_at_exit +0xa7)[0xb7e91947] /usr/lib/libruby1.8.so.1.8[0xb7e77727] /usr/lib/libruby1.8.so.1.8(ruby_cleanup+0x100)[0xb7e7f810] /usr/lib/libruby1.8.so.1.8(ruby_stop+0x1d)[0xb7e7f95d] /usr/lib/libruby1.8.so.1.8[0xb7e8a921] ruby[0x80486bd] /lib/libc.so.6(__libc_start_main+0xe0)[0xb7ca3450] ruby[0x8048601] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 03:01 21432 /usr/bin/ruby1.8 08049000-0804a000 rw-p 00000000 03:01 21432 /usr/bin/ruby1.8 0804a000-092de000 rw-p 0804a000 00:00 0 [heap] b7800000-b7821000 rw-p b7800000 00:00 0 b7821000-b7900000 ---p b7821000 00:00 0 b7946000-b7950000 r-xp 00000000 03:01 471476 /lib/libgcc_s.so.1 b7950000-b7951000 rw-p 00009000 03:01 471476 /lib/libgcc_s.so.1 b7951000-b79f0000 rw-p b7951000 00:00 0 b79f0000-b7a23000 r-xp 00000000 03:01 22880 /usr/lib/libxslt.so.1.1.22 b7a23000-b7a24000 rw-p 00032000 03:01 22880 /usr/lib/libxslt.so.1.1.22 b7a24000-b7a73000 r-xp 00000000 03:01 19373 /usr/lib/libgcrypt.so.11.2.3 b7a73000-b7a75000 rw-p 0004f000 03:01 19373 /usr/lib/libgcrypt.so.11.2.3 b7a75000-b7a85000 r-xp 00000000 03:01 19199 /usr/lib/libexslt.so.0.8.13 b7a85000-b7a86000 rw-p 0000f000 03:01 19199 /usr/lib/libexslt.so.0.8.13 b7a86000-b7a9a000 r-xp 00000000 03:01 474899 /lib/libnsl-2.7.so b7a9a000-b7a9c000 rw-p 00013000 03:01 474899 /lib/libnsl-2.7.so b7a9c000-b7a9e000 rw-p b7a9c000 00:00 0 b7a9e000-b7ab2000 r-xp 00000000 03:01 16316 /usr/lib/libz.so.1.2.3.3 b7ab2000-b7ab3000 rw-p 00013000 03:01 16316 /usr/lib/libz.so.1.2.3.3 b7ab3000-b7bcb000 r-xp 00000000 03:01 22673 /usr/lib/libxml2.so.2.6.30 b7bcb000-b7bd0000 rw-p 00118000 03:01 22673 /usr/lib/libxml2.so.2.6.30 b7bd0000-b7bd1000 rw-p b7bd0000 00:00 0 b7be4000-b7c02000 r-xp 00000000 03:03 2555924 /home/marc/libxml/libxml/trunk/ext/libxml/libxml_so.so b7c02000-b7c03000 rw-p 0001e000 03:03 2555924 /home/marc/libxml/libxml/trunk/ext/libxml/libxml_so.so b7c03000-b7c8d000 rw-p b7c03000 00:00 0 b7c8d000-b7dd4000 r-xp 00000000 03:01 471461 /lib/libc-2.7.so b7dd4000-b7dd5000 r--p 00147000 03:01 471461 /lib/libc-2.7.so b7dd5000-b7dd7000 rw-p 00148000 03:01 471461 /lib/libc-2.7.so b7dd7000-b7dda000 rw-p b7dd7000 00:00 0 b7dda000-b7dfe000 r-xp 00000000 03:01 474897 /lib/libm-2.7.so b7dfe000-b7e00000 rw-p 00023000 03:01 474897 /lib/libm-2.7.so b7e00000-b7e09000 r-xp 00000000 03:01 474895 /lib/libcrypt-2.7.so b7e09000-b7e0b000 rw-p 00008000 03:01 474895 /lib/libcrypt-2.7.so b7e0b000-b7e32000 rw-p b7e0b000 00:00 0 b7e32000-b7e34000 r-xp 00000000 03:01 474896 /lib/libdl-2.7.so b7e34000-b7e36000 rw-p 00001000 03:01 474896 /lib/libdl-2.7.so b7e36000-b7e37000 rw-p b7e36000 00:00 0 b7e37000-b7e4a000 r-xp 00000000 03:01 474907 /lib/libpthread-2.7.so b7e4a000-b7e4c000 rw-p 00013000 03:01 474907 /lib/libpthread-2.7.so b7e4c000-b7e4e000 rw-p b7e4c000 00:00 0 b7e4e000-b7f0b000 r-xp 00000000 03:01 17026 /usr/lib/libruby1.8.so.1.8.6 b7f0b000-b7f0d000 rw-p 000bd000 03:01 17026 /usr/lib/libruby1.8.so.1.8.6 b7f0d000-b7f1d000 rw-p b7f0d000 00:00 0 b7f23000-b7f26000 r-xp 00000000 03:01 18898 /usr/lib/libgpg-error.so.0.3.0 b7f26000-b7f27000 rw-p 00002000 03:01 18898 /usr/lib/libgpg-error.so.0.3.0 b7f27000-b7f2a000 r-xp 00000000 03:03 6651912 /home/marc/libxml/libxsl/trunk/ext/libxslt/libxslt.so b7f2a000-b7f2b000 rw-p 00002000 03:03 6651912 /home/marc/libxml/libxsl/trunk/ext/libxslt/libxslt.so b7f2b000-b7f2f000 r-xp 00000000 03:01 150369 /usr/lib/ruby/1.8/i486-linux/stringio.so b7f2f000-b7f30000 rw-p 00003000 03:01 150369 /usr/lib/ruby/1.8/i486-linux/stringio.so b7f30000-b7f32000 rw-p b7f30000 00:00 0 b7f32000-b7f4e000 r-xp 00000000 03:01 471431 /lib/ld-2.7.so b7f4e000-b7f50000 rw-p 0001b000 03:01 471431 /lib/ld-2.7.so bf909000-bf94e000 rw-p bf909000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] Aborted -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080110/9c57da18/attachment.bin From todd.fisher at gmail.com Fri Jan 11 13:47:12 2008 From: todd.fisher at gmail.com (Todd Fisher) Date: Fri, 11 Jan 2008 13:47:12 -0500 Subject: [libxml-devel] libxml crash In-Reply-To: <1200006412.11500.4.camel@bloodnok.com> References: <1200006412.11500.4.camel@bloodnok.com> Message-ID: On 1/10/08, Marc Munro wrote: > This is with libxml and libxsl built from SVN 3 days ago You might try running with valgrind. > > If I run with gdb, my program runs normally. > > Any suggestions on how I can further track this down? > > __ > Marc > > > *** glibc detected *** ruby: corrupted double-linked list: 0x0914ed28 > *** > ======= Backtrace: ========= > /lib/libc.so.6[0xb7cf7169] > /lib/libc.so.6[0xb7cf88ce] > /lib/libc.so.6(cfree+0x90)[0xb7cfc570] > /usr/lib/libxml2.so.2(xmlHashFree+0xeb)[0xb7afd64b] > /usr/lib/libxml2.so.2(xmlXPathRegisteredFuncsCleanup+0x21)[0xb7b2a821] > /usr/lib/libxml2.so.2(xmlXPathFreeContext+0x3d)[0xb7b2a86d] > /usr/lib/ruby/1.8/libxml_so.so(ruby_xml_xpath_context_free > +0x21)[0xb7bf66d1] > /usr/lib/libruby1.8.so.1.8(rb_gc_call_finalizer_at_exit > +0xa7)[0xb7e91947] > /usr/lib/libruby1.8.so.1.8[0xb7e77727] > /usr/lib/libruby1.8.so.1.8(ruby_cleanup+0x100)[0xb7e7f810] > /usr/lib/libruby1.8.so.1.8(ruby_stop+0x1d)[0xb7e7f95d] > /usr/lib/libruby1.8.so.1.8[0xb7e8a921] > ruby[0x80486bd] > /lib/libc.so.6(__libc_start_main+0xe0)[0xb7ca3450] > ruby[0x8048601] > ======= Memory map: ======== > 08048000-08049000 r-xp 00000000 03:01 21432 /usr/bin/ruby1.8 > 08049000-0804a000 rw-p 00000000 03:01 21432 /usr/bin/ruby1.8 > 0804a000-092de000 rw-p 0804a000 00:00 0 [heap] > b7800000-b7821000 rw-p b7800000 00:00 0 > b7821000-b7900000 ---p b7821000 00:00 0 > b7946000-b7950000 r-xp 00000000 03:01 471476 /lib/libgcc_s.so.1 > b7950000-b7951000 rw-p 00009000 03:01 471476 /lib/libgcc_s.so.1 > b7951000-b79f0000 rw-p b7951000 00:00 0 > b79f0000-b7a23000 r-xp 00000000 03:01 > 22880 /usr/lib/libxslt.so.1.1.22 > b7a23000-b7a24000 rw-p 00032000 03:01 > 22880 /usr/lib/libxslt.so.1.1.22 > b7a24000-b7a73000 r-xp 00000000 03:01 > 19373 /usr/lib/libgcrypt.so.11.2.3 > b7a73000-b7a75000 rw-p 0004f000 03:01 > 19373 /usr/lib/libgcrypt.so.11.2.3 > b7a75000-b7a85000 r-xp 00000000 03:01 > 19199 /usr/lib/libexslt.so.0.8.13 > b7a85000-b7a86000 rw-p 0000f000 03:01 > 19199 /usr/lib/libexslt.so.0.8.13 > b7a86000-b7a9a000 r-xp 00000000 03:01 474899 /lib/libnsl-2.7.so > b7a9a000-b7a9c000 rw-p 00013000 03:01 474899 /lib/libnsl-2.7.so > b7a9c000-b7a9e000 rw-p b7a9c000 00:00 0 > b7a9e000-b7ab2000 r-xp 00000000 03:01 > 16316 /usr/lib/libz.so.1.2.3.3 > b7ab2000-b7ab3000 rw-p 00013000 03:01 > 16316 /usr/lib/libz.so.1.2.3.3 > b7ab3000-b7bcb000 r-xp 00000000 03:01 > 22673 /usr/lib/libxml2.so.2.6.30 > b7bcb000-b7bd0000 rw-p 00118000 03:01 > 22673 /usr/lib/libxml2.so.2.6.30 > b7bd0000-b7bd1000 rw-p b7bd0000 00:00 0 > b7be4000-b7c02000 r-xp 00000000 03:03 > 2555924 /home/marc/libxml/libxml/trunk/ext/libxml/libxml_so.so > b7c02000-b7c03000 rw-p 0001e000 03:03 > 2555924 /home/marc/libxml/libxml/trunk/ext/libxml/libxml_so.so > b7c03000-b7c8d000 rw-p b7c03000 00:00 0 > b7c8d000-b7dd4000 r-xp 00000000 03:01 471461 /lib/libc-2.7.so > b7dd4000-b7dd5000 r--p 00147000 03:01 471461 /lib/libc-2.7.so > b7dd5000-b7dd7000 rw-p 00148000 03:01 471461 /lib/libc-2.7.so > b7dd7000-b7dda000 rw-p b7dd7000 00:00 0 > b7dda000-b7dfe000 r-xp 00000000 03:01 474897 /lib/libm-2.7.so > b7dfe000-b7e00000 rw-p 00023000 03:01 474897 /lib/libm-2.7.so > b7e00000-b7e09000 r-xp 00000000 03:01 474895 /lib/libcrypt-2.7.so > b7e09000-b7e0b000 rw-p 00008000 03:01 474895 /lib/libcrypt-2.7.so > b7e0b000-b7e32000 rw-p b7e0b000 00:00 0 > b7e32000-b7e34000 r-xp 00000000 03:01 474896 /lib/libdl-2.7.so > b7e34000-b7e36000 rw-p 00001000 03:01 474896 /lib/libdl-2.7.so > b7e36000-b7e37000 rw-p b7e36000 00:00 0 > b7e37000-b7e4a000 r-xp 00000000 03:01 474907 /lib/libpthread-2.7.so > b7e4a000-b7e4c000 rw-p 00013000 03:01 474907 /lib/libpthread-2.7.so > b7e4c000-b7e4e000 rw-p b7e4c000 00:00 0 > b7e4e000-b7f0b000 r-xp 00000000 03:01 > 17026 /usr/lib/libruby1.8.so.1.8.6 > b7f0b000-b7f0d000 rw-p 000bd000 03:01 > 17026 /usr/lib/libruby1.8.so.1.8.6 > b7f0d000-b7f1d000 rw-p b7f0d000 00:00 0 > b7f23000-b7f26000 r-xp 00000000 03:01 > 18898 /usr/lib/libgpg-error.so.0.3.0 > b7f26000-b7f27000 rw-p 00002000 03:01 > 18898 /usr/lib/libgpg-error.so.0.3.0 > b7f27000-b7f2a000 r-xp 00000000 03:03 > 6651912 /home/marc/libxml/libxsl/trunk/ext/libxslt/libxslt.so > b7f2a000-b7f2b000 rw-p 00002000 03:03 > 6651912 /home/marc/libxml/libxsl/trunk/ext/libxslt/libxslt.so > b7f2b000-b7f2f000 r-xp 00000000 03:01 > 150369 /usr/lib/ruby/1.8/i486-linux/stringio.so > b7f2f000-b7f30000 rw-p 00003000 03:01 > 150369 /usr/lib/ruby/1.8/i486-linux/stringio.so > b7f30000-b7f32000 rw-p b7f30000 00:00 0 > b7f32000-b7f4e000 r-xp 00000000 03:01 471431 /lib/ld-2.7.so > b7f4e000-b7f50000 rw-p 0001b000 03:01 471431 /lib/ld-2.7.so > bf909000-bf94e000 rw-p bf909000 00:00 0 [stack] > ffffe000-fffff000 ---p 00000000 00:00 0 [vdso] > Aborted > > From marc at bloodnok.com Fri Jan 11 13:57:33 2008 From: marc at bloodnok.com (Marc Munro) Date: Fri, 11 Jan 2008 10:57:33 -0800 Subject: [libxml-devel] libxml crash In-Reply-To: References: <1200006412.11500.4.camel@bloodnok.com> Message-ID: <1200077853.6583.11.camel@bloodnok.com> My last experience with ruby and valgrind was kinda unpleasant. Maybe with ruby 1.9 it will be better but I don't really have the stomach for changing my entire test environment right now. Worst still, as soon as I had packed up a tar file of the code that lead to the crash, it stopped crashing. :-( Maybe I'll get something more reproducible later. I'll post more stacktraces, etc as I get them unless the list maintainers would rather I didn't. __ Marc On Fri, 2008-11-01 at 13:47 -0500, Todd Fisher wrote: > On 1/10/08, Marc Munro wrote: > > This is with libxml and libxsl built from SVN 3 days ago > > > You might try running with valgrind. > > > > If I run with gdb, my program runs normally. > > > > Any suggestions on how I can further track this down? > > > > __ > > Marc > > > > > > *** glibc detected *** ruby: corrupted double-linked list: 0x0914ed28 > > *** -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080111/4865979b/attachment-0001.bin From danj.3skel at gmail.com Fri Jan 11 14:07:35 2008 From: danj.3skel at gmail.com (Dan Janowski) Date: Fri, 11 Jan 2008 14:07:35 -0500 Subject: [libxml-devel] libxml crash In-Reply-To: <1200077853.6583.11.camel@bloodnok.com> References: <1200006412.11500.4.camel@bloodnok.com> <1200077853.6583.11.camel@bloodnok.com> Message-ID: <302D84D3-7522-46CD-B8D7-B48A74CAA006@gmail.com> Marc, I have yet to have valgrind produce anything meaningful in debugging this environment. I have tried the suppressions, but alas, nothing. If someone can offer an effective way of using it, I am quite interested. As for this bug, the context code is pretty simple. This is different than double-free, so it may be that the memory is being stomped on by something else. I have no insight. Please post what you can to get to the bottom of it. Dan On Jan 11, 2008, at 13:57, Marc Munro wrote: > My last experience with ruby and valgrind was kinda unpleasant. Maybe > with ruby 1.9 it will be better but I don't really have the stomach > for > changing my entire test environment right now. > > Worst still, as soon as I had packed up a tar file of the code that > lead > to the crash, it stopped crashing. :-( > > Maybe I'll get something more reproducible later. I'll post more > stacktraces, etc as I get them unless the list maintainers would > rather > I didn't. > > __ > Marc > > On Fri, 2008-11-01 at 13:47 -0500, Todd Fisher wrote: >> On 1/10/08, Marc Munro wrote: >>> This is with libxml and libxsl built from SVN 3 days ago >> >> >> You might try running with valgrind. >>> >>> If I run with gdb, my program runs normally. >>> >>> Any suggestions on how I can further track this down? >>> >>> __ >>> Marc >>> >>> >>> *** glibc detected *** ruby: corrupted double-linked list: >>> 0x0914ed28 >>> *** > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From sean at chittenden.org Fri Jan 11 14:57:52 2008 From: sean at chittenden.org (Sean Chittenden) Date: Fri, 11 Jan 2008 11:57:52 -0800 Subject: [libxml-devel] libxml crash In-Reply-To: <302D84D3-7522-46CD-B8D7-B48A74CAA006@gmail.com> References: <1200006412.11500.4.camel@bloodnok.com> <1200077853.6583.11.camel@bloodnok.com> <302D84D3-7522-46CD-B8D7-B48A74CAA006@gmail.com> Message-ID: > I have yet to have valgrind produce anything meaningful in debugging > this environment. I have tried the suppressions, but alas, nothing. If > someone can offer an effective way of using it, I am quite interested. The best debugging mechanism that I've found to date is to do something along these lines (works in GC'ed environments or not, and with setjmp(3) and longjmp(3)). It doesn't solve the memory stomping bits, but it does solve the what's leaking. If you change my_malloc() to a more general macro (eg: MALLOC()) and recode to the new macro, you can get more useful info using __FUNCTION__ and __LINE__ to figure out where. FILE *memory_debug_io = fopen("memdump.txt", "w+"); void open_memory_debug(void) { if (memory_debug_io == NULL) memory_debug_io = fopen("memdump.txt", "w+"); } #undef malloc size_t my_malloc(const size_t s) { open_memory_debug(); ptr = malloc(s); fprintf(memory_debug_io, "Allocated %llu bytes at region %x\n", (uint64_t)size, ptr); return ptr; } #define malloc(size) my_malloc(size) #undef free void my_free(const void *ptr) { open_memory_debug(); fprintf(memory_debug_io, "Free'ed memory region %x\n", ptr); free(ptr); } #define free(size) my_free(size) /* Example general MALLOC() macro. */ #define MALLOC(ret, size) do { \ if (memory_debug_io == NULL) \ memory_debug_io = fopen("memdump.txt", "w+"); \ ret = malloc(s); \ fprintf(memory_debug_io, "%s:%u: Allocated %llu bytes at region %x \n", __FUNCTION__, __LINE__, (uint64_t)size, ret); \ } while (0) I use derivations of MALLOC() all the time and find it to be much more useful than most of the other utilities because it can incorporate information only easily found at compile time. Putting together a script that refcounts addresses found in memdump.txt is pretty easy and solves a ton of the tedium of having to look for un-free(3)'ed bullshat. While I can't fully endorse the practice yet as I'm still testing it out as a means of development right now, but... The concept being, allocate haphazardly (fight the urge to be hyper meticulous), and reconcile free(3)'ing memory later during regression testing. So far it's saved me a ton of time and I'm at roughly 20K LOC of C. Food for thought regarding the valgrind discussion. -sc -- Sean Chittenden sean at chittenden.org http://sean.chittenden.org/ From nickblack1 at gmail.com Sat Jan 12 12:22:10 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sat, 12 Jan 2008 17:22:10 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 Message-ID: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> Hello, I'm trying to build libxml-ruby on Fedora Core 6, but get the following errors: bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -l/lib/libm.so.6... no checking for atan() in -l/lib/libm.so.6... no extconf failure: need libm *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. I've tried with all the different libm directories I can find using # locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this error. I guess this is a problem with some compiler flags, but don't really know where to start. Thanks in advance for the help. -- Nick Black -------------------------------- http://www.blacksworld.net From todd.fisher at gmail.com Sat Jan 12 12:26:59 2008 From: todd.fisher at gmail.com (Todd Fisher) Date: Sat, 12 Jan 2008 12:26:59 -0500 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> Message-ID: I believe the options to extconf.rb. Expect a directory not an exact file... Hope this helps On 1/12/08, Nick Black wrote: > Hello, > > I'm trying to build libxml-ruby on Fedora Core 6, but get the following > errors: > > bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ > --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 > checking for socket() in -lsocket... no > checking for gethostbyname() in -lnsl... no > checking for atan() in -l/lib/libm.so.6... no > checking for atan() in -l/lib/libm.so.6... no > extconf failure: need libm > *** extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. Check the mkmf.log file for more > details. You may need configuration options. > > > I've tried with all the different libm directories I can find using # > locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this > error. I guess this is a problem with some compiler flags, but don't > really know where to start. > > Thanks in advance for the help. > > > -- > Nick Black > -------------------------------- > http://www.blacksworld.net > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > From tom at compton.nu Sat Jan 12 19:34:28 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 00:34:28 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> Message-ID: In message <223020e60801120922l796d0cd5h3e1f6648cc0ac689 at mail.gmail.com> "Nick Black" wrote: > I'm trying to build libxml-ruby on Fedora Core 6, but get the following errors: > > bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ > --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 > checking for socket() in -lsocket... no > checking for gethostbyname() in -lnsl... no > checking for atan() in -l/lib/libm.so.6... no > checking for atan() in -l/lib/libm.so.6... no > extconf failure: need libm > *** extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. Check the mkmf.log file for more > details. You may need configuration options. > > > I've tried with all the different libm directories I can find using # > locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this > error. I guess this is a problem with some compiler flags, but don't > really know where to start. Make sure you've got the glibc-devel package installed - that should be all you need to build against libm on Fedora. Tom -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 07:21:17 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 12:21:17 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> Message-ID: <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> Thanks for the replies. Tom: I have glibc-devel version 2.5 installed already. Todd: I have also tried passing a directory to extconf ( --with-mlib=/lib/) but still no luck. On Jan 13, 2008 12:34 AM, Tom Hughes wrote: > In message <223020e60801120922l796d0cd5h3e1f6648cc0ac689 at mail.gmail.com> > "Nick Black" wrote: > > > I'm trying to build libxml-ruby on Fedora Core 6, but get the following errors: > > > > bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ > > --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 > > checking for socket() in -lsocket... no > > checking for gethostbyname() in -lnsl... no > > checking for atan() in -l/lib/libm.so.6... no > > checking for atan() in -l/lib/libm.so.6... no > > extconf failure: need libm > > *** extconf.rb failed *** > > Could not create Makefile due to some reason, probably lack of > > necessary libraries and/or headers. Check the mkmf.log file for more > > details. You may need configuration options. > > > > > > I've tried with all the different libm directories I can find using # > > locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this > > error. I guess this is a problem with some compiler flags, but don't > > really know where to start. > > Make sure you've got the glibc-devel package installed - that should > be all you need to build against libm on Fedora. > > Tom > > -- > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From tom at compton.nu Sun Jan 13 07:56:46 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 12:56:46 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> Message-ID: In message <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f at mail.gmail.com> "Nick Black" wrote: > Thanks for the replies. > > Tom: I have glibc-devel version 2.5 installed already. > > Todd: I have also tried passing a directory to extconf ( > --with-mlib=/lib/) but still no luck. Looking at the output, that is wrong - it is passing what give there to the compiler as an argument to -l and it is wrong to give a full path there. You just want --with-mlib=m I think but that should be the default anyway I would imagine. What happens if you don't give a --with-mlib switch? Tom > On Jan 13, 2008 12:34 AM, Tom Hughes wrote: > > In message <223020e60801120922l796d0cd5h3e1f6648cc0ac689 at mail.gmail.com> > > "Nick Black" wrote: > > > > > I'm trying to build libxml-ruby on Fedora Core 6, but get the following errors: > > > > > > bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ > > > --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 > > > checking for socket() in -lsocket... no > > > checking for gethostbyname() in -lnsl... no > > > checking for atan() in -l/lib/libm.so.6... no > > > checking for atan() in -l/lib/libm.so.6... no > > > extconf failure: need libm > > > *** extconf.rb failed *** > > > Could not create Makefile due to some reason, probably lack of > > > necessary libraries and/or headers. Check the mkmf.log file for more > > > details. You may need configuration options. > > > > > > > > > I've tried with all the different libm directories I can find using # > > > locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this > > > error. I guess this is a problem with some compiler flags, but don't > > > really know where to start. > > > > Make sure you've got the glibc-devel package installed - that should > > be all you need to build against libm on Fedora. -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 08:35:02 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 13:35:02 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> Message-ID: <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> With no libm switch: # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... no checking for atan() in -lm... no extconf failure: need libm *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. With libm=m : # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h --with-mlib=m checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... no checking for atan() in -lm... no extconf failure: need libm *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. On Jan 13, 2008 12:56 PM, Tom Hughes wrote: > In message <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f at mail.gmail.com> > "Nick Black" wrote: > > > Thanks for the replies. > > > > Tom: I have glibc-devel version 2.5 installed already. > > > > Todd: I have also tried passing a directory to extconf ( > > --with-mlib=/lib/) but still no luck. > > Looking at the output, that is wrong - it is passing what give there > to the compiler as an argument to -l and it is wrong to give a full > path there. You just want --with-mlib=m I think but that should be > the default anyway I would imagine. > > What happens if you don't give a --with-mlib switch? > > Tom > > > On Jan 13, 2008 12:34 AM, Tom Hughes wrote: > > > In message <223020e60801120922l796d0cd5h3e1f6648cc0ac689 at mail.gmail.com> > > > "Nick Black" wrote: > > > > > > > I'm trying to build libxml-ruby on Fedora Core 6, but get the following errors: > > > > > > > > bash-3.1# ruby extconf.rb --with-zlib-dir=/usr/lib64/ > > > > --with-zlib-include=/usr/include/bzlib.h --with-mlib=/lib/libm.so.6 > > > > checking for socket() in -lsocket... no > > > > checking for gethostbyname() in -lnsl... no > > > > checking for atan() in -l/lib/libm.so.6... no > > > > checking for atan() in -l/lib/libm.so.6... no > > > > extconf failure: need libm > > > > *** extconf.rb failed *** > > > > Could not create Makefile due to some reason, probably lack of > > > > necessary libraries and/or headers. Check the mkmf.log file for more > > > > details. You may need configuration options. > > > > > > > > > > > > I've tried with all the different libm directories I can find using # > > > > locate libm (/lib /lib64 /usr/lib /usr/lib64)- but I keep getting this > > > > error. I guess this is a problem with some compiler flags, but don't > > > > really know where to start. > > > > > > Make sure you've got the glibc-devel package installed - that should > > > be all you need to build against libm on Fedora. > > > -- > > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From tom at compton.nu Sun Jan 13 09:03:05 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 14:03:05 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> Message-ID: In message <223020e60801130535y7911f11cm79b8c580cf449532 at mail.gmail.com> "Nick Black" wrote: > With no libm switch: > > # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h > checking for socket() in -lsocket... no > checking for gethostbyname() in -lnsl... no > checking for atan() in -lm... no > checking for atan() in -lm... no > extconf failure: need libm > *** extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. Check the mkmf.log file for more > details. You may need configuration options. I think you need to post your mkmf.log file. I just tried it on an FC6 box and it works for me. Tom -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 10:23:46 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 15:23:46 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> Message-ID: <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> I've posted mkmf.log here: http://www.blacksworld.net/fedora/mkmf.log -L"/usr/lib64" is part of the gcc command and the directory has a sym link to libm: # ls -l /usr/lib64/libm* -rw-r--r-- 1 root root 1320734 Jul 4 2007 /usr/lib64/libm.a lrwxrwxrwx 1 root root 21 Jan 12 13:24 /usr/lib64/libm.so -> ../../lib64/libm.so.6 The "have_library: checking for atan() in -l/lib64... -------------------- no" message also seems strange. Cheers, On Jan 13, 2008 2:03 PM, Tom Hughes wrote: > In message <223020e60801130535y7911f11cm79b8c580cf449532 at mail.gmail.com> > "Nick Black" wrote: > > > With no libm switch: > > > > # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h > > checking for socket() in -lsocket... no > > checking for gethostbyname() in -lnsl... no > > checking for atan() in -lm... no > > checking for atan() in -lm... no > > extconf failure: need libm > > *** extconf.rb failed *** > > Could not create Makefile due to some reason, probably lack of > > necessary libraries and/or headers. Check the mkmf.log file for more > > details. You may need configuration options. > > I think you need to post your mkmf.log file. I just tried it on > an FC6 box and it works for me. > > Tom > > -- > > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From tom at compton.nu Sun Jan 13 10:31:52 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 15:31:52 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> Message-ID: In message <223020e60801130723o2c044a8fj8cddf4d60b412f7d at mail.gmail.com> "Nick Black" wrote: > I've posted mkmf.log here: > > http://www.blacksworld.net/fedora/mkmf.log > > -L"/usr/lib64" is part of the gcc command and the directory has a sym > link to libm: > > # ls -l /usr/lib64/libm* > -rw-r--r-- 1 root root 1320734 Jul 4 2007 /usr/lib64/libm.a > lrwxrwxrwx 1 root root 21 Jan 12 13:24 /usr/lib64/libm.so -> > ../../lib64/libm.so.6 > > The "have_library: checking for atan() in -l/lib64... > -------------------- no" message also seems strange. That log is from a --with-mlib=/lib64 run, which is bogus, as evidenced by the "ld: cannot find -l/lib64" error. Try it withou the --with-mlib switch and post the mkmf.log for that. Tom -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 10:47:51 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 15:47:51 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> Message-ID: <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> Ok - mkmf.log for: # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h is here: http://www.blacksworld.net/fedora/mkmf.log This does give "cc1: error: /usr/include/bzlib.h: not a directory" errors, so I also ran: # ruby extconf.rb and posted mkmf.log here: http://www.blacksworld.net/fedora/mkmf.log.no_options On Jan 13, 2008 3:31 PM, Tom Hughes wrote: > In message <223020e60801130723o2c044a8fj8cddf4d60b412f7d at mail.gmail.com> > "Nick Black" wrote: > > > I've posted mkmf.log here: > > > > http://www.blacksworld.net/fedora/mkmf.log: > > > > -L"/usr/lib64" is part of the gcc command and the directory has a sym > > link to libm: > > > > # ls -l /usr/lib64/libm* > > -rw-r--r-- 1 root root 1320734 Jul 4 2007 /usr/lib64/libm.a > > lrwxrwxrwx 1 root root 21 Jan 12 13:24 /usr/lib64/libm.so -> > > ../../lib64/libm.so.6 > > > > The "have_library: checking for atan() in -l/lib64... > > -------------------- no" message also seems strange. > > That log is from a --with-mlib=/lib64 run, which is bogus, as > evidenced by the "ld: cannot find -l/lib64" error. Try it withou > the --with-mlib switch and post the mkmf.log for that. > > > Tom > > -- > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From tom at compton.nu Sun Jan 13 11:05:07 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 16:05:07 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> Message-ID: In message <223020e60801130747y7e3e8470s8160508b5c22521b at mail.gmail.com> "Nick Black" wrote: > Ok - mkmf.log for: > > # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h > > is here: http://www.blacksworld.net/fedora/mkmf.log > > This does give "cc1: error: /usr/include/bzlib.h: not a directory" > errors, so I also ran: > > # ruby extconf.rb > > and posted mkmf.log here: http://www.blacksworld.net/fedora/mkmf.log.no_options Aha! The problem is your --with-zlib-include=/usr/include/bzlib.h switch which is breaking all the calls to CC including the ones which don't actually want zlib. That should be --with-zlib-include=/usr/include but probably isn't really needed at all as that is the default place for it to look. All --xxx-include and --xxx-lib switches should name the directory containing the file(s), not the file itself. Tom -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 11:22:03 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 16:22:03 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> Message-ID: <223020e60801130822n5a9a7490xc1bb00d7551cec33@mail.gmail.com> Ok - thanks for the tip. extconf still isn't successfully running though - its failing to find libz, so far as I can see gcc is looking for it in /usr/lib64 and for the headers in /usr/include, which have the headers and the library. mkmf.log from # ruby extconf.rb is here http://www.blacksworld.net/fedora/mkmf.log On Jan 13, 2008 4:05 PM, Tom Hughes wrote: > In message <223020e60801130747y7e3e8470s8160508b5c22521b at mail.gmail.com> > "Nick Black" wrote: > > > Ok - mkmf.log for: > > > > # ruby extconf.rb --with-zlib-include=/usr/include/bzlib.h > > > > is here: http://www.blacksworld.net/fedora/mkmf.log > > > > This does give "cc1: error: /usr/include/bzlib.h: not a directory" > > errors, so I also ran: > > > > # ruby extconf.rb > > > > and posted mkmf.log here: http://www.blacksworld.net/fedora/mkmf.log.no_options > > Aha! The problem is your --with-zlib-include=/usr/include/bzlib.h switch > which is breaking all the calls to CC including the ones which don't > actually want zlib. > > That should be --with-zlib-include=/usr/include but probably isn't > really needed at all as that is the default place for it to look. > > All --xxx-include and --xxx-lib switches should name the directory > containing the file(s), not the file itself. > > > Tom > > -- > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From tom at compton.nu Sun Jan 13 13:03:50 2008 From: tom at compton.nu (Tom Hughes) Date: Sun, 13 Jan 2008 18:03:50 GMT Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <223020e60801130822n5a9a7490xc1bb00d7551cec33@mail.gmail.com> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130421g57c82f8cgafaf7eeaa5d6ac6f@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> <223020e60801130822n5a9a7490xc1bb00d7551cec33@mail.gmail.com> Message-ID: <89a6a1604f.tom@loxley.compton.nu> In message <223020e60801130822n5a9a7490xc1bb00d7551cec33 at mail.gmail.com> "Nick Black" wrote: > Ok - thanks for the tip. > > extconf still isn't successfully running though - its failing to find > libz, so far as I can see gcc is looking for it in /usr/lib64 and for > the headers in /usr/include, which have the headers and the library. > > mkmf.log from # ruby extconf.rb is here > http://www.blacksworld.net/fedora/mkmf.log Do you have /usr/lib64/libz.so? It looks like you don't, but that would imply you don't have the zlib-devel package installed but if that is the case I don't understand why you have the header files? Tom -- Tom Hughes (tom at compton.nu) http://www.compton.nu/ From nickblack1 at gmail.com Sun Jan 13 14:00:35 2008 From: nickblack1 at gmail.com (Nick Black) Date: Sun, 13 Jan 2008 19:00:35 +0000 Subject: [libxml-devel] extconf failure: need libm - installing libxml on Fedora Core 6 In-Reply-To: <89a6a1604f.tom@loxley.compton.nu> References: <223020e60801120922l796d0cd5h3e1f6648cc0ac689@mail.gmail.com> <223020e60801130535y7911f11cm79b8c580cf449532@mail.gmail.com> <223020e60801130723o2c044a8fj8cddf4d60b412f7d@mail.gmail.com> <223020e60801130747y7e3e8470s8160508b5c22521b@mail.gmail.com> <223020e60801130822n5a9a7490xc1bb00d7551cec33@mail.gmail.com> <89a6a1604f.tom@loxley.compton.nu> Message-ID: <223020e60801131100v730678b1q34d7a489417a98e6@mail.gmail.com> bingo - I created a sym link doing this: # ls -l /usr/lib64/libz.* -rwxr-xr-x 1 root root 108692 Jul 19 2006 /usr/lib64/libz.a lrwxrwxrwx 1 root root 13 Jan 13 18:46 /usr/lib64/libz.so -> libz.so.1.2.3 ... ... and the install worked. Previously I had libz.so.1 and libz.so.1.2.3, which seems to have been the cause of the problem. Thanks for the help Tom. On Jan 13, 2008 6:03 PM, Tom Hughes wrote: > In message <223020e60801130822n5a9a7490xc1bb00d7551cec33 at mail.gmail.com> > "Nick Black" wrote: > > > Ok - thanks for the tip. > > > > extconf still isn't successfully running though - its failing to find > > libz, so far as I can see gcc is looking for it in /usr/lib64 and for > > the headers in /usr/include, which have the headers and the library. > > > > mkmf.log from # ruby extconf.rb is here > > http://www.blacksworld.net/fedora/mkmf.log > > Do you have /usr/lib64/libz.so? It looks like you don't, but that > would imply you don't have the zlib-devel package installed but if > that is the case I don't understand why you have the header files? > > > Tom > > -- > Tom Hughes (tom at compton.nu) > http://www.compton.nu/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- Nick Black -------------------------------- http://www.blacksworld.net From Glenn.McCord at gmail.com Sun Jan 13 19:24:59 2008 From: Glenn.McCord at gmail.com (GlennNZ) Date: Sun, 13 Jan 2008 16:24:59 -0800 (PST) Subject: [libxml-devel] Default attributes and DTDs Message-ID: >From looking at the api I'm guessing that the xmllib ruby bindings can't as of yet insert default attributes as defined in the dtd. i.e. the xmllint command: xmllint test.xml --dtdattr outputs the test.xml file with all the missing default attributes. Currently our solution is to re parse the output of that command although it would be preferable if the ruby bindings was able to offer a better solution. Is this feature in the woodwork? Although, if there is some other ruby way of handling this, then it would be good to hear it. Cheers From danj.3skel at gmail.com Mon Jan 14 14:54:17 2008 From: danj.3skel at gmail.com (Dan Janowski) Date: Mon, 14 Jan 2008 14:54:17 -0500 Subject: [libxml-devel] Default attributes and DTDs In-Reply-To: References: Message-ID: <72E14EBB-7602-4F0F-8297-097EE7BFDFA0@gmail.com> I'm not sure if this is a missing feature or a bug, but please register a feature request and include attachments, scripts and commands that you expect to work with an explicit illustration of what is missing and what it should look like. I am unfamiliar with the DTD handling, so the illustrative details will increase the chances of implementation. Dan Tracker is here: http://rubyforge.org/tracker/?atid=1974&group_id=494&func=browse On Jan 13, 2008, at 19:24, GlennNZ wrote: >> From looking at the api I'm guessing that the xmllib ruby bindings > can't as of yet insert default attributes as defined in the dtd. > i.e. the xmllint command: > xmllint test.xml --dtdattr > > outputs the test.xml file with all the missing default attributes. > > Currently our solution is to re parse the output of that command > although it would be preferable if the ruby bindings was able to offer > a better solution. Is this feature in the woodwork? > > Although, if there is some other ruby way of handling this, then it > would be good to hear it. > > Cheers > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From marc at bloodnok.com Mon Jan 14 18:56:49 2008 From: marc at bloodnok.com (Marc Munro) Date: Mon, 14 Jan 2008 15:56:49 -0800 Subject: [libxml-devel] More wierdness Message-ID: <1200355010.17286.18.camel@bloodnok.com> It's beginning to look as though something in one of my xml documents has been removed part-way through my use of it. I am trying to discover exactly what is happening but I have a question about how ruby and C objects interact within libxml. My understanding is that a mapping is maintained between the C objects and the ruby objects, and any pointer problems should be due to this map being in some way incorrect, or incomplete. Given that I am using both the xml and xsl libraries, and am using significant numbers of xpath expressions, is it possible that an xml object (object1) from the xsl library becomes known to the ruby xml library mappings through an xpath expression? In this case, wouldn't the mapping within libxml show that the object has no references and can therefore be freed, even though there are references from the xsl side of things? To put it another way, is there any integration of the mapping mechanism between libxml and libxsl, and if not should there be? __ Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080114/b907db69/attachment.bin From sam.mulube at gmail.com Mon Jan 14 19:03:05 2008 From: sam.mulube at gmail.com (Sam M.) Date: Mon, 14 Jan 2008 16:03:05 -0800 (PST) Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: <1edf40a2-2ac7-4019-8267-45bbd744b044@e25g2000prg.googlegroups.com> References: <68EF391F-3D09-4B98-A4FC-D443D0AB77E1@3skel.com> <059D1CA6-7495-44DA-9356-AF02FDB0EEC5@3skel.com> <4b6f054f0711280607x630ec2bdi62eea0caa7c85bbb@mail.gmail.com> <1edf40a2-2ac7-4019-8267-45bbd744b044@e25g2000prg.googlegroups.com> Message-ID: I'm also having difficulties with this issue, and while I feel that libxml could be perfect for what I need, the fact that the documentation seems both very minimal, and a bit out of date is making me wonder whether I'll be able to use it for the app I'm working on. To reprise my situation: * searching for elements using XPath in a document with no namespace declaration works fine * searching for elements using XPath in a document that has defined a prefixed namespace declaration also works fine, provided the XPath query specifies the prefix as well as the desired element names * however I can't get _any_ search results when looking for elements in a document that has specified a namespace, but with the default/ empty prefix. Am I doing something stupid; or is this something that has been addressed in the latest head in subversion? If so is there any info on how to build the library from subversion? I did a quick checkout to have a look, and it looks like some additional hoops need to be jumped through before being able to build and install the latest head. Thanks for any information. -- sam On Dec 19 2007, 10:50 am, Yehuda Katz wrote: > I'm having this issue as well. I wrote a CSS=>XPath converter in Ruby > and want to use libxml-ruby to do the searching. Unfortunately, once a > DOCTYPE is in place, #find finds nothing (even on a search of "//*"). > > Any progress? > > -- Yehuda Katz > > On Nov 28, 6:07 am, Trans wrote:> On Nov 28, 2007 8:44 AM, mortee wrote: > > > > May I ask again? You wrote this almost two weeks ago, I guess. > > > C.S. Time. A day means a week; a week means a month; a month means at > > least 3 months; a year...well, no one thinks that far ahead; and most > > importantly "two weeks" is secret code for "when it gets done" which > > is usually never ;) > > > T. > > _______________________________________________ > > libxml-devel mailing list > > libxml-de... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel > > _______________________________________________ > libxml-devel mailing list > libxml-de... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/libxml-devel From smparkes at smparkes.net Mon Jan 14 19:28:03 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Mon, 14 Jan 2008 16:28:03 -0800 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: Message-ID: <20080115002314.57927CA0C@genericinfra.net> * however I can't get _any_ search results when looking for elements in a document that has specified a namespace, but with the default/ empty prefix. You have to make whatever default namespaces you use explicit, e.g., try something like this example for xhtml: items = doc.find '//x:span', "x:http://www.w3.org/1999/xhtml" The original poster said that //* wasn't returning anything, which I can't duplicate: it returns everything for me, which I believe is the correct behavior. From sam.mulube at gmail.com Tue Jan 15 08:12:01 2008 From: sam.mulube at gmail.com (sam mulube) Date: Tue, 15 Jan 2008 13:12:01 +0000 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: <20080115002314.57927CA0C@genericinfra.net> References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: Hey Steven, wow thanks, that works exactly as advertised! Incidentally, was this just something you figured out through experiment or is it documented somewhere and I missed it? thanks again -- sam On 15/01/2008, Steven Parkes wrote: > > * however I can't get _any_ search results when looking for > elements > in a document that has specified a namespace, but with the > default/ > empty prefix. > > You have to make whatever default namespaces you use explicit, e.g., try > something like this example for xhtml: > > items = doc.find '//x:span', "x:http://www.w3.org/1999/xhtml" > > The original poster said that //* wasn't returning anything, which I can't > duplicate: it returns everything for me, which I believe is the correct > behavior. > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20080115/12710ac0/attachment.html From smparkes at smparkes.net Tue Jan 15 10:46:08 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Tue, 15 Jan 2008 07:46:08 -0800 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: I ended up looking at the code. I think, after I figured it out, I was able to interpret the documentation correctly, but I didn't find it obvious at first. And googling returns some bad examples, which didn't help. From: sam mulube [mailto:sam.mulube at gmail.com] Sent: Tuesday, January 15, 2008 5:12 AM To: smparkes at smparkes.net; libxml-devel at rubyforge.org Subject: Re: [libxml-devel] xpath searching without specifying namespace? Hey Steven, wow thanks, that works exactly as advertised! Incidentally, was this just something you figured out through experiment or is it documented somewhere and I missed it? thanks again -- sam On 15/01/2008, Steven Parkes wrote: * however I can't get _any_ search results when looking for elements in a document that has specified a namespace, but with the default/ empty prefix. You have to make whatever default namespaces you use explicit, e.g., try something like this example for xhtml: items = doc.find '//x:span', "x:http://www.w3.org/1999/xhtml" The original poster said that //* wasn't returning anything, which I can't duplicate: it returns everything for me, which I believe is the correct behavior. _______________________________________________ libxml-devel mailing list libxml-devel at rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel From danj at 3skel.com Tue Jan 15 10:47:03 2008 From: danj at 3skel.com (Dan Janowski) Date: Tue, 15 Jan 2008 10:47:03 -0500 Subject: [libxml-devel] More wierdness In-Reply-To: <1200355010.17286.18.camel@bloodnok.com> References: <1200355010.17286.18.camel@bloodnok.com> Message-ID: <91E15151-3B9C-4A76-A158-FAA9A1D88424@3skel.com> The basics are there. The XSLT extension tracks the ruby document peer that it is working against. The XSLT mark() marks the document peer, which should retain the reference. XPath returns node sets and those nodes reference their parent doucment, so when the GC runs, the Document is marked and should be preserved. The only instance where the document relationship is broken is when a clone() occurs. This is the intended operation. If you have a node with no document reference, then it is a copied subtree. What ruby object/reference do you have that is missing the document? Dan On Jan 14, 2008, at 18:56, Marc Munro wrote: > It's beginning to look as though something in one of my xml documents > has been removed part-way through my use of it. > > I am trying to discover exactly what is happening but I have a > question > about how ruby and C objects interact within libxml. > > My understanding is that a mapping is maintained between the C objects > and the ruby objects, and any pointer problems should be due to this > map > being in some way incorrect, or incomplete. > > Given that I am using both the xml and xsl libraries, and am using > significant numbers of xpath expressions, is it possible that an xml > object (object1) from the xsl library becomes known to the ruby xml > library mappings through an xpath expression? In this case, wouldn't > the mapping within libxml show that the object has no references and > can > therefore be freed, even though there are references from the xsl side > of things? > > To put it another way, is there any integration of the mapping > mechanism > between libxml and libxsl, and if not should there be? > > __ > Marc > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From marc at bloodnok.com Tue Jan 15 11:14:14 2008 From: marc at bloodnok.com (Marc Munro) Date: Tue, 15 Jan 2008 08:14:14 -0800 Subject: [libxml-devel] More wierdness In-Reply-To: <91E15151-3B9C-4A76-A158-FAA9A1D88424@3skel.com> References: <1200355010.17286.18.camel@bloodnok.com> <91E15151-3B9C-4A76-A158-FAA9A1D88424@3skel.com> Message-ID: <1200413655.25702.8.camel@bloodnok.com> Doh! My mistake, never mind. I had extracted the missing node myself in an earlier operation. I'm still experiencing odd crashes, usually when my app causes an exception in a test unit but nothing I have yet been able to track down or reliably reproduce. Sorry for the interruption. More info when I get it. __ Marc On Tue, 2008-15-01 at 10:47 -0500, Dan Janowski wrote: > The basics are there. The XSLT extension tracks the ruby document peer > that it is working against. The XSLT mark() marks the document peer, > which should retain the reference. XPath returns node sets and those > nodes reference their parent doucment, so when the GC runs, the > Document is marked and should be preserved. The only instance where > the document relationship is broken is when a clone() occurs. This is > the intended operation. > > If you have a node with no document reference, then it is a copied > subtree. What ruby object/reference do you have that is missing the > document? > > Dan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080115/be1d41a8/attachment.bin From danj.3skel at gmail.com Tue Jan 15 13:37:13 2008 From: danj.3skel at gmail.com (Dan Janowski) Date: Tue, 15 Jan 2008 13:37:13 -0500 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: Please send me a documentation paragraph that I can add to .find which makes this more explicit and understandable. Hopefully this will eliminate future confusion over the usage. Thanks, Dan -- Dan Janowski danj.3skel at gmail.com On Jan 15, 2008, at 10:46, Steven Parkes wrote: > I ended up looking at the code. I think, after I figured it out, I > was able > to interpret the documentation correctly, but I didn't find it > obvious at > first. And googling returns some bad examples, which didn't help. > > > From: sam mulube [mailto:sam.mulube at gmail.com] > Sent: Tuesday, January 15, 2008 5:12 AM > To: smparkes at smparkes.net; libxml-devel at rubyforge.org > Subject: Re: [libxml-devel] xpath searching without specifying > namespace? > > > Hey Steven, > > wow thanks, that works exactly as advertised! > > Incidentally, was this just something you figured out through > experiment or is it documented somewhere and I missed it? > > thanks again > > -- sam > > > On 15/01/2008, Steven Parkes wrote: > > * however I can't get _any_ search results when > looking for elements > in a document that has specified a namespace, but > with the default/ > empty prefix. > > You have to make whatever default namespaces you use > explicit, e.g., try > something like this example for xhtml: > > items = doc.find '//x:span', > "x:http://www.w3.org/1999/xhtml" > > The original poster said that //* wasn't returning anything, > which I can't > duplicate: it returns everything for me, which I believe is > the correct > behavior. > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > > > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From smparkes at smparkes.net Mon Jan 21 17:40:08 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Mon, 21 Jan 2008 14:40:08 -0800 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: Please send me a documentation paragraph that I can add to .find which makes this more explicit and understandable. Hopefully this will eliminate future confusion over the usage. There is a little bit of documentation, but it's in the XPath class, which takes a little tracking down. It doesn't help the the XPath rdocs are messed up: the doc for .find ends up in XML::XPath::InvalidPath for reasons I haven't been able to ferret out. Here's a patch that tries to explain things, as applied to the XPath file. (I haven't looked too hard into why this is getting put in the wrong place, though I guess I could.) This could be moved in whole to the Node class if desired or a pointer from the Node class to the XPath class. Index: ext/libxml/ruby_xml_xpath.c =================================================================== --- ext/libxml/ruby_xml_xpath.c (revision 242) +++ ext/libxml/ruby_xml_xpath.c (working copy) @@ -99,8 +99,8 @@ * call-seq: * XML::XPath.find(path, namespaces = [any]) => xpath * - * Find nodes matching the specified xpath (and optionally any of the - * supplied namespaces) and return as an XML::Node::Set. + * Find nodes matching the specified xpath and return as an + * XML::Node::Set. * * The optional namespaces argument may take one of * two forms: @@ -109,9 +109,33 @@ * * An array of: * * strings in the form like above * * arrays in the form of ['prefix','uri'] - * - * If not specified, matching nodes from any namespace - * will be included. + * + * For example, to match the

elements in the XHTML document + * + *

+ *

+ * + * you could write + * doc.find "//x:p", "x:http://www.w3.org/1999/xhtml" + * + * Two very commonly asked questions are: + * + * * How do I match nodes that use the default namespace prefix + + * The example shows how to do this. Even though the default namespace + * prefix is used in the document, the xpath expression must + * explicitly identify the namespace. The only nodes that a pattern + * without a namespace will match are nodes that do not have a + * namespace, neither explicit nor from a default prefix. + * + * * How do I match particular nodes within any namespace + * + * It is possible to match all nodes with the star pattern, e.g., + * //*, and it is possible to match all nodes within an + * individual namespace, e.g., //ns:*, but it is not possible + * to match individual nodes from any namespace: //*:p is + * invalid. + * */ VALUE ruby_xml_xpath_find(VALUE class, VALUE anode, VALUE xpath_expr, VALUE nslist) { From smparkes at smparkes.net Mon Jan 21 17:50:10 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Mon, 21 Jan 2008 14:50:10 -0800 Subject: [libxml-devel] trunk status? References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: Am I the only one, or is the trunk kinda broken? ext/xml got moved to ext/libxml last month with, it seems like, the results that everything broke, e.g., rake test. I have a patch so I could sanity check this but since it's been sitting broken for so long and there are some subtleties to binary extensions that I'm not an expert in ... Or maybe I missed something? From danj.3skel at gmail.com Mon Jan 21 19:35:51 2008 From: danj.3skel at gmail.com (Dan Janowski) Date: Mon, 21 Jan 2008 19:35:51 -0500 Subject: [libxml-devel] trunk status? In-Reply-To: References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: trans has changed the build system and the organization to deal with the libxslt issues and rake muck. The builder is task/setup, the more detailed tasks require you to install ratch. Dan On Jan 21, 2008, at 5:50 PM, Steven Parkes wrote: > Am I the only one, or is the trunk kinda broken? ext/xml got moved to > ext/libxml last month with, it seems like, the results that everything > broke, e.g., rake test. > > I have a patch so I could sanity check this but since it's been > sitting > broken for so long and there are some subtleties to binary > extensions that > I'm not an expert in ... > > Or maybe I missed something? > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From smparkes at smparkes.net Mon Jan 21 19:54:24 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Mon, 21 Jan 2008 16:54:24 -0800 Subject: [libxml-devel] trunk status? In-Reply-To: Message-ID: <20080122004908.2DB008558@genericinfra.net> trans has changed the build system and the organization to deal with the libxslt issues and rake muck. The builder is task/setup, the more detailed tasks require you to install ratch. Okay. So would task/test be the way to run tests? Can you currently successful do a task/test? Even with ratch (0.4.1) that errors out for me. From sam.mulube at gmail.com Tue Jan 22 10:05:30 2008 From: sam.mulube at gmail.com (sam mulube) Date: Tue, 22 Jan 2008 15:05:30 +0000 Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: References: <20080115002314.57927CA0C@genericinfra.net> Message-ID: Steven, your explanation text looks excellent - clear and some useful examples. I had only a couple of minor comments - the line "strings in the form like above" is perhaps a bit awkward. Maybe it would be better to just give an example, i.e.: strings in the form "prefix:href" Also, both of the questions you pose should have a question mark at the end, i.e.: * How do I match nodes that use the default namespace prefix? * How do I match particular nodes within any namespace? I hope these comments are useful, and apologies for not sending them in the form of a proper patch, but I'm labouring under the threat of a rapidly approaching deadline. -- sam On 21/01/2008, Steven Parkes wrote: > > > Please send me a documentation paragraph that I can add to .find > which > makes this more explicit and understandable. Hopefully this will > eliminate future confusion over the usage. > > There is a little bit of documentation, but it's in the XPath class, which > takes a little tracking down. It doesn't help the the XPath rdocs are > messed > up: the doc for .find ends up in XML::XPath::InvalidPath for reasons I > haven't been able to ferret out. > > Here's a patch that tries to explain things, as applied to the XPath file. > (I haven't looked too hard into why this is getting put in the wrong > place, > though I guess I could.) This could be moved in whole to the Node class if > desired or a pointer from the Node class to the XPath class. > > Index: ext/libxml/ruby_xml_xpath.c > =================================================================== > --- ext/libxml/ruby_xml_xpath.c (revision 242) > +++ ext/libxml/ruby_xml_xpath.c (working copy) > @@ -99,8 +99,8 @@ > * call-seq: > * XML::XPath.find(path, namespaces = [any]) => xpath > * > - * Find nodes matching the specified xpath (and optionally any of the > - * supplied namespaces) and return as an XML::Node::Set. > + * Find nodes matching the specified xpath and return as an > + * XML::Node::Set. > * > * The optional namespaces argument may take one of > * two forms: > @@ -109,9 +109,33 @@ > * * An array of: > * * strings in the form like above > * * arrays in the form of ['prefix','uri'] > - * > - * If not specified, matching nodes from any namespace > - * will be included. > + * > + * For example, to match the

elements in the XHTML document > + * > + *

> + *

> + * > + * you could write > + * doc.find "//x:p", "x:http://www.w3.org/1999/xhtml" > + * > + * Two very commonly asked questions are: > + * > + * * How do I match nodes that use the default namespace prefix > + > + * The example shows how to do this. Even though the default namespace > + * prefix is used in the document, the xpath expression must > + * explicitly identify the namespace. The only nodes that a pattern > + * without a namespace will match are nodes that do not have a > + * namespace, neither explicit nor from a default prefix. > + * > + * * How do I match particular nodes within any namespace > + * > + * It is possible to match all nodes with the star pattern, e.g., > + * //*, and it is possible to match all nodes within an > + * individual namespace, e.g., //ns:*, but it is not possible > + * to match individual nodes from any namespace: //*:p is > + * invalid. > + * > */ > VALUE > ruby_xml_xpath_find(VALUE class, VALUE anode, VALUE xpath_expr, VALUE > nslist) { > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20080122/cfd3998c/attachment.html From transfire at gmail.com Tue Jan 22 13:54:53 2008 From: transfire at gmail.com (Trans) Date: Tue, 22 Jan 2008 10:54:53 -0800 (PST) Subject: [libxml-devel] finally closing in on the new build Message-ID: <9ddcb8d9-fbb3-4d37-ac2e-d88e6963473a@k2g2000hse.googlegroups.com> Hi All, Let you all know, I'm finally progressing on the build process. I sat down last week determined to get this straightened out (it effects not only this project, but a number of others too). After a lot of deliberation I've nailed down the design and have transformed my entire code base to suite. So I will have the build processes working very soon --with the exception of win32 cross-compile for the moment, b/c I accidentally deleted that script. :-( The main insight I had is that there are really two sets of build tasks. One that end-installers need access to, eg. compiling, installing, rdoc generation and testing; and another set that is for project admins, eg. publishing the website, packaging and pushing new releases. To suite this, I simply converted the end-installer oriented tasks in Ratch to pure Ruby and adopted them for Libxml. You can now find them in the task/ directory in trunk. The admin tasks on the other hand (which also include end-install tasks) I reformulated into a simple "monolithic" project --thus killing the original notion of Ratch (a collection of ruby-based batch files). This new application is largely the resurrection of my earlier work (reap). I will have an early release of the new app out in a day or two. With it, it is simply a matter to filling out the needed metadata (yaml) files and calling the desired bin command. At the moment there is an admin/ directory in trunk that house the old admin- oriented tasks. Don't bother with these until I report having finished the transition. Btw.. I am getting a segfault on one file: $ task/test tests/tc_xml_node_copy.rb Loaded suite task/test Started ./tests/tc_xml_node_copy.rb:35: [BUG] Segmentation fault ruby 1.8.6 (2007-06-07) [i486-linux] Aborted (core dumped) T. From Glenn.McCord at gmail.com Wed Jan 23 16:31:06 2008 From: Glenn.McCord at gmail.com (GlennNZ) Date: Wed, 23 Jan 2008 13:31:06 -0800 (PST) Subject: [libxml-devel] Unusual runtime termination Message-ID: <860f9f23-fb01-4fab-8e28-360e7a562ee4@l1g2000hsa.googlegroups.com> I was putting off posting this but I've decided to cover all bases. I'm using the libxml ruby bindings under windows courtesy of the compilation available from http://www.movesonrails.com/articles/2007/10/09/libxml-ruby-and-windows However, when using the library, I'm getting an error, which appears to intermittent. "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Googling this error refers to a whole lot of Microsoft related errors which leads me to believe that the something has happened during compilation of library. On the off chance that this error has happened to someone else, please reply so that I don't feel inclined to try and compile xmllib using Visual Studio myself. The error appears to be intermittent in that if I have some code that parses an XML file, loads a schema, validates against the schema and then does some simple dom traversal, then I will get the error about 2 out of 5 times. If I load another XML file further into the program, then I will likely always get the error, and the chances are it stuffs something up. Cheers to anyone who is familar with this. From stuart at smgsystems.co.uk Mon Jan 28 09:51:40 2008 From: stuart at smgsystems.co.uk (Stuart Grimshaw) Date: Mon, 28 Jan 2008 14:51:40 +0000 Subject: [libxml-devel] Unable to install libxml gem on Debian. Message-ID: Hi, I'm trying to install the libxml-ruby gem on my debian server, without much luck. You can view the output here: http://www.trafficjammr.co.uk/mkmf.log but let me know if there's ny more info you need. -- -S Follow me on Twitter: http://twitter.com/stubbs Buy my photos: http://stuartgrimshaw.imagekind.com Blog: http://stubblog.wordpress.com From rubys at intertwingly.net Tue Jan 29 13:59:30 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Tue, 29 Jan 2008 13:59:30 -0500 Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? Message-ID: <479F7792.20406@intertwingly.net> Two things: I'm trying to port a number of projects to Ruby 1.9. Current status can be seen here: http://intertwingly.net/projects/ruby19/logs/ I'd like to try libxml2, presuming that people would be interested in accepting patches to make this work under 1.9, while continuing to work under 1.8. The second thing is that I first tried to build it under 1.8. What I get is: $ rake (in /home/rubys/svn/libxml) rake aborted! No such file or directory - ext/xml/libxml.h /home/rubys/svn/libxml/Rakefile:18:in `read' (See full trace by running task with --trace) Did I miss a step? - Sam Ruby From smparkes at smparkes.net Tue Jan 29 15:25:49 2008 From: smparkes at smparkes.net (Steven Parkes) Date: Tue, 29 Jan 2008 12:25:49 -0800 Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? In-Reply-To: <479F7792.20406@intertwingly.net> References: <479F7792.20406@intertwingly.net> Message-ID: <870667EBED5D44DC99CFCE3F35CBFE25@windows.esseff.org> $ rake (in /home/rubys/svn/libxml) rake aborted! No such file or directory - ext/xml/libxml.h At last mention, trunk was in flux: http://groups.google.com/group/libxml-devel/browse_thread/thread/b044e502102 d2c37 and apparently won't be using rake anymore. From transfire at gmail.com Wed Jan 30 17:30:58 2008 From: transfire at gmail.com (Trans) Date: Wed, 30 Jan 2008 14:30:58 -0800 (PST) Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? In-Reply-To: <479F7792.20406@intertwingly.net> References: <479F7792.20406@intertwingly.net> Message-ID: <7592bb30-0d0a-4c41-97ad-a4f6ace9c895@i7g2000prf.googlegroups.com> On Jan 29, 1:59 pm, Sam Ruby wrote: > Two things: > > I'm trying to port a number of projects to Ruby 1.9. Current status can > be seen here: > > http://intertwingly.net/projects/ruby19/logs/ > > I'd like to try libxml2, presuming that people would be interested in > accepting patches to make this work under 1.9, while continuing to work > under 1.8. > > The second thing is that I first tried to build it under 1.8. What I > get is: > > $ rake > (in /home/rubys/svn/libxml) > rake aborted! > No such file or directory - ext/xml/libxml.h > /home/rubys/svn/libxml/Rakefile:18:in `read' > (See full trace by running task with --trace) > > Did I miss a step? $ task/make T. From rubys at intertwingly.net Wed Jan 30 17:39:32 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Wed, 30 Jan 2008 17:39:32 -0500 Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? In-Reply-To: <7592bb30-0d0a-4c41-97ad-a4f6ace9c895@i7g2000prf.googlegroups.com> References: <479F7792.20406@intertwingly.net> <7592bb30-0d0a-4c41-97ad-a4f6ace9c895@i7g2000prf.googlegroups.com> Message-ID: <47A0FCA4.2000604@intertwingly.net> Trans wrote: > > On Jan 29, 1:59 pm, Sam Ruby wrote: >> Two things: >> >> I'm trying to port a number of projects to Ruby 1.9. Current status can >> be seen here: >> >> http://intertwingly.net/projects/ruby19/logs/ >> >> I'd like to try libxml2, presuming that people would be interested in >> accepting patches to make this work under 1.9, while continuing to work >> under 1.8. >> >> The second thing is that I first tried to build it under 1.8. What I >> get is: >> >> $ rake >> (in /home/rubys/svn/libxml) >> rake aborted! >> No such file or directory - ext/xml/libxml.h >> /home/rubys/svn/libxml/Rakefile:18:in `read' >> (See full trace by running task with --trace) >> >> Did I miss a step? > > $ task/make OK, that builds a .so file. What setup do I need to run tast/test? I'm getting a lot of Error loading: tests/tc_* messages currently. - Sam Ruby From transfire at gmail.com Wed Jan 30 17:40:14 2008 From: transfire at gmail.com (Trans) Date: Wed, 30 Jan 2008 14:40:14 -0800 (PST) Subject: [libxml-devel] .deb packages needed to compile Message-ID: It would be nice to enumerate all the extra debian/ubuntu packages needed to compile libxml2-ruby. So far I know of: libxml2 libxml2-dev libz-dev What are the others? T. From transfire at gmail.com Wed Jan 30 17:47:18 2008 From: transfire at gmail.com (Trans) Date: Wed, 30 Jan 2008 14:47:18 -0800 (PST) Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? In-Reply-To: <47A0FCA4.2000604@intertwingly.net> References: <479F7792.20406@intertwingly.net> <7592bb30-0d0a-4c41-97ad-a4f6ace9c895@i7g2000prf.googlegroups.com> <47A0FCA4.2000604@intertwingly.net> Message-ID: <24545c4f-addc-43fd-8496-5a36ec37cdd1@i72g2000hsd.googlegroups.com> On Jan 30, 5:39 pm, Sam Ruby wrote: > Trans wrote: > > > On Jan 29, 1:59 pm, Sam Ruby wrote: > >> Two things: > > >> I'm trying to port a number of projects to Ruby 1.9. Current status can > >> be seen here: > > >>http://intertwingly.net/projects/ruby19/logs/ > > >> I'd like to try libxml2, presuming that people would be interested in > >> accepting patches to make this work under 1.9, while continuing to work > >> under 1.8. > > >> The second thing is that I first tried to build it under 1.8. What I > >> get is: > > >> $ rake > >> (in /home/rubys/svn/libxml) > >> rake aborted! > >> No such file or directory - ext/xml/libxml.h > >> /home/rubys/svn/libxml/Rakefile:18:in `read' > >> (See full trace by running task with --trace) > > >> Did I miss a step? > > > $ task/make > > OK, that builds a .so file. What setup do I need to run tast/test? I'm > getting a lot of Error loading: tests/tc_* messages currently. Ah... in task/test change the line: $LOAD_PATH.unshift(File.expand_path('ext/libxml')) unless live to: unless live $LOAD_PATH.unshift(File.expand_path('ext/libxml')) $LOAD_PATH.unshift(File.expand_path('lib')) end BTW, to compile and install it is: $ task/setup This is a minor variation on Minero Aoki setup.rb, so anything you could do with setup.rb you can do with task/setup. T. From transfire at gmail.com Thu Jan 31 08:08:59 2008 From: transfire at gmail.com (Trans) Date: Thu, 31 Jan 2008 05:08:59 -0800 (PST) Subject: [libxml-devel] prepping libxml2 for Ruby 1.9? In-Reply-To: <479F7792.20406@intertwingly.net> References: <479F7792.20406@intertwingly.net> Message-ID: <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> On Jan 29, 1:59 pm, Sam Ruby wrote: > Two things: > > I'm trying to port a number of projects to Ruby 1.9. Current status can > be seen here: > > http://intertwingly.net/projects/ruby19/logs/ > > I'd like to try libxml2, presuming that people would be interested in > accepting patches to make this work under 1.9, while continuing to work > under 1.8. > > The second thing is that I first tried to build it under 1.8. What I > get is: > > $ rake > (in /home/rubys/svn/libxml) > rake aborted! > No such file or directory - ext/xml/libxml.h > /home/rubys/svn/libxml/Rakefile:18:in `read' > (See full trace by running task with --trace) > > Did I miss a step? I updated the Rakefile to shell out to the task/* scripts. $ rake -T (in /home/trans/Company/TigerOps/programs/libxml/trunk) rake clean # Remove any temporary products. rake clobber # Remove any generated file. rake compile # Compile extensions. rake default # Default task (compile, test and memory test) rake memory # Run memory test suite. rake rdoc # Generate rdoc documentation. rake setup # Install to local site directory. rake test # Run unit test suite. T. From hello at timperrett.com Thu Jan 31 09:00:36 2008 From: hello at timperrett.com (Tim Perrett) Date: Thu, 31 Jan 2008 14:00:36 +0000 Subject: [libxml-devel] Compilling libxsl on OSX Message-ID: <353B562B-9CEC-4C18-9B8F-8ECAE422CCCB@timperrett.com> Hey guys, Im trying to install the libxsl gem on OSX, but keep getting this error: ldruby_xslt_transform_context.o: symbolld(:s )symbol (nots )found notfor foundarchitecture forppc architecture i386 collect2: collect2: ld returned 1 exit statusld returned 1 exit status lipo: can't open input file: /var/folders/f1/f1tof6fRGDGh3f4-lir1i+++ +TI/-Tmp-//ccNVRFwL.out (No such file or directory) make: *** [libxslt.bundle] Error 1 Any ideas how I can fix this? Thanks Tim From rubys at intertwingly.net Thu Jan 31 10:13:23 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Thu, 31 Jan 2008 10:13:23 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> Message-ID: <47A1E593.4030109@intertwingly.net> Trans wrote: > > I updated the Rakefile to shell out to the task/* scripts. Thanks! With the attached patch, I've the following sequence works on Ruby 1.9, revision 15360 (the latest HEAD): rake clobber rake compile rake test The patch should not be applies as is, as the rename of util.h to ruby/util.h is a breaking change. Should be easy enough to handle in extconf.rb. My goal is to keep a watch on Ruby 19 and libxml2 to ensure that neither commits any changes that breaks the other. More details can be found here: http://intertwingly.net/blog/2008/01/31/Ruby-CI-Efforts Let me know if you commit these changes, or how you want the extconf changes to be handled, as once basic Ruby 1.9 support is in place, I will add libxml to my list. - Sam Ruby From rubys at intertwingly.net Thu Jan 31 10:15:07 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Thu, 31 Jan 2008 10:15:07 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <47A1E593.4030109@intertwingly.net> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> Message-ID: <47A1E5FB.90807@intertwingly.net> Sam Ruby wrote: > Trans wrote: >> I updated the Rakefile to shell out to the task/* scripts. > > Thanks! > > With the attached patch, I've the following sequence works on Ruby 1.9, > revision 15360 (the latest HEAD): > > rake clobber > rake compile > rake test > > The patch should not be applies as is, as the rename of util.h to > ruby/util.h is a breaking change. Should be easy enough to handle in > extconf.rb. > > My goal is to keep a watch on Ruby 19 and libxml2 to ensure that neither > commits any changes that breaks the other. More details can be found here: > > http://intertwingly.net/blog/2008/01/31/Ruby-CI-Efforts > > Let me know if you commit these changes, or how you want the extconf > changes to be handled, as once basic Ruby 1.9 support is in place, I > will add libxml to my list. > > - Sam Ruby Oops. This time, I'm going to include the patch. :-) - Sam Ruby -------------- next part -------------- A non-text attachment was scrubbed... Name: libxml.r19.patch Type: text/x-patch Size: 954 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080131/434aec24/attachment.bin From danj at 3skel.com Thu Jan 31 10:39:12 2008 From: danj at 3skel.com (Dan Janowski) Date: Thu, 31 Jan 2008 10:39:12 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <47A1E5FB.90807@intertwingly.net> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> <47A1E5FB.90807@intertwingly.net> Message-ID: <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> Hi Sam, Thank you for tracking these changes. In the interest of tracking all changes so they may be properly applied, please submit this to the patch tracker at this location: http://rubyforge.org/tracker/?func=add&group_id=494&atid=1973 Dan On Jan 31, 2008, at 10:15, Sam Ruby wrote: > Sam Ruby wrote: >> Trans wrote: >>> I updated the Rakefile to shell out to the task/* scripts. >> Thanks! >> With the attached patch, I've the following sequence works on Ruby >> 1.9, revision 15360 (the latest HEAD): >> rake clobber >> rake compile >> rake test >> The patch should not be applies as is, as the rename of util.h to >> ruby/util.h is a breaking change. Should be easy enough to handle >> in extconf.rb. >> My goal is to keep a watch on Ruby 19 and libxml2 to ensure that >> neither commits any changes that breaks the other. More details >> can be found here: >> http://intertwingly.net/blog/2008/01/31/Ruby-CI-Efforts >> Let me know if you commit these changes, or how you want the >> extconf changes to be handled, as once basic Ruby 1.9 support is in >> place, I will add libxml to my list. >> - Sam Ruby > > Oops. This time, I'm going to include the patch. :-) > > - Sam Ruby > Index: ext/libxml/libxml.c > =================================================================== > --- ext/libxml/libxml.c (revision 256) > +++ ext/libxml/libxml.c (working copy) > @@ -4,9 +4,6 @@ > > #include "libxml.h" > > -/* Ruby's util.h has ruby_strdup */ > -#include "util.h" > - > #ifdef xmlMalloc > #undef xmlMalloc > #endif > Index: ext/libxml/libxml.h > =================================================================== > --- ext/libxml/libxml.h (revision 256) > +++ ext/libxml/libxml.h (working copy) > @@ -18,7 +18,7 @@ > > #include > #include > -#include > +#include > #include > #include > #include > @@ -35,6 +35,12 @@ > #define RSTRING_LEN(x) RSTRING(x)->len > #endif > > +// not in Ruby 1.9 > +#ifndef GetWriteFile > +#define GetWriteFile(fp) rb_io_stdio_file(fp) > +#define OpenFile rb_io_t > +#endif > + > #ifdef LIBXML_DEBUG_ENABLED > #include > #endif > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From rubys at intertwingly.net Thu Jan 31 10:46:05 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Thu, 31 Jan 2008 10:46:05 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> <47A1E5FB.90807@intertwingly.net> <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> Message-ID: <47A1ED3D.1080405@intertwingly.net> Dan Janowski wrote: > Hi Sam, > > Thank you for tracking these changes. In the interest of tracking all > changes so they may be properly applied, please submit this to the > patch tracker at this location: > > http://rubyforge.org/tracker/?func=add&group_id=494&atid=1973 > > Dan Done: http://rubyforge.org/tracker/index.php?func=detail&aid=17666&group_id=494&atid=1973 - Sam Ruby From pat.eyler at gmail.com Thu Jan 31 10:51:27 2008 From: pat.eyler at gmail.com (pat eyler) Date: Thu, 31 Jan 2008 08:51:27 -0700 Subject: [libxml-devel] libxml and Rubinius Message-ID: <6fd0654b0801310751r4ca4b3f5se0ca1d89b01ca6da@mail.gmail.com> has anyone done any work getting libxml to work on/with Rubinius? -- thanks, -pate ------------------------- Duty makes us do things, Love make us do things well. http://on-ruby.blogspot.com http://on-erlang.blogspot.com http://on-soccer.blogspot.com From danj at 3skel.com Thu Jan 31 11:09:36 2008 From: danj at 3skel.com (Dan Janowski) Date: Thu, 31 Jan 2008 11:09:36 -0500 Subject: [libxml-devel] Project protocol Message-ID: <9FB5DCE5-C5D7-415A-AAB8-3120F4273280@3skel.com> My thanks to all of you for using, discussing, reporting and contributing to the ruby-libxml extension. As more people become involved and as the quantity of contributions and issues grows, it has become more difficult to keep track of what needs to be done. With this in mind, the following protocol is necessary for better execution: Non-developer: 1. the libxml-devel mailing list is for support and discussion 2. Feature changes, bug reports, patches must be submitted to the tracker at http://rubyforge.org/tracker/?group_id=494 Developer: 1. The trunk must always be in working order. 2. Narrow scoped bug fixes may be applied directly to the trunk. 3. Each developer should use a self named branch (i.e. danj-devel) for making larger changes that may result in prolonged brokenness. The developer should track the trunk and merge as required. 4. Larger branch based changes should be packaged into Release Candidates using a change name and the SVN number for public evaluation. i.e. xpath-1234 or build-1234. 5. Successful RC evaluation should result in a merge back to the trunk, assignment of a release number, then publication. I hope this will make it easier to apply consistent and productive time slices for continuing work on the code base. If you find a problem with anything said here or something omitted, please discuss. Dan From danj at 3skel.com Thu Jan 31 11:27:54 2008 From: danj at 3skel.com (Dan Janowski) Date: Thu, 31 Jan 2008 11:27:54 -0500 Subject: [libxml-devel] libxml and Rubinius In-Reply-To: <6fd0654b0801310751r4ca4b3f5se0ca1d89b01ca6da@mail.gmail.com> References: <6fd0654b0801310751r4ca4b3f5se0ca1d89b01ca6da@mail.gmail.com> Message-ID: This entices me. The MRI internals (esp. the GC) are the biggest obstacle to making this library work and I am beginning to really hate them. I've even had this delusion that making this library work with Subtend may enable effective repair of outstanding faults more easily than trying to do it under MRI. Then I have this shimmering vision of dumping the whole code base and just writing an FFI interface. Dan On Jan 31, 2008, at 10:51, pat eyler wrote: > has anyone done any work getting libxml to work on/with Rubinius? > > -- > thanks, > -pate > ------------------------- > Duty makes us do things, Love make us do things well. > http://on-ruby.blogspot.com http://on-erlang.blogspot.com > http://on-soccer.blogspot.com > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel