From explosiv0SX at datafront.com Fri Feb 17 17:03:40 2006 From: explosiv0SX at datafront.com (Explosiv0SX) Date: Fri, 17 Feb 2006 17:03:40 -0500 Subject: [libxml-devel] building libxml on os x Message-ID: After banging at this all day, I finally realized why libxml.bundle won't compile on OS X. Simply remove the -fno-common flag from the CFLAGS variable after you generate the Makefile with ruby extconf.rb. Compiles, links, and brings me joy! Keep up the great work! Rick From rosco at roscopeco.co.uk Sun Feb 19 00:17:10 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 19 Feb 2006 05:17:10 -0000 Subject: [libxml-devel] Attribute fix? Message-ID: Hi, The following seems to fix the problems I discussed before, doesn't break any tests. I'd like to get a sanity check on it though, rather than just committing it, because I've not had much time to spend getting used to libxml still... Index: ruby_xml_attr.c =================================================================== RCS file: /var/cvs/libxml/libxml/ruby_xml_attr.c,v retrieving revision 1.2 diff -u -r1.2 ruby_xml_attr.c --- ruby_xml_attr.c 2 Jan 2006 23:19:21 -0000 1.2 +++ ruby_xml_attr.c 19 Feb 2006 05:03:06 -0000 @@ -166,11 +166,11 @@ ruby_xml_attr *rxa; rxa = ALLOC(ruby_xml_attr); - rxa->attr = attr; + rxa->attr = xmlCopyProp(attr->parent, attr); rxa->xd = xd; - rxa->is_ptr = 1; + rxa->is_ptr = 0; return(Data_Wrap_Struct(class, ruby_xml_attr_mark, - ruby_xml_attr_free, rxa)); + ruby_xml_attr_free, rxa)); } Index: ruby_xml_node.c =================================================================== RCS file: /var/cvs/libxml/libxml/ruby_xml_node.c,v retrieving revision 1.3 diff -u -r1.3 ruby_xml_node.c --- ruby_xml_node.c 2 Jan 2006 23:19:21 -0000 1.3 +++ ruby_xml_node.c 19 Feb 2006 05:03:09 -0000 @@ -1568,16 +1568,21 @@ ruby_xml_node_property_get(VALUE self, VALUE prop) { ruby_xml_node *rxn; xmlChar *p; - + VALUE r; + Check_Type(prop, T_STRING); Data_Get_Struct(self, ruby_xml_node, rxn); p = xmlGetProp(rxn->node, (xmlChar*)StringValuePtr(prop)); if (p == NULL) - return(Qnil); - else - return(rb_str_new2((const char*)p)); + r = Qnil; + else { + r = rb_str_new2((const char*)p); + xmlFree(p); + } + + return r; } @@ -1626,7 +1631,7 @@ if (node->node->type == XML_ELEMENT_NODE) { attr = node->node->properties; - return(ruby_xml_attr_new(cXMLAttr, node->xd, attr)); + return(ruby_xml_attr_new2(cXMLAttr, node->xd, attr)); } else { return(Qnil); } -- Ross Bamford - rosco at roscopeco.co.uk From sean at gigave.com Sun Feb 19 15:33:26 2006 From: sean at gigave.com (Sean Chittenden) Date: Sun, 19 Feb 2006 12:33:26 -0800 Subject: [libxml-devel] Attribute fix? In-Reply-To: References: Message-ID: <20060219203326.GB24308@mailhost.gigave.com> > The following seems to fix the problems I discussed before, doesn't break > any tests. I'd like to get a sanity check on it though, rather than just > committing it, because I've not had much time to spend getting used to > libxml still... Looks sane to me, you changed the object from a shadow object and are passing around a copy that can be free(3)'ed when the object is destroyed. -sc -- Sean Chittenden From rosco at roscopeco.co.uk Mon Feb 20 06:34:03 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 20 Feb 2006 11:34:03 -0000 Subject: [libxml-devel] Attribute fix? In-Reply-To: <20060219203328.33294216E02@mailhost.gigave.com> References: <20060219203328.33294216E02@mailhost.gigave.com> Message-ID: On Sun, 19 Feb 2006 20:33:26 -0000, Sean Chittenden wrote: >> The following seems to fix the problems I discussed before, doesn't >> break >> any tests. I'd like to get a sanity check on it though [...] > > Looks sane to me [...] Okay thanks, I've committed it just now. I think with that fixed, it might be worth thinking about getting that release out? Cheers, -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Mon Feb 20 07:09:18 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 20 Feb 2006 12:09:18 -0000 Subject: [libxml-devel] building libxml on os x In-Reply-To: References: Message-ID: On Fri, 17 Feb 2006 22:03:40 -0000, Explosiv0SX wrote: > After banging at this all day, I finally realized why libxml.bundle > won't compile on OS X. Simply remove the -fno-common flag from the > CFLAGS variable after you generate the Makefile with ruby extconf.rb. > Compiles, links, and brings me joy! > Thanks :) I'm not sure why that flag is being used, presumably it's used to build Ruby itself on OSX...? Accepting that we don't have much opportunity for experimenting on OSX right now, I wonder if we could just hack this for now, something like: if RUBY_PLATFORM == ??whatgoeshere?? mf = File.read('Makefile') File.open('Makefile','w+') do |f| f << mf.gsub(/^CFLAGS\s+=\s+(.*)/) { "CFLAGS = #{$1.gsub('-fno-common','')}" } end end at the end of extconf.rb? -- Ross Bamford - rosco at roscopeco.co.uk From explosiv0SX at datafront.com Tue Feb 21 00:16:45 2006 From: explosiv0SX at datafront.com (Explosiv0SX) Date: Tue, 21 Feb 2006 00:16:45 -0500 Subject: [libxml-devel] building libxml on os x In-Reply-To: References: Message-ID: <0D91CA94-0924-40E9-8632-63F773D572F1@datafront.com> Ross, This should take care of this OS X compilation issue for now. I'm still not sure why -fno-common is causing issues, but your extension now builds without problems on my Macs. if RUBY_PLATFORM =~ /darwin/ mf = File.read('Makefile') File.open('Makefile','w+') do |f| f << mf.gsub(/^CFLAGS\s+=\s+(.*)/) { "CFLAGS = #{$1.gsub('-fno- common','')}" } end end I also made a change to the ruby_xml_schema_init_from_uri function in ruby_xml_schema.c to get schema validation going. The patch is included below -- please check my code, as I have just started working with the Ruby extension mechanism. It's nice to now have some xml validation in Ruby... Thanks! Rick --- libxml.1/libxml/ruby_xml_schema.c 2006-01-02 18:19:21.000000000 -0500 +++ ruby_xml_schema.c 2006-02-19 20:49:58.000000000 -0500 @@ -26,23 +26,22 @@ */ VALUE ruby_xml_schema_init_from_uri(int argc, VALUE *argv, VALUE class) { - VALUE uri; - xmlSchemaParserCtxtPtr parser; - xmlSchemaPtr sptr; - - switch (argc) { - case 1: - rb_scan_args(argc, argv, "10", &uri); - - Check_Type(uri, T_STRING); - - parser = xmlSchemaNewParserCtxt(StringValuePtr(uri)); - sptr = xmlSchemaParse(parser); - xmlSchemaFreeParserCtxt(parser); - break; - default: - rb_raise(rb_eArgError, "wrong number of arguments (need 1)"); - } + VALUE uri; + xmlSchemaParserCtxtPtr parser; + ruby_xml_schema *rxschema; + + switch (argc) { + case 1: + rb_scan_args(argc, argv, "10", &uri); + Check_Type(uri, T_STRING); + parser = xmlSchemaNewParserCtxt(StringValuePtr(uri)); + rxschema = ALLOC(ruby_xml_schema); + rxschema->schema = xmlSchemaParse(parser); + xmlSchemaFreeParserCtxt(parser); + return(Data_Wrap_Struct(cXMLSchema, ruby_xml_schema_mark, ruby_xml_schema_free, rxschema)); + default: + rb_raise(rb_eArgError, "wrong number of arguments (need 1)"); + } return Qnil; } On Feb 20, 2006, at 7:09 AM, Ross Bamford wrote: > On Fri, 17 Feb 2006 22:03:40 -0000, Explosiv0SX > wrote: > >> After banging at this all day, I finally realized why libxml.bundle >> won't compile on OS X. Simply remove the -fno-common flag from the >> CFLAGS variable after you generate the Makefile with ruby extconf.rb. >> Compiles, links, and brings me joy! >> > > Thanks :) > > I'm not sure why that flag is being used, presumably it's used to > build > Ruby itself on OSX...? > > Accepting that we don't have much opportunity for experimenting on OSX > right now, I wonder if we could just hack this for now, something > like: > > if RUBY_PLATFORM == ??whatgoeshere?? > mf = File.read('Makefile') > File.open('Makefile','w+') do |f| > f << mf.gsub(/^CFLAGS\s+=\s+(.*)/) { "CFLAGS = > #{$1.gsub('-fno-common','')}" } > end > end > > at the end of extconf.rb? > > -- > Ross Bamford - rosco at roscopeco.co.uk > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From rosco at roscopeco.co.uk Tue Feb 21 05:53:57 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Tue, 21 Feb 2006 10:53:57 -0000 Subject: [libxml-devel] building libxml on os x In-Reply-To: <0D91CA94-0924-40E9-8632-63F773D572F1@datafront.com> References: <0D91CA94-0924-40E9-8632-63F773D572F1@datafront.com> Message-ID: On Tue, 21 Feb 2006 05:16:45 -0000, Explosiv0SX wrote: >> [OSX build fix] > > This should take care of this OS X compilation issue for now. I'm > still not sure why -fno-common is causing issues, but your extension > now builds without problems on my Macs. > Cool, I've just committed that in as an interim measure. I guess in the end we'll need to look into this but for now it's nice to have some OSXability. Thanks again for that :) > > I also made a change to the ruby_xml_schema_init_from_uri function in > ruby_xml_schema.c to get schema validation going. The patch is > included below -- please check my code, as I have just started > working with the Ruby extension mechanism. It's nice to now have some > xml validation in Ruby... > Well, thanks again, again :) I'll hold your patch along with another feature patch we have, I think the plan is to get a ground-zero release with fixes only, and then start working on new stuff (or finishing old stuff) once that's out the door. Cheers, -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Tue Feb 21 09:12:22 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Tue, 21 Feb 2006 14:12:22 -0000 Subject: [libxml-devel] Gem packaging Message-ID: Hi, I've been working on getting version number management and gem packaging into the Rakefile, which is working pretty well so far, except for one hiccup - it appears that we can't keep the 'xml/libxml' namespace under gems without rearranging the project so that all the code is in an 'xml' directory in the project root. I think the options are: * Stick as it is, if you install by hand you need 'xml/libxml' but under gems you need 'libxml'. Bad idea IMHO. * Drop the 'xml' prefix in the makefile, so that no matter how you install you need 'libxml'. * Do the rearranging, keeping 'xml/libxml' everywhere but needing more work creating and maintaining a top-level makefile setup (or something) for those installing by hand. I know the second might not seem like a good idea, but I think in this case, given that there aren't other libxml bindings for Ruby, and that xml/libxml has some redundancy, maybe it's worth considering. Perhaps though it'd need to be changed to 'libxml2' to avoid confusion. Any thoughts? Cheers, -- Ross Bamford - rosco at roscopeco.co.uk From explosiv0SX at datafront.com Tue Feb 21 09:48:55 2006 From: explosiv0SX at datafront.com (Explosiv0SX) Date: Tue, 21 Feb 2006 09:48:55 -0500 Subject: [libxml-devel] Gem packaging In-Reply-To: References: Message-ID: <256B643F-6AA8-4437-8EA5-0895F3043543@datafront.com> I vote for second option with the libxml2 name. Rick On Feb 21, 2006, at 9:12 AM, Ross Bamford wrote: > Hi, > > I've been working on getting version number management and gem > packaging > into the Rakefile, which is working pretty well so far, except for one > hiccup - it appears that we can't keep the 'xml/libxml' namespace > under > gems without rearranging the project so that all the code is in an > 'xml' > directory in the project root. > > I think the options are: > > * Stick as it is, if you install by hand you need 'xml/libxml' > but under gems you need 'libxml'. Bad idea IMHO. > > * Drop the 'xml' prefix in the makefile, so that no matter how > you install you need 'libxml'. > > * Do the rearranging, keeping 'xml/libxml' everywhere but needing > more work creating and maintaining a top-level makefile setup > (or something) for those installing by hand. > > I know the second might not seem like a good idea, but I think in this > case, given that there aren't other libxml bindings for Ruby, and that > xml/libxml has some redundancy, maybe it's worth considering. Perhaps > though it'd need to be changed to 'libxml2' to avoid confusion. > > Any thoughts? > > Cheers, > -- > Ross Bamford - rosco at roscopeco.co.uk > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From sean at gigave.com Tue Feb 21 14:26:39 2006 From: sean at gigave.com (Sean Chittenden) Date: Tue, 21 Feb 2006 11:26:39 -0800 Subject: [libxml-devel] Gem packaging In-Reply-To: References: Message-ID: <20060221192639.GZ17911@mailhost.gigave.com> > I've been working on getting version number management and gem > packaging into the Rakefile, which is working pretty well so far, > except for one hiccup - it appears that we can't keep the > 'xml/libxml' namespace under gems without rearranging the project so > that all the code is in an 'xml' directory in the project root. > > I think the options are: > > * Stick as it is, if you install by hand you need 'xml/libxml' > but under gems you need 'libxml'. Bad idea IMHO. > > * Drop the 'xml' prefix in the makefile, so that no matter how > you install you need 'libxml'. > > * Do the rearranging, keeping 'xml/libxml' everywhere but > needing more work creating and maintaining a top-level > makefile setup (or something) for those installing by hand. > > I know the second might not seem like a good idea, but I think in > this case, given that there aren't other libxml bindings for Ruby, > and that xml/libxml has some redundancy, maybe it's worth > considering. Perhaps though it'd need to be changed to 'libxml2' to > avoid confusion. Ugh, the ugliness of gems rears its head again. Ruby's flat module space is going to be a problem at some point. The reason for xml/libxml was to subdivide the module namespace into functional groups. For instance, on the xsl front, libxslt is accessed via 'xml/libxslt'. I'm not married to this notion, but it'll be an ugly barrier at some point for the language to cross and is one of the niceties of Perl, by comparison. rexml, should be xml/rexml or some such nonsense... but "should" doesn't carry much weight. I wouldn't object to stashing everything in a subdirectory of xml/ as a hack around for the limitations of gems. *shrug* -- Sean Chittenden From rosco at roscopeco.co.uk Tue Feb 21 14:40:09 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Tue, 21 Feb 2006 19:40:09 -0000 Subject: [libxml-devel] Gem packaging In-Reply-To: <20060221192640.6EB49216C21@mailhost.gigave.com> References: <20060221192640.6EB49216C21@mailhost.gigave.com> Message-ID: On Tue, 21 Feb 2006 19:26:39 -0000, Sean Chittenden wrote: >> I've been working on getting version number management and gem >> packaging into the Rakefile, which is working pretty well so far, >> except for one hiccup - it appears that we can't keep the >> 'xml/libxml' namespace under gems without rearranging the project so >> that all the code is in an 'xml' directory in the project root. >> > I wouldn't object to stashing everything in a subdirectory of xml/ as > a hack around for the limitations of gems. *shrug* > Okay, I'm on it. It'll probably be something like ext/xml/*.c in the source, with the gemspec libpath set to ext, and make install working as now. That way we avoid pulling in 'tests' and what not into the load path when running under gems. -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Tue Feb 21 15:59:12 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Tue, 21 Feb 2006 20:59:12 -0000 Subject: [libxml-devel] Gem packaging In-Reply-To: References: <20060221192640.6EB49216C21@mailhost.gigave.com> Message-ID: On Tue, 21 Feb 2006 19:40:09 -0000, Ross Bamford wrote: > On Tue, 21 Feb 2006 19:26:39 -0000, Sean Chittenden > wrote: > >> I wouldn't object to stashing everything in a subdirectory of xml/ as >> a hack around for the limitations of gems. *shrug* >> > > Okay, I'm on it. It'll probably be something like ext/xml/*.c in the > source, with the gemspec libpath set to ext, and make install working as > now. That way we avoid pulling in 'tests' and what not into the load path > when running under gems. > I've rearranged stuff and committed the changes, it now builds, tests, installs normally, packages and installs as a gem, with 'xml/libxml' as the require. I've expanded the Rakefile, and it now can handle almost everything (calling out to make for the actual building of course). There are packaging tasks in there, and a release task that handles version number management. I've removed the Rubynet utility stuff now that's done. I didn't hook the release task up to CVS or web upload yet, we'll still have to 'do' releases, there's only so much automation I can take in one day ;D -- Ross Bamford - rosco at roscopeco.co.uk From mcix at gmx.net Wed Feb 22 05:55:15 2006 From: mcix at gmx.net (mcix@gmx.net) Date: Wed, 22 Feb 2006 11:55:15 +0100 (MET) Subject: [libxml-devel] (no subject) Message-ID: <19756.1140605715@www087.gmx.net> Hi, I am writing an article about XML validation using your libxml for ruby. I have 2 questions: 1 - How does it relate with the libxml from http://xml-tools.rubyforge.org 2 - it seems that you are going to relase it as ruby gem. Is it true? If it is, by when? Thanks for the nice work you are doing. Mauro -- mailto:mauro at cicio.org -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner From rosco at roscopeco.co.uk Thu Feb 23 05:32:49 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Thu, 23 Feb 2006 10:32:49 -0000 Subject: [libxml-devel] (no subject) In-Reply-To: <19756.1140605715@www087.gmx.net> References: <19756.1140605715@www087.gmx.net> Message-ID: Hi there, On Wed, 22 Feb 2006 10:55:15 -0000, wrote: > I am writing an article about XML validation using your libxml for ruby. > Cool, look forward to that :) > I have 2 questions: > > 1 - How does it relate with the libxml from > http://xml-tools.rubyforge.org The code we're now working on in libxml.rubyforge.org is based off of the xml-tools code, which came from Sean's original codebase. When we started the current effort to bring libxml-ruby 'back from the dead' we took the xml-tools code and fixed up some code-rot / critical bugs, to become the libxml.rubyforge.org project. (Maybe we should see about getting a notice of some kind posted on xml-tools website about this). > 2 - it seems that you are going to relase it as ruby gem. > Is it true? If it is, by when? > It most certainly is, and as soon as possible. Earlier this week we squashed a critical bug we were holding back for, and I took some time to implement a fuller Rake build and gem packaging. Currently, in CVS head, gem packaging is in and working (type 'rake release') so with any luck (barring new critical bugs ;)) we should have a release with gem installation in the *very* near future (this week/next week). Cheers, -- Ross Bamford - rosco at roscopeco.co.uk From joe.rice at mercurymd.com Thu Feb 23 18:27:41 2006 From: joe.rice at mercurymd.com (Joe Rice) Date: Thu, 23 Feb 2006 18:27:41 -0500 Subject: [libxml-devel] Zlib on windows problem Message-ID: <8A2F25E15E39D9409B45F57EBB2443AF6E1A8F@EXCHANGE1.MERCURYMD.RTP> I am trying to move away from REXML because of performance problems on larger files. I've been trying to get the libxml-ruby project to work but when I try the gem install libxml-ruby command it fails because I need zlib. I'm running on Windows with ruby 1.8.4. Can anyone point me in the direction of any information that would help me get zlib installed/working on a windows box? Thanks in advance, Joe Rice -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20060223/4a026c64/attachment.htm From rosco at roscopeco.co.uk Fri Feb 24 04:47:20 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Fri, 24 Feb 2006 09:47:20 -0000 Subject: [libxml-devel] Zlib on windows problem In-Reply-To: <8A2F25E15E39D9409B45F57EBB2443AF6E1A8F@EXCHANGE1.MERCURYMD.RTP> References: <8A2F25E15E39D9409B45F57EBB2443AF6E1A8F@EXCHANGE1.MERCURYMD.RTP> Message-ID: On Thu, 23 Feb 2006 23:27:41 -0000, Joe Rice wrote: > I am trying to move away from REXML because of performance problems on > larger files. I've been trying to get the libxml-ruby project to work > but when I try the gem install libxml-ruby command it fails because I > need zlib. I'm running on Windows with ruby 1.8.4. Can anyone point me > in the direction of any information that would help me get zlib > installed/working on a windows box? Looking around a bit, it seems like these might be useful to you: http://www.winimage.com/zLibDll/ http://gnuwin32.sourceforge.net/packages/zlib.htm http://www.zlib.net/DLL_FAQ.txt I guess you'll need to source distribution, since you're going to need zlib.h . I'm afraid I don't know how any of this works on Windows but there does seem to be a decent amount of documentation that may help. -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Sat Feb 25 19:34:08 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 26 Feb 2006 00:34:08 -0000 Subject: [libxml-devel] Fwd: Re: [ANN] LibXML-Ruby 0.3.6 (from ruby-talk) Message-ID: Hi, Can anyone tell me, does this look right? On Sun, 2006-02-26 at 00:31 +0000, Ross Bamford wrote: > On Sun, 2006-02-26 at 08:04 +0900, Daniel Harple wrote: > > On Feb 23, 2006, at 8:32 PM, Ross Bamford wrote: > > > LibXML-Ruby 0.3.6 is now available from Rubyforge > >> I am having some trouble with building. > >> 1) I have two libiconvs installed, one supplied with my OS in > > /usr and another in /opt/local. Using > > --with-iconv-dir=/opt/local fails to locate libiconv, but > > --with-iconv-dir=/usr works. I made a change to extconf.rb: > >> $ diff libxml-ruby-0.3.6.orig/ext/xml/extconf.rb libxml-ruby-0.3.6/> > ext/xml/extconf.rb > > 45,46c45,49 > > < unless have_library('iconv','iconv_open') or have_library> > ('c','iconv_open') or > > < have_library('recode','iconv_open') > > --- > > > > > > unless have_library('iconv') or > > > have_library('iconv','iconv_open') or > > > have_library('c','iconv_open') or > > > have_library('recode','iconv_open') > >> and --with-iconv-dir=/opt/local worked. > >I'm not sure about this - I'm still finding my way around some things > here, but I'm pretty sure we do need iconv_open(3) in libiconv. Does it > compile with this change? >I'm going to forward this as a possible change to the mailing list at > libxml-devel at rubyforge.org . -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Sat Feb 25 21:55:55 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 26 Feb 2006 02:55:55 -0000 Subject: [libxml-devel] Fwd: Re: [ANN] LibXML-Ruby 0.3.6 (from ruby-talk) In-Reply-To: References: Message-ID: Hi again, Further to my last message, I can't actually see why we're requiring iconv? I'm guessing it's because libxml2 has it as an optional dep? I couldn't find any references to iconv.h in the source. I just tried commenting it in the extconf.rb and it doesn't appear to make any difference to the makefile or build, and all tests pass. Am I missing something, or can/should we remove it? -- Ross Bamford - rosco at roscopeco.co.uk From sean at gigave.com Sun Feb 26 01:39:40 2006 From: sean at gigave.com (Sean Chittenden) Date: Sat, 25 Feb 2006 22:39:40 -0800 Subject: [libxml-devel] Fwd: Re: [ANN] LibXML-Ruby 0.3.6 (from ruby-talk) In-Reply-To: References: Message-ID: <20060226063940.GW2796@mailhost.gigave.com> > Further to my last message, I can't actually see why we're requiring > iconv? I'm guessing it's because libxml2 has it as an optional dep? > I couldn't find any references to iconv.h in the source. > > I just tried commenting it in the extconf.rb and it doesn't appear > to make any difference to the makefile or build, and all tests > pass. Am I missing something, or can/should we remove it? UTF-8. :) Ruby isn't there, but libxml2(3) will happily hand Ruby a steaming pile of bits that Ruby can't handle well. The biggy is making sure the .so links. I remember some systems having problems linking the lib without iconv(3), but it's been a while and my memory has about 5 days of space in its queue before bits start hitting /dev/null. Thank god for CRMs and databases. -sc -- Sean Chittenden From rosco at roscopeco.co.uk Sun Feb 26 06:13:25 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 26 Feb 2006 11:13:25 -0000 Subject: [libxml-devel] Fwd: Re: [ANN] LibXML-Ruby 0.3.6 (from ruby-talk) In-Reply-To: <20060226063942.03B9F216E01@mailhost.gigave.com> References: <20060226063942.03B9F216E01@mailhost.gigave.com> Message-ID: On Sun, 26 Feb 2006 06:39:40 -0000, Sean Chittenden wrote: >> Further to my last message, I can't actually see why we're requiring >> iconv? I'm guessing it's because libxml2 has it as an optional dep? >> I couldn't find any references to iconv.h in the source. >> >> I just tried commenting it in the extconf.rb and it doesn't appear >> to make any difference to the makefile or build, and all tests >> pass. Am I missing something, or can/should we remove it? > > UTF-8. :) Ruby isn't there, but libxml2(3) will happily hand Ruby a > steaming pile of bits that Ruby can't handle well. The biggy is > making sure the .so links. I remember some systems having problems > linking the lib without iconv(3), but it's been a while and my memory > has about 5 days of space in its queue before bits start hitting > /dev/null. Thank god for CRMs and databases. -sc > 5 days? Wow, I guess I need an upgrade ... ;) So we should keep it in then? I suppose it's pretty ubiquitous... Apart from that one report it doesn't seem to be causing problems, so I'm happy to consider that a case of broken version or install (until it comes up again, at least). -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Sun Feb 26 06:13:39 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 26 Feb 2006 11:13:39 -0000 Subject: [libxml-devel] Fwd: Re: LibXML-Ruby 0.3.6 (from ruby-talk) Message-ID: On Sun, 2006-02-26 at 13:01 +0900, Daniel Harple wrote: There is small documentation error at > http://libxml.rubyforge.org/doc/classes/XML/Dtd.html >The class is named Dtd, but DTD is used. Also, the name of two classes, > Dtd and SaxParser, is inconsistent with the naming conventions of the > library -- it should be DTD and SAXParser. >-- Daniel > -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Sun Feb 26 14:49:39 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Sun, 26 Feb 2006 19:49:39 -0000 Subject: [libxml-devel] fno-common issue: possible fix for OSX Message-ID: Hopefully the attached patch will fix the -fno-common issues on OSX and get rid of some problems with the build. I wonder if anyone on OSX would be willing to give this a try before I commit it? Cheers, -- Ross Bamford - rosco at roscopeco.co.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: libxml-nocommon.patch Type: application/octet-stream Size: 4016 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20060226/731b99ac/libxml-nocommon.obj From dharple at generalconsumption.org Mon Feb 27 07:34:42 2006 From: dharple at generalconsumption.org (Daniel Harple) Date: Mon, 27 Feb 2006 13:34:42 +0100 Subject: [libxml-devel] fno-common issue: possible fix for OSX Message-ID: <5E1EDB4A-7C28-47D6-845A-8E11521543DF@generalconsumption.org> Works for me. Using gcc4.0 on Mac OS X 10.4. -- Daniel From rosco at roscopeco.co.uk Mon Feb 27 08:10:16 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 27 Feb 2006 13:10:16 -0000 Subject: [libxml-devel] fno-common issue: possible fix for OSX In-Reply-To: <5E1EDB4A-7C28-47D6-845A-8E11521543DF@generalconsumption.org> References: <5E1EDB4A-7C28-47D6-845A-8E11521543DF@generalconsumption.org> Message-ID: On Mon, 27 Feb 2006 12:34:42 -0000, Daniel Harple wrote: > Works for me. Using gcc4.0 on Mac OS X 10.4. > Thanks, now committed. -- Ross Bamford - rosco at roscopeco.co.uk From rosco at roscopeco.co.uk Mon Feb 27 08:13:28 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 27 Feb 2006 13:13:28 -0000 Subject: [libxml-devel] Possible patch Message-ID: Attached is a feature patch left over from when I was collecting what was out there. IMHO we should apply this. -- Ross Bamford - rosco at roscopeco.co.uk -------------- next part -------------- A non-text attachment was scrubbed... Name: registerErrorHandler.patch Type: application/octet-stream Size: 2375 bytes Desc: not available Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20060227/3e2494c3/registerErrorHandler.obj From rosco at roscopeco.co.uk Mon Feb 27 08:20:08 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 27 Feb 2006 13:20:08 -0000 Subject: [libxml-devel] libxslt bindings Message-ID: Over the past couple of days I've started looking at bringing the libxslt bindings up to date, but am having some 'fun' with the compile/linking and trying to have it work as a Rubygem. Mainly the problem is that it requires the libxml-ruby headers, but we can't guarantee that they'll be present, or in the right place, and if libxml-ruby is installed without gems it's even more difficult. Passing in options to extconf is what I currently have (with some basic searching, ../libxml etc) but obviously this precludes building from a Gem. So anyway, here's the question: Does anyone know any links pertaining to building and linking interdependent ruby extensions? Or have any tips for me? Cheers, -- Ross Bamford - rosco at roscopeco.co.uk From sean at gigave.com Mon Feb 27 12:34:57 2006 From: sean at gigave.com (Sean Chittenden) Date: Mon, 27 Feb 2006 09:34:57 -0800 Subject: [libxml-devel] libxslt bindings In-Reply-To: References: Message-ID: <20060227173457.GX2796@mailhost.gigave.com> > So anyway, here's the question: Does anyone know any links > pertaining to building and linking interdependent ruby extensions? > Or have any tips for me? During the dist-bzip2 phase of the makefile, *copy* a version of ruby-libxml's headers into the libxslt tree. Then install a version check at the load of the .so to confirm that ruby's libxml/libxslt bindings are the same as current or within a micro release. How's that sound? -sc -- Sean Chittenden From rosco at roscopeco.co.uk Mon Feb 27 18:20:03 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 27 Feb 2006 23:20:03 -0000 Subject: [libxml-devel] libxslt bindings In-Reply-To: <20060227173458.C1DDB216C21@mailhost.gigave.com> References: <20060227173458.C1DDB216C21@mailhost.gigave.com> Message-ID: On Mon, 27 Feb 2006 17:34:57 -0000, Sean Chittenden wrote: >> So anyway, here's the question: Does anyone know any links >> pertaining to building and linking interdependent ruby extensions? >> Or have any tips for me? > > During the dist-bzip2 phase of the makefile, *copy* a version of > ruby-libxml's headers into the libxslt tree. Then install a version > check at the load of the .so to confirm that ruby's libxml/libxslt > bindings are the same as current or within a micro release. > > How's that sound? -sc > Well, it works, which is good enough for me :) I've now got the libxslt-ruby source compiling without warnings and passing all the tests. I've not put the version check in yet - is there a better way than just comparing them with the header consts at the start of Init_libxslt ? -- Ross Bamford - rosco at roscopeco.co.uk From sean at gigave.com Mon Feb 27 19:47:23 2006 From: sean at gigave.com (Sean Chittenden) Date: Mon, 27 Feb 2006 16:47:23 -0800 Subject: [libxml-devel] libxslt bindings In-Reply-To: References: <20060227173458.C1DDB216C21@mailhost.gigave.com> Message-ID: <20060228004723.GJ2796@mailhost.gigave.com> > >> So anyway, here's the question: Does anyone know any links > >> pertaining to building and linking interdependent ruby > >> extensions? Or have any tips for me? > > > > During the dist-bzip2 phase of the makefile, *copy* a version of > > ruby-libxml's headers into the libxslt tree. Then install a > > version check at the load of the .so to confirm that ruby's > > libxml/libxslt bindings are the same as current or within a micro > > release. > > > > How's that sound? -sc > > Well, it works, which is good enough for me :) I've now got the > libxslt-ruby source compiling without warnings and passing all the > tests. I've not put the version check in yet - is there a better > way than just comparing them with the header consts at the start of > Init_libxslt ? Nope, that's about it. I'd look for major and minor versions. Daniel is pretty good about not breaking ABI with micro releases and think I've done a decent job in the past with the libxml/xsl bindings. -sc -- Sean Chittenden