From keisukefukuda at gmail.com Sat Dec 1 13:02:56 2007 From: keisukefukuda at gmail.com (keisuke fukuda) Date: Sun, 2 Dec 2007 03:02:56 +0900 Subject: [libxml-devel] Segmentation fault when add the cloned/copied node In-Reply-To: References: <17dac0df-ad74-4352-a50f-4b7f4662eb6f@t47g2000hsc.googlegroups.com> Message-ID: Hi, I created a patch. I'm not sure that I really understood the problem, but following patch works well for me. my environment is: Linux (CentOS 5.0) kernel 2.6.18-8.1.15.el5 on VMWare Workstation ruby 1.8.5 (2006-08-25) [i386-linux] (CentOS's latest package) libxml 2.6.26 (CentOS's latest package) The problem is in ruby_xml_node_child_set_aux(): when the argument 'rnode' is a copied text node, 'chld' is not copied because cnode->doc==NULL && cnode->parent==NULL && cnode->type==XML_TEXT_NODE. But xmlAddChild *FREES* the second argument if it's a text node (I've read libxml source). This causes double-freeing. see http://xmlsoft.org/html/libxml-tree.html#xmlAddChild So, what we need to do is to copy the node and return cnode->node instead of chld. # In addition, we need to define 'clone' method to avoid segmentation fault because # default Object#clone method is not suitable for ext-modules. here's a patch (including unit tests). Index: ext/xml/ruby_xml_node.c =================================================================== --- ext/xml/ruby_xml_node.c (revision 220) +++ ext/xml/ruby_xml_node.c (working copy) @@ -327,7 +327,7 @@ chld = cnode->node; - if ( chld->parent != NULL || chld->doc != NULL ) { + if ( chld->parent != NULL || chld->doc != NULL || chld->type == XML_TEXT_NODE ) { chld=xmlCopyNode(chld,1); copied=1; if ( do_raise == 1 ) @@ -342,7 +342,9 @@ } // wish I could return a new wrapped chld, but ruby only returns the rhs - return ruby_xml_node2_wrap(cXMLNode,chld); + // chld is freed if xmlAddChild() successed and chld->type == XML_TEXT_NODE, + // so we need another copy of cnode->node. + return ruby_xml_node2_wrap(cXMLNode,cnode->node); } /* Index: ext/xml/libxml.rb =================================================================== --- ext/xml/libxml.rb (revision 220) +++ ext/xml/libxml.rb (working copy) @@ -72,6 +72,14 @@ def <=>(other) to_s <=> other.to_s end + + def clone + copy(false) + end end class XML::Attr Index: tests/tc_xml_node_copy.rb =================================================================== --- tests/tc_xml_node_copy.rb (revision 0) +++ tests/tc_xml_node_copy.rb (revision 0) @@ -0,0 +1,40 @@ +require "libxml_test" +require "xml/libxml" +require 'test/unit' + +# see mailing list archive +# [libxml-devel] Segmentation fault when add the cloned/copied node +# 2007/11/27 20:51 +class TC_XML_Node_Copy < Test::Unit::TestCase + def setup + str = <<-STR + +
foo
+
bar
+ + STR + + doc = XML::Parser.string(str).parse + + xpath = "//div" + @div1 = doc.find(xpath).to_a[0] + @div2 = doc.find(xpath).to_a[1] + end + + def test_libxml_node_copy_not_segv + @div2.each do |child| + c = child.copy(false) + @div1.child_add(c) + end + assert @div1.to_s =~ /foo/ + end + + def test_libxml_node_clone_not_segv + @div2.each do |child| + c = child.clone + @div1.child_add(c) + end + assert @div1.to_s =~ /foo/ + end + +end # TC_XML_Node_Copy -- FUKUDA, Keisuke -------------- next part -------------- A non-text attachment was scrubbed... Name: libxml_ruby_clone_segv_fix.patch Type: application/octet-stream Size: 2244 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20071202/daeae4be/attachment.obj From keisukefukuda at gmail.com Sat Dec 1 13:07:28 2007 From: keisukefukuda at gmail.com (keisuke fukuda) Date: Sun, 2 Dec 2007 03:07:28 +0900 Subject: [libxml-devel] Segmentation fault when add the cloned/copied node In-Reply-To: References: <17dac0df-ad74-4352-a50f-4b7f4662eb6f@t47g2000hsc.googlegroups.com> Message-ID: Sorry, the attached patch was wrong. ( in-message-body one is right.) This is the right one. 2007/12/2, keisuke fukuda : > Hi, > > I created a patch. > I'm not sure that I really understood the problem, but following patch > works well for me. > > my environment is: > Linux (CentOS 5.0) kernel 2.6.18-8.1.15.el5 on VMWare Workstation > ruby 1.8.5 (2006-08-25) [i386-linux] (CentOS's latest package) > libxml 2.6.26 (CentOS's latest package) > > The problem is in ruby_xml_node_child_set_aux(): > when the argument 'rnode' is a copied text node, 'chld' is not copied because > cnode->doc==NULL && cnode->parent==NULL && cnode->type==XML_TEXT_NODE. > > But xmlAddChild *FREES* the second argument if it's a text node (I've > read libxml source). This causes double-freeing. > see http://xmlsoft.org/html/libxml-tree.html#xmlAddChild > > So, what we need to do is to copy the node and return cnode->node > instead of chld. > > # In addition, we need to define 'clone' method to avoid segmentation > fault because > # default Object#clone method is not suitable for ext-modules. > > here's a patch (including unit tests). > > Index: ext/xml/ruby_xml_node.c > =================================================================== > --- ext/xml/ruby_xml_node.c (revision 220) > +++ ext/xml/ruby_xml_node.c (working copy) > @@ -327,7 +327,7 @@ > > chld = cnode->node; > > - if ( chld->parent != NULL || chld->doc != NULL ) { > + if ( chld->parent != NULL || chld->doc != NULL || chld->type == > XML_TEXT_NODE ) { > chld=xmlCopyNode(chld,1); > copied=1; > if ( do_raise == 1 ) > @@ -342,7 +342,9 @@ > } > > // wish I could return a new wrapped chld, but ruby only returns the rhs > - return ruby_xml_node2_wrap(cXMLNode,chld); > + // chld is freed if xmlAddChild() successed and chld->type == XML_TEXT_NODE, > + // so we need another copy of cnode->node. > + return ruby_xml_node2_wrap(cXMLNode,cnode->node); > } > > /* > Index: ext/xml/libxml.rb > =================================================================== > --- ext/xml/libxml.rb (revision 220) > +++ ext/xml/libxml.rb (working copy) > @@ -72,6 +72,14 @@ > def <=>(other) > to_s <=> other.to_s > end > + > + def clone > + copy(false) > + end > end > > class XML::Attr > Index: tests/tc_xml_node_copy.rb > =================================================================== > --- tests/tc_xml_node_copy.rb (revision 0) > +++ tests/tc_xml_node_copy.rb (revision 0) > @@ -0,0 +1,40 @@ > +require "libxml_test" > +require "xml/libxml" > +require 'test/unit' > + > +# see mailing list archive > +# [libxml-devel] Segmentation fault when add the cloned/copied node > +# 2007/11/27 20:51 > +class TC_XML_Node_Copy < Test::Unit::TestCase > + def setup > + str = <<-STR > + > +
foo
> +
bar
> + > + STR > + > + doc = XML::Parser.string(str).parse > + > + xpath = "//div" > + @div1 = doc.find(xpath).to_a[0] > + @div2 = doc.find(xpath).to_a[1] > + end > + > + def test_libxml_node_copy_not_segv > + @div2.each do |child| > + c = child.copy(false) > + @div1.child_add(c) > + end > + assert @div1.to_s =~ /foo/ > + end > + > + def test_libxml_node_clone_not_segv > + @div2.each do |child| > + c = child.clone > + @div1.child_add(c) > + end > + assert @div1.to_s =~ /foo/ > + end > + > +end # TC_XML_Node_Copy > > > -- > FUKUDA, Keisuke > > -- FUKUDA, Keisuke <福田圭祐> http://d.hatena.ne.jp/keisukefukuda/ -------------- next part -------------- A non-text attachment was scrubbed... Name: libxml_ruby_clone_segv_fix.patch Type: application/octet-stream Size: 2205 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20071202/28bdc3f2/attachment-0001.obj From cjbottaro at alumni.cs.utexas.edu Mon Dec 3 11:54:58 2007 From: cjbottaro at alumni.cs.utexas.edu (Christopher J. Bottaro) Date: Mon, 3 Dec 2007 10:54:58 -0600 Subject: [libxml-devel] Seg fault when trying to parse empty string Message-ID: Hello, This code segment segfaults: p = XML::Parser.new p.string = '' p.parse I'm using revision 220. Btw, is that the preferred way to load XML from a string instead of a file? Thanks. From danj at 3skel.com Mon Dec 3 13:17:09 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 3 Dec 2007 13:17:09 -0500 Subject: [libxml-devel] Seg fault when trying to parse empty string In-Reply-To: References: Message-ID: svn #221 catches this problem now. There are a variety of ways to seed the parser, not sure there is a preferred way. Dan On Dec 3, 2007, at 11:54, Christopher J. Bottaro wrote: > Hello, > > This code segment segfaults: > > p = XML::Parser.new > p.string = '' > p.parse > > I'm using revision 220. > > Btw, is that the preferred way to load XML from a string instead of > a file? > > Thanks. > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From paul at aps.org Mon Dec 3 14:52:07 2007 From: paul at aps.org (Paul Dlug) Date: Mon, 3 Dec 2007 14:52:07 -0500 Subject: [libxml-devel] Status of Patch #7758? In-Reply-To: <790E6B34-DA37-47AA-9CFC-AEC505E28782@aps.org> References: <7699BD5C-2284-4EA1-B5A8-DB32185939F0@aps.org> <2710B742-3FA3-4852-9AC0-EDB24BB95598@3skel.com> <790E6B34-DA37-47AA-9CFC-AEC505E28782@aps.org> Message-ID: Dan, Just wondering, any feedback on this? Thanks, Paul On Nov 27, 2007, at 11:41 PM, Paul Dlug wrote: > > On Nov 27, 2007, at 3:26 PM, Dan Janowski wrote: > >> I see the merit in this kind of approach but it cannot conflict with >> the libxml work flow. I.e.: >> >> instead of XML::Document.parse(xml) => Document >> XML::Parser.parse(xml) => Document >> >> If you want to update the patch for the current code base, I am >> willing to apply and eval it. > > I updated the original patch from Tobias to work with the current > subversion trunk (220). I made the suggested modification above so > it's XML::Parser.parse(xml) rather than XML::Document.parse -- > though I do think XML::Document.parse is a little bit of a cleaner > API. > > I also found a bug with namespace assignments, if you assign a > namespace to a node not associated with a document it segfaults: > > doc = XML::Document.new > node = XML::Node.new('root') > node.namespace = "t:test" > > I'm not sure what the best way to fix this is since I'm not the > familiar with the namespace code at this point. > > > Thanks, > Paul > > > > > >> On Nov 27, 2007, at 13:48, Paul Dlug wrote: >> >>> I see patch #7758 hasn't been worked on or updated since submission >>> (long ago): >>> http://rubyforge.org/tracker/index.php? >>> func=detail&aid=7758&group_id=494&atid=1973 >>> >>> This seems like a great idea and the new parse method solves >>> eliminates the need for part of the patch I submitted (#15807). Is >>> there any interest in getting this into the current library? I would >>> be happy to modify the patch to bring it up to date with the current >>> trunk version. This would certainly create a much more user friendly >>> API than what currently exists. >>> >>> >>> Thanks, >>> Paul >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From cjbottaro at alumni.cs.utexas.edu Mon Dec 3 16:35:23 2007 From: cjbottaro at alumni.cs.utexas.edu (Christopher J. Bottaro) Date: Mon, 3 Dec 2007 15:35:23 -0600 Subject: [libxml-devel] Seg fault when trying to parse empty string In-Reply-To: References: Message-ID: Cool, thanks for that quick fix. Got another one though... d = XML::Document.new d.find('/blah') Thanks again. On Dec 3, 2007 12:17 PM, Dan Janowski wrote: > svn #221 catches this problem now. There are a variety of ways to > seed the parser, not sure there is a preferred way. > > Dan > > > On Dec 3, 2007, at 11:54, Christopher J. Bottaro wrote: > > > Hello, > > > > This code segment segfaults: > > > > p = XML::Parser.new > > p.string = '' > > p.parse > > > > I'm using revision 220. > > > > Btw, is that the preferred way to load XML from a string instead of > > a file? > > > > Thanks. > > _______________________________________________ > > 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 danj at 3skel.com Mon Dec 3 17:09:15 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 3 Dec 2007 17:09:15 -0500 Subject: [libxml-devel] Status of Patch #7758? In-Reply-To: References: <7699BD5C-2284-4EA1-B5A8-DB32185939F0@aps.org> <2710B742-3FA3-4852-9AC0-EDB24BB95598@3skel.com> <790E6B34-DA37-47AA-9CFC-AEC505E28782@aps.org> Message-ID: Paul, It looks fine at first glance, but I have not had time to apply the patch and examine the results. The library is a lot less fragile than when I got it, but I need to be careful when adding code that is not fixing a bug to be sure not to blow something else up. Thanks for the patch. Have any interest in contributing more? Dan On Dec 3, 2007, at 14:52, Paul Dlug wrote: > Dan, > > Just wondering, any feedback on this? > > > Thanks, > Paul > > On Nov 27, 2007, at 11:41 PM, Paul Dlug wrote: > >> >> On Nov 27, 2007, at 3:26 PM, Dan Janowski wrote: >> >>> I see the merit in this kind of approach but it cannot conflict with >>> the libxml work flow. I.e.: >>> >>> instead of XML::Document.parse(xml) => Document >>> XML::Parser.parse(xml) => Document >>> >>> If you want to update the patch for the current code base, I am >>> willing to apply and eval it. >> >> I updated the original patch from Tobias to work with the current >> subversion trunk (220). I made the suggested modification above so >> it's XML::Parser.parse(xml) rather than XML::Document.parse -- >> though I do think XML::Document.parse is a little bit of a cleaner >> API. >> >> I also found a bug with namespace assignments, if you assign a >> namespace to a node not associated with a document it segfaults: >> >> doc = XML::Document.new >> node = XML::Node.new('root') >> node.namespace = "t:test" >> >> I'm not sure what the best way to fix this is since I'm not the >> familiar with the namespace code at this point. >> >> >> Thanks, >> Paul >> >> >> >> >> >>> On Nov 27, 2007, at 13:48, Paul Dlug wrote: >>> >>>> I see patch #7758 hasn't been worked on or updated since submission >>>> (long ago): >>>> http://rubyforge.org/tracker/index.php? >>>> func=detail&aid=7758&group_id=494&atid=1973 >>>> >>>> This seems like a great idea and the new parse method solves >>>> eliminates the need for part of the patch I submitted >>>> (#15807). Is >>>> there any interest in getting this into the current library? I >>>> would >>>> be happy to modify the patch to bring it up to date with the >>>> current >>>> trunk version. This would certainly create a much more user >>>> friendly >>>> API than what currently exists. >>>> >>>> >>>> Thanks, >>>> Paul >>>> _______________________________________________ >>>> 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 >>> >> >> _______________________________________________ >> 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 paul at aps.org Tue Dec 4 00:20:47 2007 From: paul at aps.org (Paul Dlug) Date: Tue, 4 Dec 2007 00:20:47 -0500 Subject: [libxml-devel] Status of Patch #7758? In-Reply-To: References: <7699BD5C-2284-4EA1-B5A8-DB32185939F0@aps.org> <2710B742-3FA3-4852-9AC0-EDB24BB95598@3skel.com> <790E6B34-DA37-47AA-9CFC-AEC505E28782@aps.org> Message-ID: <7FD91DCA-1E16-4D14-AEF3-CA415124DADD@aps.org> On Dec 3, 2007, at 5:09 PM, Dan Janowski wrote: > Paul, > > It looks fine at first glance, but I have not had time to apply the > patch and examine the results. The library is a lot less fragile than > when I got it, but I need to be careful when adding code that is not > fixing a bug to be sure not to blow something else up. I understand, I'm just happy it's now usable and being maintained. The slow performance of REXML was killing me. That being said there's still a lot of work to do... > Thanks for the patch. Have any interest in contributing more? Definitely, I'm going to take a stab at fixing the namespace segfault I reported along with this patch submission. What do you think about switching to RSpec and increasing the test coverage? I'd be happy to kick this off. This would lead to more thorough test coverage and test cases that are actually descriptive, the current structure is too cryptic to be really useful. --Paul > On Dec 3, 2007, at 14:52, Paul Dlug wrote: > >> Dan, >> >> Just wondering, any feedback on this? >> >> >> Thanks, >> Paul >> >> On Nov 27, 2007, at 11:41 PM, Paul Dlug wrote: >> >>> >>> On Nov 27, 2007, at 3:26 PM, Dan Janowski wrote: >>> >>>> I see the merit in this kind of approach but it cannot conflict >>>> with >>>> the libxml work flow. I.e.: >>>> >>>> instead of XML::Document.parse(xml) => Document >>>> XML::Parser.parse(xml) => Document >>>> >>>> If you want to update the patch for the current code base, I am >>>> willing to apply and eval it. >>> >>> I updated the original patch from Tobias to work with the current >>> subversion trunk (220). I made the suggested modification above so >>> it's XML::Parser.parse(xml) rather than XML::Document.parse -- >>> though I do think XML::Document.parse is a little bit of a cleaner >>> API. >>> >>> I also found a bug with namespace assignments, if you assign a >>> namespace to a node not associated with a document it segfaults: >>> >>> doc = XML::Document.new >>> node = XML::Node.new('root') >>> node.namespace = "t:test" >>> >>> I'm not sure what the best way to fix this is since I'm not the >>> familiar with the namespace code at this point. >>> >>> >>> Thanks, >>> Paul >>> >>> >>> >>> >>> >>>> On Nov 27, 2007, at 13:48, Paul Dlug wrote: >>>> >>>>> I see patch #7758 hasn't been worked on or updated since >>>>> submission >>>>> (long ago): >>>>> http://rubyforge.org/tracker/index.php? >>>>> func=detail&aid=7758&group_id=494&atid=1973 >>>>> >>>>> This seems like a great idea and the new parse method solves >>>>> eliminates the need for part of the patch I submitted >>>>> (#15807). Is >>>>> there any interest in getting this into the current library? I >>>>> would >>>>> be happy to modify the patch to bring it up to date with the >>>>> current >>>>> trunk version. This would certainly create a much more user >>>>> friendly >>>>> API than what currently exists. >>>>> >>>>> >>>>> Thanks, >>>>> Paul >>>>> _______________________________________________ >>>>> 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 >>>> >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > From transfire at gmail.com Tue Dec 4 08:17:20 2007 From: transfire at gmail.com (Trans) Date: Tue, 4 Dec 2007 08:17:20 -0500 Subject: [libxml-devel] Status of Patch #7758? In-Reply-To: <7FD91DCA-1E16-4D14-AEF3-CA415124DADD@aps.org> References: <7699BD5C-2284-4EA1-B5A8-DB32185939F0@aps.org> <2710B742-3FA3-4852-9AC0-EDB24BB95598@3skel.com> <790E6B34-DA37-47AA-9CFC-AEC505E28782@aps.org> <7FD91DCA-1E16-4D14-AEF3-CA415124DADD@aps.org> Message-ID: <4b6f054f0712040517m1f86ec9bwb02f4fd127f41961@mail.gmail.com> On Dec 4, 2007 12:20 AM, Paul Dlug wrote: > > On Dec 3, 2007, at 5:09 PM, Dan Janowski wrote: > > > Paul, > > > > It looks fine at first glance, but I have not had time to apply the > > patch and examine the results. The library is a lot less fragile than > > when I got it, but I need to be careful when adding code that is not > > fixing a bug to be sure not to blow something else up. > > I understand, I'm just happy it's now usable and being maintained. The > slow performance of REXML was killing me. That being said there's > still a lot of work to do... > > > Thanks for the patch. Have any interest in contributing more? > > Definitely, I'm going to take a stab at fixing the namespace segfault > I reported along with this patch submission. What do you think about > switching to RSpec and increasing the test coverage? I'd be happy to > kick this off. This would lead to more thorough test coverage and test > cases that are actually descriptive, the current structure is too > cryptic to be really useful. Please, no RSpec at this point. We need to focus on release. Changing test suites can wait. Thanks, T. From simon.wilkinson at 434wireless.com Fri Dec 7 09:33:47 2007 From: simon.wilkinson at 434wireless.com (simon.wilkinson at 434wireless.com) Date: Fri, 07 Dec 2007 09:33:47 -0500 Subject: [libxml-devel] install issues Message-ID: <24288757.1427561197038027916.JavaMail.servlet@perfora> Hi, I'm running Ubuntu, and cacn't get libxml-ruby to install. I have tried through gems and by installing using the tarball. I get similar errors for each method. Here is a trace: simon at ubuntu:/usr/local/src/libxml-ruby-0.5.2.0$ rake install --trace (in /usr/local/src/libxml-ruby-0.5.2.0) ** Invoke install (first_time) ** Invoke compile (first_time) ** Invoke ext/xml/libxml.so (first_time) ** Invoke ext/xml/Makefile (first_time) ** Invoke ext/xml/extconf.rb (first_time, not_needed) ** Execute ext/xml/Makefile /usr/bin/ruby1.8 extconf.rb extconf.rb:3:in `require': no such file to load -- mkmf (LoadError) from extconf.rb:3 rake aborted! Command failed with status (1): [/usr/bin/ruby1.8 extconf.rb...] /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:719:in `sh' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `sh' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:805:in `sh' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:740:in `ruby' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:805:in `ruby' /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:40 /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:39:in `chdir' /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:39 /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Does anybody have any advice on what is missing, or what my problem is? I have previously installed this (through gems) on a few other machines without a hitch. Thanks, Simon From danj at 3skel.com Fri Dec 7 10:05:41 2007 From: danj at 3skel.com (Dan Janowski) Date: Fri, 7 Dec 2007 10:05:41 -0500 Subject: [libxml-devel] install issues In-Reply-To: <24288757.1427561197038027916.JavaMail.servlet@perfora> References: <24288757.1427561197038027916.JavaMail.servlet@perfora> Message-ID: <4DB79955-BAED-425D-A79D-09BD3F98AEC6@3skel.com> mkmf is a core part of ruby and should be part of the base installation. First make sure it is there. In irb, do a require of 'mkmf' and make sure it results in true. If not, then your ruby install is somehow messed up. However, if you have installed any other gems (they all use mkmf) that is unlikely. At the beginning of extconf.rb, put this to inspect the library paths and see if it includes the ruby base installation: $stderr.puts $LOAD_PATH.inspect I have no idea why it would or might be getting blown. Dan On Dec 7, 2007, at 09:33, simon.wilkinson at 434wireless.com wrote: > Hi, > > I'm running Ubuntu, and cacn't get libxml-ruby to install. I have > tried through gems and by installing using the tarball. I get > similar errors for each method. Here is a trace: > > simon at ubuntu:/usr/local/src/libxml-ruby-0.5.2.0$ rake install --trace > (in /usr/local/src/libxml-ruby-0.5.2.0) > ** Invoke install (first_time) > ** Invoke compile (first_time) > ** Invoke ext/xml/libxml.so (first_time) > ** Invoke ext/xml/Makefile (first_time) > ** Invoke ext/xml/extconf.rb (first_time, not_needed) > ** Execute ext/xml/Makefile > /usr/bin/ruby1.8 extconf.rb > extconf.rb:3:in `require': no such file to load -- mkmf (LoadError) > from extconf.rb:3 > rake aborted! > Command failed with status (1): [/usr/bin/ruby1.8 extconf.rb...] > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:719:in `sh' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `call' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:726:in `sh' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:805:in `sh' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:740:in `ruby' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:805:in `ruby' > /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:40 > /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:39:in `chdir' > /usr/local/src/libxml-ruby-0.5.2.0/Rakefile:39 > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in > `synchronize' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in > `synchronize' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in > `synchronize' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in > `invoke_prerequisites' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in > `synchronize' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in > `standard_exception_handling' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in > `standard_exception_handling' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run' > /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 > /usr/bin/rake:19:in `load' > /usr/bin/rake:19 > > Does anybody have any advice on what is missing, or what my problem > is? I have previously installed this (through gems) on a few other > machines without a hitch. > > Thanks, > > Simon > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From keisukefukuda at gmail.com Fri Dec 7 10:23:12 2007 From: keisukefukuda at gmail.com (keisuke fukuda) Date: Sat, 8 Dec 2007 00:23:12 +0900 Subject: [libxml-devel] install issues In-Reply-To: <4DB79955-BAED-425D-A79D-09BD3F98AEC6@3skel.com> References: <24288757.1427561197038027916.JavaMail.servlet@perfora> <4DB79955-BAED-425D-A79D-09BD3F98AEC6@3skel.com> Message-ID: Hi, Maybe you have to install ruby1.8-dev package. From simon.wilkinson at 434wireless.com Fri Dec 7 11:18:12 2007 From: simon.wilkinson at 434wireless.com (simon.wilkinson at 434wireless.com) Date: Fri, 07 Dec 2007 11:18:12 -0500 Subject: [libxml-devel] install issues Message-ID: <20470567.1475131197044292971.JavaMail.servlet@perfora> That was it. Thanks, Simon Hi, Maybe you have to install ruby1.8-dev package. _______________________________________________ libxml-devel mailing list libxml-devel at rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel From jochen at remote.org Fri Dec 7 04:30:18 2007 From: jochen at remote.org (Jochen Topf) Date: Fri, 7 Dec 2007 10:30:18 +0100 Subject: [libxml-devel] Sax-Parser: Reading not from file Message-ID: <20071207093018.GA15001@eldorado.remote.org> Hi! I have some rather large XML files which I want to read with the SAX parser. Unfortunately it can only read from files or strings, not from a Ruby IO stream or so. I want to pipe in the XML file directly from a process decompressing the file or use some Ruby lib to do the decompression on the fly. Any suggestions? Jochen -- Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298 From todd.fisher at gmail.com Fri Dec 7 19:24:49 2007 From: todd.fisher at gmail.com (Todd Fisher) Date: Fri, 7 Dec 2007 19:24:49 -0500 Subject: [libxml-devel] Sax-Parser: Reading not from file In-Reply-To: <20071207093018.GA15001@eldorado.remote.org> References: <20071207093018.GA15001@eldorado.remote.org> Message-ID: It doesn't look like it's supported. It could be we'd have to use xmlParseChunk. It shouldn't be too hard the tricky part would be how to expose that feature in a easy to use ruby API... On Dec 7, 2007 4:30 AM, Jochen Topf wrote: > Hi! > > I have some rather large XML files which I want to read with the SAX > parser. Unfortunately it can only read from files or strings, not from > a Ruby IO stream or so. I want to pipe in the XML file directly from > a process decompressing the file or use some Ruby lib to do the > decompression on the fly. > > Any suggestions? > > Jochen > -- > Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298 > > _______________________________________________ > 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/20071207/d07da310/attachment.html From Piotr.Kopyt at gmail.com Fri Dec 7 12:21:17 2007 From: Piotr.Kopyt at gmail.com (optyk) Date: Fri, 7 Dec 2007 09:21:17 -0800 (PST) Subject: [libxml-devel] Segmentation fault when add the cloned/copied node In-Reply-To: References: <17dac0df-ad74-4352-a50f-4b7f4662eb6f@t47g2000hsc.googlegroups.com> Message-ID: apologize for late response, I applied Keisuke's patch and it looks like it works, script no longer causes Segmentation fault, below there is some data on seg faults I experienced and on my environment: my system: pkopyt at pkopyt:~$ uname -a Linux pkopyt 2.6.15-23-686 #1 SMP PREEMPT Tue May 23 14:03:07 UTC 2006 i686 GNU/Linux pkopyt at pkopyt:~$ xml2-config --version 2.6.24 gdb outputs: clone: (gdb) (gdb) (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7d3a9a1 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d3c2b9 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7ec4377 in rb_bug (fmt=0x0) at error.c:214 #4 0xb7f2d8f8 in sigsegv (sig=11) at signal.c:529 #5 #6 0xb7ccd6c6 in ruby_xml_node_child_set_aux (self=3083831220, rnode=3083830760, do_raise=0) at ruby_xml_node.c:333 #7 0xb7ccd82b in ruby_xml_node_child_add (self=3083831220, rnode=3083830760) at ruby_xml_node.c:383 #8 0xb7ec7e17 in call_cfunc (func=0xb7ccd7f1 , recv=3083831220, len=-1211136536, argc=34, argv=0xbfe90de0) at eval.c:5655 #9 0xb7ed2741 in rb_call0 (klass=, recv=3083831220, id=10521, oid=0, argc=0, argv=0xbfe90de0, body=0xb7cfaec4, flags=) at eval.c:5805 #10 0xb7ed328f in rb_call (klass=3083842260, recv=3083831220, mid=10521, argc=1, argv=0xbfe90de0, scope=0, self=3083926000) at eval.c:6052 #11 0xb7ecf2ec in rb_eval (self=3083926000, n=) at eval.c:3436 #12 0xb7ed5725 in rb_yield_0 (val=, self=3083926000, klass=, flags=, avalue=0) at eval.c:4980 #13 0xb7ed60b5 in proc_invoke (proc=3083830920, args=3083830900, self=6, klass=0) at eval.c:8519 #14 0xb7ec7a39 in call_cfunc (func=0xb7ed6274 , recv=3083830920, len=, argc=1, argv=0xbfe91af0) at eval.c:5646 #15 0xb7ed2741 in rb_call0 (klass=, recv=3083830920, id=5249, oid=0, argc=0, argv=0xbfe91af0, body=0xb7d01314, flags=) at eval.c:5805 #16 0xb7ed328f in rb_call (klass=3083867080, recv=3083830920, mid=5249, argc=1, argv=0xbfe91af0, scope=0, self=3083831040) at eval.c:6052 #17 0xb7ecf2ec in rb_eval (self=3083831040, n=) at eval.c:3436 #18 0xb7ed5725 in rb_yield_0 (val=, self=3083831040, klass=, flags=, avalue=0) at eval.c:4980 #19 0xb7edd446 in rb_f_loop () at eval.c:5124 #20 0xb7ec7e23 in call_cfunc (func=0xb7edd417 , recv=3083831040, len=-1211136536, argc=34, argv=0x0) at eval.c:5652 #21 0xb7ed2741 in rb_call0 (klass=, recv=3083831040, id=3937, oid=0, argc=0, argv=0x0, body=0xb7d0f130, flags=) at eval.c:5805 #22 0xb7ed328f in rb_call (klass=3083930780, recv=3083831040, mid=3937, argc=0, argv=0x0, scope=1, self=3083831040) at eval.c:6052 #23 0xb7ecf585 in rb_eval (self=, n=) at eval.c:3451 #24 0xb7ed2095 in rb_eval (self=3083831040, n=) at eval.c:3166 #25 0xb7ed2f49 in rb_call0 (klass=, recv=3083831040, id=10585, oid=0, argc=0, argv=0xbfe930c4, body=0xb7cfe718, flags=) at eval.c:5956 #26 0xb7ed328f in rb_call (klass=3083831940, recv=3083831040, mid=10585, argc=1, argv=0xbfe930c0, scope=1, self=3083831040) at eval.c:6052 ---Type to continue, or q to quit--- #27 0xb7ecf585 in rb_eval (self=, n=) at eval.c:3451 #28 0xb7edacac in block_pass (self=3083831040, node=0xb7cfe128) at eval.c:8809 #29 0xb7ecfcf4 in rb_eval (self=3083831040, n=) at eval.c:3152 #30 0xb7ed2f49 in rb_call0 (klass=, recv=3083831040, id=3825, oid=0, argc=0, argv=0x0, body=0xb7cfe18c, flags=) at eval.c:5956 #31 0xb7ed328f in rb_call (klass=3083842260, recv=3083831040, mid=3825, argc=0, argv=0x0, scope=0, self=3083926000) at eval.c:6052 #32 0xb7ecf2ec in rb_eval (self=3083926000, n=) at eval.c:3436 #33 0xb7ed2095 in rb_eval (self=3083926000, n=) at eval.c:3166 #34 0xb7edcb7d in ruby_exec_internal () at eval.c:1597 #35 0xb7edcbbd in ruby_exec () at eval.c:1617 #36 0xb7edeabc in ruby_run () at eval.c:1627 #37 0x080485dc in main () (gdb) copy: (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7d739a1 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d752b9 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7efd377 in rb_bug (fmt=0x0) at error.c:214 #4 0xb7f668f8 in sigsegv (sig=11) at signal.c:529 #5 #6 0xb7dad696 in malloc_usable_size () from /lib/tls/i686/cmov/ libc.so.6 #7 0xb7dae653 in free () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7db0411 in malloc () from /lib/tls/i686/cmov/libc.so.6 #9 0xb7c293b9 in xmlBufferCreate__internal_alias () at tree.c:6526 #10 0xb7d14771 in ruby_xml_node_to_s_unformatted (self=3084064720) at ruby_xml_node_patch.c:63 #11 0xb7f00e23 in call_cfunc (func=0xb7d14719 , recv=3084064720, len=65, argc=-1210891600, argv=0x0) at eval.c:5652 #12 0xb7f0b741 in rb_call0 (klass=, recv=3084064720, id=3137, oid=3084075700, argc=3, argv=0x0, body=0xb7d3333c, flags=) at eval.c: 5805 #13 0xb7f0c28f in rb_call (klass=3084075700, recv=3084064720, mid=3137, argc=0, argv=0x0, scope=1, self=6) at eval.c:6052 #14 0xb7f0ce77 in vafuncall (recv=3084064720, mid=3137, n=0, ar=0xbfece3a0) at eval.c:6129 #15 0xb7f0cfdf in rb_funcall (recv=3084075700, mid=3084075696, n=65) at eval.c:6146 #16 0xb7f6d09c in rb_obj_as_string (obj=3084064720) at string.c:302 #17 0xb7f08baf in rb_eval (self=3084159480, n=) at eval.c:3798 #18 0xb7f0803e in rb_eval (self=3084159480, n=) at eval.c:3818 #19 0xb7f08503 in rb_eval (self=3084159480, n=) at eval.c:3446 #20 0xb7f15b7d in ruby_exec_internal () at eval.c:1597 #21 0xb7f15bbd in ruby_exec () at eval.c:1617 #22 0xb7f17abc in ruby_run () at eval.c:1627 #23 0x080485dc in main () regards, Piotrek From jochen at remote.org Sun Dec 9 04:30:09 2007 From: jochen at remote.org (Jochen Topf) Date: Sun, 9 Dec 2007 10:30:09 +0100 Subject: [libxml-devel] Sax-Parser: Reading not from file In-Reply-To: References: <20071207093018.GA15001@eldorado.remote.org> Message-ID: <20071209093009.GA2722@eldorado.remote.org> On Fri, Dec 07, 2007 at 07:24:49PM -0500, Todd Fisher wrote: > On Dec 7, 2007 4:30 AM, Jochen Topf wrote: > > I have some rather large XML files which I want to read with the SAX > > parser. Unfortunately it can only read from files or strings, not from > > a Ruby IO stream or so. I want to pipe in the XML file directly from > > a process decompressing the file or use some Ruby lib to do the > > decompression on the fly. > > It doesn't look like it's supported. It could be we'd have to use > xmlParseChunk. It shouldn't be too hard the tricky part would be how to > expose that feature in a easy to use ruby API... Hm. I think we need something the other way round: Whenever the Parser needs more characters to parse, it should call back into Ruby code which will read some bytes from an IO object and give those bytes to the parser. Jochen -- Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298 From danj at 3skel.com Sun Dec 9 09:28:58 2007 From: danj at 3skel.com (Dan Janowski) Date: Sun, 9 Dec 2007 09:28:58 -0500 Subject: [libxml-devel] Sax-Parser: Reading not from file In-Reply-To: <20071209093009.GA2722@eldorado.remote.org> References: <20071207093018.GA15001@eldorado.remote.org> <20071209093009.GA2722@eldorado.remote.org> Message-ID: <7366414F-EB35-406F-8347-952FEE55792E@3skel.com> I have not looked at the IO interfaces for this library, but it seems clear that there should be a good way of passing, or using, a ruby IO stream as a source to the SAX parser. Which forks me to another topic, we need to eval and clean up the task list on rubyforge and seed it with new or reformulated feature/bug tasks we we can manage to get it done. It is also the right place to be attaching patches and requirements. I am starting to loose track of it. Thanks to everyone for your efforts and thoughts. Dan On Dec 9, 2007, at 04:30, Jochen Topf wrote: > > On Fri, Dec 07, 2007 at 07:24:49PM -0500, Todd Fisher wrote: >> On Dec 7, 2007 4:30 AM, Jochen Topf wrote: >>> I have some rather large XML files which I want to read with the SAX >>> parser. Unfortunately it can only read from files or strings, not >>> from >>> a Ruby IO stream or so. I want to pipe in the XML file directly from >>> a process decompressing the file or use some Ruby lib to do the >>> decompression on the fly. >> >> It doesn't look like it's supported. It could be we'd have to use >> xmlParseChunk. It shouldn't be too hard the tricky part would be >> how to >> expose that feature in a easy to use ruby API... > > Hm. I think we need something the other way round: Whenever the > Parser needs > more characters to parse, it should call back into Ruby code which > will read > some bytes from an IO object and give those bytes to the parser. > > Jochen > -- > Jochen Topf jochen at remote.org http://www.remote.org/jochen/ > +49-721-388298 > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From keisukefukuda at gmail.com Mon Dec 10 07:41:00 2007 From: keisukefukuda at gmail.com (keisuke fukuda) Date: Mon, 10 Dec 2007 21:41:00 +0900 Subject: [libxml-devel] Rubyforge's tracker need to be labeled (was: Sax-Parser: Reading not from file) Message-ID: Hi, 2007/12/9, Dan Janowski : >Which forks me to another topic, we need to eval and clean up the task >list on rubyforge and seed it with new or reformulated feature/bug >tasks we we can manage to get it done. It is also the right place to >be attaching patches and requirements. I am starting to loose track of >it. It seems that the tickets on rubyforge's tracker need better labeling. for example, issues about 3.8.x and 5.2.x are together on the list : ( Just adding "Group" label will make the situation much better :-) (I'm not sure, but the "Group" label seems to be indended for version nubmer) Best, -- FUKUDA, Keisuke <福田圭祐> From noreply at rubyforge.org Mon Dec 10 10:29:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 10 Dec 2007 10:29:31 -0500 (EST) Subject: [libxml-devel] [ libxml-Bugs-16214 ] SEGV when add the cloned/copied node Message-ID: <20071210152931.484EE18585B6@rubyforge.org> Bugs item #16214, was opened at 2007-12-10 10:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=16214&group_id=494 Category: memory Group: v0.5 Status: Open Resolution: None Priority: 4 Submitted By: Dan Janowski (danj) Assigned to: Dan Janowski (danj) Summary: SEGV when add the cloned/copied node Initial Comment: Originally appeared on mail list by optyk (2007-11-27). segv appears when use clone and copy methods, what's interesting, with clone segv is thrown in div1.child_add(c) line (see script) but when use copy I get it in printf root statement, moreover copy seems to work wrong only for text nodes, when use 't3' div everything works fine I get this error on 0.5.2.0, 0.5.2.1 and 0.5.2.2 (latest svn) version it looks like fix is required in ruby-libxml code, BTW. it looks also like ruby_xml_node_copy() in ruby_xml_node.c calls xmlCopyNode() with wrong attributes, it should be 2 for shallow copy and 1 for deep copy -------------------- SCRIPT --------------------- require 'xml/libxml' str = <<-STR
werwerwerwerwer
Quisque et diam dapibus nisi bibendum blandit.

aaaaaaaaa

STR XML::Parser.default_keep_blanks = false xp = XML::Parser.new xp.string = str doc = xp.parse xpath = "//div[@id='t1']" div1 = doc.find(xpath).to_a[0] printf "xxx div1: #{div1}\n" xpath = "//div[@id='t2']" div2 = doc.find(xpath).to_a[0] printf "xxx div2: #{div2}\n" div2.each do |child| #c = child.clone c = child.copy(false) div1.child_add(c) end printf "xxx root: #{doc.root}\n" ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=16214&group_id=494 From noreply at rubyforge.org Mon Dec 10 10:37:36 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 10 Dec 2007 10:37:36 -0500 (EST) Subject: [libxml-devel] [ libxml-Bugs-16214 ] SEGV when add the cloned/copied node Message-ID: <20071210153736.54C4F18585B6@rubyforge.org> Bugs item #16214, was opened at 2007-12-10 10:29 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=16214&group_id=494 Category: memory Group: v0.5 Status: Open Resolution: None Priority: 4 Submitted By: Dan Janowski (danj) Assigned to: Dan Janowski (danj) Summary: SEGV when add the cloned/copied node Initial Comment: Originally appeared on mail list by optyk (2007-11-27). segv appears when use clone and copy methods, what's interesting, with clone segv is thrown in div1.child_add(c) line (see script) but when use copy I get it in printf root statement, moreover copy seems to work wrong only for text nodes, when use 't3' div everything works fine I get this error on 0.5.2.0, 0.5.2.1 and 0.5.2.2 (latest svn) version it looks like fix is required in ruby-libxml code, BTW. it looks also like ruby_xml_node_copy() in ruby_xml_node.c calls xmlCopyNode() with wrong attributes, it should be 2 for shallow copy and 1 for deep copy -------------------- SCRIPT --------------------- require 'xml/libxml' str = <<-STR
werwerwerwerwer
Quisque et diam dapibus nisi bibendum blandit.

aaaaaaaaa

STR XML::Parser.default_keep_blanks = false xp = XML::Parser.new xp.string = str doc = xp.parse xpath = "//div[@id='t1']" div1 = doc.find(xpath).to_a[0] printf "xxx div1: #{div1}\n" xpath = "//div[@id='t2']" div2 = doc.find(xpath).to_a[0] printf "xxx div2: #{div2}\n" div2.each do |child| #c = child.clone c = child.copy(false) div1.child_add(c) end printf "xxx root: #{doc.root}\n" ---------------------------------------------------------------------- >Comment By: Dan Janowski (danj) Date: 2007-12-10 10:37 Message: keisuke fukuda submitted a patch for this problem which I have carefully examined. The given patcch fixes the problem by creating an unintended consequence, by always copying text nodes. However, the real cause of the problem is more subtle and has to do with merging of text nodes when the parent node already has an associated text node. Since we cannot have a text node that is mapped into ruby simply disappear, they do always need to be copied. However, a few additional conditions needed to be handled. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=16214&group_id=494 From danj at 3skel.com Mon Dec 10 13:01:07 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 10 Dec 2007 13:01:07 -0500 Subject: [libxml-devel] Rubyforge's tracker need to be labeled (was: Sax-Parser: Reading not from file) In-Reply-To: References: Message-ID: <44EE2263-CE6F-403C-9BAF-986CA5916847@3skel.com> Keisuke, I just modified and added in the groups. There is pre-0.5 for all the old stuff and 0.5 for current issues. There is also a catagory 'memory' for issues relating to SEGV and such. I am open to all suggestions on other categories or ways to improved the bug stream. Dan On Dec 10, 2007, at 07:41, keisuke fukuda wrote: > Hi, > > 2007/12/9, Dan Janowski : >> Which forks me to another topic, we need to eval and clean up the >> task >> list on rubyforge and seed it with new or reformulated feature/bug >> tasks we we can manage to get it done. It is also the right place to >> be attaching patches and requirements. I am starting to loose track >> of >> it. > > It seems that the tickets on rubyforge's tracker need better labeling. > for example, issues about 3.8.x and 5.2.x are together on the list : ( > > Just adding "Group" label will make the situation much better :-) > (I'm not sure, but the "Group" label seems to be indended for > version nubmer) > > > Best, > -- > FUKUDA, Keisuke <福田圭祐> > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From keisukefukuda at gmail.com Mon Dec 10 22:48:15 2007 From: keisukefukuda at gmail.com (keisuke fukuda) Date: Tue, 11 Dec 2007 12:48:15 +0900 Subject: [libxml-devel] Rubyforge's tracker need to be labeled (was: Sax-Parser: Reading not from file) In-Reply-To: <44EE2263-CE6F-403C-9BAF-986CA5916847@3skel.com> References: <44EE2263-CE6F-403C-9BAF-986CA5916847@3skel.com> Message-ID: Thank you, Dan ! :-) Best, -- FUKUDA, Keisuke <福田圭祐> http://d.hatena.ne.jp/keisukefukuda/ From hjw3001 at gmail.com Sun Dec 16 22:18:05 2007 From: hjw3001 at gmail.com (Henry Wagner) Date: Sun, 16 Dec 2007 19:18:05 -0800 Subject: [libxml-devel] Problems installing libxml-ruby on OS X 10.3 Message-ID: <5272bc840712161918u7b564961ifc1cf8c20596c720@mail.gmail.com> Hi, I'm running into some errors installing libxml-ruby on OS X 10.3.9. I'm using ruby 1.8.6 Gonk:~/Desktop apple$ 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... 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. What are all the "no" lines about? I appear to have the 4 prerequest libraries installed. Henry From danj at 3skel.com Mon Dec 17 11:40:04 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 17 Dec 2007 11:40:04 -0500 Subject: [libxml-devel] Problems installing libxml-ruby on OS X 10.3 In-Reply-To: <5272bc840712161918u7b564961ifc1cf8c20596c720@mail.gmail.com> References: <5272bc840712161918u7b564961ifc1cf8c20596c720@mail.gmail.com> Message-ID: <5A107FE8-4187-4D8B-968E-9248BF1646FB@3skel.com> What does the mkmf.log contain? On Dec 16, 2007, at 22:18, Henry Wagner wrote: > Hi, > > I'm running into some errors installing libxml-ruby on OS X 10.3.9. > I'm using ruby 1.8.6 > > Gonk:~/Desktop apple$ 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... 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. > > What are all the "no" lines about? I appear to have the 4 prerequest > libraries installed. > > Henry > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From simon.wilkinson at 434wireless.com Mon Dec 17 18:47:42 2007 From: simon.wilkinson at 434wireless.com (simon.wilkinson at 434wireless.com) Date: Mon, 17 Dec 2007 18:47:42 -0500 Subject: [libxml-devel] memory leak? Message-ID: <25745100.802431197935262309.JavaMail.servlet@perfora> Hi, I have an application that reads a listing of files from a directory, and then uses libxml-ruby (using XPath) to parse the files. This occurs in a loop, picking up new files as they are added. Over time, memory really grows on the process doing this work. Are there any known memory issues with the gem, or with using XPath to do parsing? Thanks, Simon From danj at 3skel.com Mon Dec 17 20:26:11 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 17 Dec 2007 20:26:11 -0500 Subject: [libxml-devel] memory leak? In-Reply-To: <25745100.802431197935262309.JavaMail.servlet@perfora> References: <25745100.802431197935262309.JavaMail.servlet@perfora> Message-ID: Depends on the version you are running. ruby -e 'require "xml/libxml"; puts XML::Parser::VERSION' On Dec 17, 2007, at 18:47, simon.wilkinson at 434wireless.com wrote: > Hi, > > I have an application that reads a listing of files from a > directory, and then uses libxml-ruby (using XPath) to parse the > files. This occurs in a loop, picking up new files as they are > added. Over time, memory really grows on the process doing this > work. Are there any known memory issues with the gem, or with using > XPath to do parsing? > > Thanks, > > Simon > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From hjw3001 at gmail.com Mon Dec 17 21:38:31 2007 From: hjw3001 at gmail.com (Henry Wagner) Date: Mon, 17 Dec 2007 18:38:31 -0800 Subject: [libxml-devel] Problems installing libxml-ruby on OS X 10.3 In-Reply-To: <5A107FE8-4187-4D8B-968E-9248BF1646FB@3skel.com> References: <5272bc840712161918u7b564961ifc1cf8c20596c720@mail.gmail.com> <5A107FE8-4187-4D8B-968E-9248BF1646FB@3skel.com> Message-ID: <5272bc840712171838w72c144benb121cc4f3878f609@mail.gmail.com> I made some progress. I didn't have gcc installed on the machine. Now I get further but still have trouble. I've attached mkmf.log Henry On 12/17/07, Dan Janowski wrote: > What does the mkmf.log contain? > > On Dec 16, 2007, at 22:18, Henry Wagner wrote: > > > Hi, > > > > I'm running into some errors installing libxml-ruby on OS X 10.3.9. > > I'm using ruby 1.8.6 > > > > Gonk:~/Desktop apple$ 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... 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. > > > > What are all the "no" lines about? I appear to have the 4 prerequest > > libraries installed. > > > > Henry > > _______________________________________________ > > 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 > -- Henry http://www.henrywagner.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mkmf.log Type: application/octet-stream Size: 11978 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20071217/06537051/attachment-0001.obj From danj at 3skel.com Mon Dec 17 22:46:51 2007 From: danj at 3skel.com (Dan Janowski) Date: Mon, 17 Dec 2007 22:46:51 -0500 Subject: [libxml-devel] Problems installing libxml-ruby on OS X 10.3 In-Reply-To: <5272bc840712171838w72c144benb121cc4f3878f609@mail.gmail.com> References: <5272bc840712161918u7b564961ifc1cf8c20596c720@mail.gmail.com> <5A107FE8-4187-4D8B-968E-9248BF1646FB@3skel.com> <5272bc840712171838w72c144benb121cc4f3878f609@mail.gmail.com> Message-ID: Maybe it is a rather old version of libxml2. On Dec 17, 2007, at 21:38, Henry Wagner wrote: > I made some progress. I didn't have gcc installed on the machine. Now > I get further but still have trouble. I've attached mkmf.log > > Henry > > On 12/17/07, Dan Janowski wrote: >> What does the mkmf.log contain? >> >> On Dec 16, 2007, at 22:18, Henry Wagner wrote: >> >>> Hi, >>> >>> I'm running into some errors installing libxml-ruby on OS X 10.3.9. >>> I'm using ruby 1.8.6 >>> >>> Gonk:~/Desktop apple$ 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... 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. >>> >>> What are all the "no" lines about? I appear to have the 4 prerequest >>> libraries installed. >>> >>> Henry >>> _______________________________________________ >>> 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 >> > > > -- > Henry > http://www.henrywagner.org/ > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From simon.wilkinson at 434wireless.com Tue Dec 18 08:49:06 2007 From: simon.wilkinson at 434wireless.com (simon.wilkinson at 434wireless.com) Date: Tue, 18 Dec 2007 08:49:06 -0500 Subject: [libxml-devel] memory leak? Message-ID: <11347720.10091197985746534.JavaMail.servlet@perfora> I am running version 0.5.2.0. Simon Depends on the version you are running. ruby -e 'require "xml/libxml"; puts XML::Parser::VERSION' On Dec 17, 2007, at 18:47, simon.wilkinson at 434wireless.com wrote: > Hi, > > I have an application that reads a listing of files from a > directory, and then uses libxml-ruby (using XPath) to parse the > files. This occurs in a loop, picking up new files as they are > added. Over time, memory really grows on the process doing this > work. Are there any known memory issues with the gem, or with using > XPath to do parsing? > > Thanks, > > Simon > _______________________________________________ > 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 danj at 3skel.com Tue Dec 18 08:56:45 2007 From: danj at 3skel.com (Dan Janowski) Date: Tue, 18 Dec 2007 08:56:45 -0500 Subject: [libxml-devel] memory leak? In-Reply-To: <11347720.10091197985746534.JavaMail.servlet@perfora> References: <11347720.10091197985746534.JavaMail.servlet@perfora> Message-ID: <12508024-542D-4975-AEEF-3CBD49EE7EC2@3skel.com> That version has all of the really bad leaks taken care of. There is a more recent version in SVN, but it is not in an RC state, which may be a few more days. It has a few more fixes, including some to XPath. I'll announce the update, hopefully soon. Dan On Dec 18, 2007, at 08:49, simon.wilkinson at 434wireless.com wrote: > I am running version 0.5.2.0. > > Simon > > Depends on the version you are running. > > ruby -e 'require "xml/libxml"; puts XML::Parser::VERSION' > > On Dec 17, 2007, at 18:47, simon.wilkinson at 434wireless.com wrote: > >> Hi, >> >> I have an application that reads a listing of files from a >> directory, and then uses libxml-ruby (using XPath) to parse the >> files. This occurs in a loop, picking up new files as they are >> added. Over time, memory really grows on the process doing this >> work. Are there any known memory issues with the gem, or with using >> XPath to do parsing? >> >> Thanks, >> >> Simon >> _______________________________________________ >> 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 > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From tecumtah at gmail.com Sun Dec 30 18:25:29 2007 From: tecumtah at gmail.com (Tec) Date: Mon, 31 Dec 2007 00:25:29 +0100 Subject: [libxml-devel] require 'xml/libxslt' produces undefined symbol error on ubuntu linux Message-ID: <995101b90712301525y315f1c85vcf8c7e7cdacbc829@mail.gmail.com> Hello everybody, I am trying to use libxsl-ruby on my ubuntu machine, but I seem to be doing something wrong. I installed both libxml-ruby and libxsl-ruby and the example code from the libxml readme works fine. Unfortunately the libxsl readme example code (the usage example from http://libxsl.rubyforge.org/) produces following error: ruby fuzface.rb /usr/lib/ruby/gems/1.8/gems/libxslt-ruby-0.3.6/ext/xml/libxslt.so: /usr/lib/ruby/gems/1.8/gems/libxslt- ruby-0.3.6/ext/xml/libxslt.so: undefined symbol: ruby_xml_parser_count - /usr/lib/ruby/gems/1.8/gems/libxslt-ruby-0.3.6/ext/xml/libxslt.so (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' from fuzface.rb:3 Line three of fuzface.rb is require 'xml/libxslt' I tried to install using gem and rake, but both produced the same error. Maybe I am running incompatible versions of the two bindings? gem automatically chose following versions: sudo gem install libxml-ruby Successfully installed libxml-ruby-0.5.2.0 sudo gem install libxslt-ruby Successfully installed libxslt-ruby-0.3.6 ruby -v ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] dpkg -l libxml2 ii libxml2 2.6.30.dfsg-2u GNOME XML library ii libxml2-dev 2.6.30.dfsg-2u Development files for the GNOME XML library dpkg -l libxslt1* ii libxslt1-dev 1.1.21-2ubuntu XSLT processing library - development kit ii libxslt1.1 1.1.21-2ubuntu XSLT processing library - runtime library I appreciate any hints pointing me to my mistakes. Thanks, Silvan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20071231/3fded564/attachment.html From transfire at gmail.com Sun Dec 30 19:25:00 2007 From: transfire at gmail.com (Trans) Date: Sun, 30 Dec 2007 19:25:00 -0500 Subject: [libxml-devel] require 'xml/libxslt' produces undefined symbol error on ubuntu linux In-Reply-To: <995101b90712301525y315f1c85vcf8c7e7cdacbc829@mail.gmail.com> References: <995101b90712301525y315f1c85vcf8c7e7cdacbc829@mail.gmail.com> Message-ID: <4b6f054f0712301625i6a188a82p5ca6311cf8f271f@mail.gmail.com> On Dec 30, 2007 6:25 PM, Tec wrote: > Hello everybody, > > I am trying to use libxsl-ruby on my ubuntu machine, but I seem to be doing > something wrong. > I installed both libxml-ruby and libxsl-ruby and the example code from the > libxml readme works fine. > Unfortunately the libxsl readme example code (the usage example from > http://libxsl.rubyforge.org/) produces following error: > > ruby fuzface.rb > /usr/lib/ruby/gems/1.8/gems/libxslt-ruby-0.3.6/ext/xml/libxslt.so: > /usr/lib/ruby/gems/1.8/gems/libxslt- ruby-0.3.6/ext/xml/libxslt.so: > undefined symbol: ruby_xml_parser_count - > /usr/lib/ruby/gems/1.8/gems/libxslt-ruby-0.3.6/ext/xml/libxslt.so > (LoadError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in > `require' > from fuzface.rb:3 > > Line three of fuzface.rb is > require 'xml/libxslt' > > I tried to install using gem and rake, but both produced the same error. > Maybe I am running incompatible versions of the two bindings? gem > automatically chose following versions: > > sudo gem install libxml-ruby > Successfully installed libxml-ruby-0.5.2.0 > > sudo gem install libxslt-ruby > Successfully installed libxslt-ruby-0.3.6 > > ruby -v > ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] > > dpkg -l libxml2 > ii libxml2 2.6.30.dfsg-2u GNOME XML library > ii libxml2-dev 2.6.30.dfsg-2u Development files for the GNOME XML > library > > dpkg -l libxslt1* > ii libxslt1-dev 1.1.21-2ubuntu XSLT processing library - development kit > ii libxslt1.1 1.1.21-2ubuntu XSLT processing library - runtime library > > > I appreciate any hints pointing me to my mistakes. For right now you should use the svn repo, and setup manually. I'll get a new release out after the holidays --promise. T. From wycats at gmail.com Wed Dec 19 05:50:31 2007 From: wycats at gmail.com (Yehuda Katz) Date: Wed, 19 Dec 2007 02:50:31 -0800 (PST) Subject: [libxml-devel] xpath searching without specifying namespace? In-Reply-To: <4b6f054f0711280607x630ec2bdi62eea0caa7c85bbb@mail.gmail.com> References: <68EF391F-3D09-4B98-A4FC-D443D0AB77E1@3skel.com> <059D1CA6-7495-44DA-9356-AF02FDB0EEC5@3skel.com> <4b6f054f0711280607x630ec2bdi62eea0caa7c85bbb@mail.gmail.com> Message-ID: <1edf40a2-2ac7-4019-8267-45bbd744b044@e25g2000prg.googlegroups.com> 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