Hi,

On Fri, 29 Sep 2006 02:37:54 +0100, Nicholas Henry  
<[EMAIL PROTECTED]> wrote:

> Hello Ross:
>
> Here are my results:
>
> s$ ruby -v
> ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0]
> $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h",   
> "/usr/include/libxml2")'
> -e:1: undefined method `find_header' for main:Object (NoMethodError)
>

Ahh, I missed that ruby version in your original message, sorry about  
that. I'm afraid you're going to need to upgrade your ruby to at least  
1.8.3 to use the libxml gem. That said, it's been quite some time since we  
tested against that version, so I would recommend going for the latest  
(1.8.5) or at least 1.8.4 both of which we're fairly well tested with.

If you don't mind a manual install, you _might_ be able to work around  
this by running extconf.rb manually. The setup is a little wierd (it's  
mainly a rake-based build usually) but something like the following should  
work (though you'll need to adjust the paths of course):

        $ cd libxml-ruby-0.3.8/ext/xml
        $ ruby extconf.rb --with-xml2-include=/usr/include/libxml2
        $ cd ..
        $ su -c 'rake install'

Hope that helps,











> Cheers,
> Nicholas
>
> On 9/28/06, Ross Bamford <[EMAIL PROTECTED]> wrote:
>> Hi Nicholas,
>>
>> Heres a forwarded reply I posted on Ruby-talk earlier today.
>>
>>
>>
>> On Thu, 2006-09-28 at 12:35 +0900, nicholas.henry wrote:
>> > I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas  
>> on
>> > how to resolve these issues? (please see output below)
>> >Thank you,
>> > Nicholas
>> >Attempting local installation of 'libxml'
>> > Local gem file not found: libxml*.gem
>> > Attempting remote installation of 'libxml'
>> > Building native extensions.  This could take a while...
>> > extconf.rb:64: undefined method `find_header' for main:Object
>> > (NoMethodError)
>> > ERROR:  While executing gem ... (RuntimeError)
>> >     ERROR: Failed to build gem native extension.
>> > Gem files will remain installed in
>> > /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection.
>> >   ruby extconf.rb install libxml\nchecking for socket() in -lsocket...
>> > no
>> > checking for gethostbyname() in -lnsl... no
>> > checking for atan() in -lm... no
>> > checking for atan() in -lm... yes
>> > checking for inflate() in -lz... yes
>> > checking for iconv_open() in -liconv... yes
>> > checking for xmlParseDoc() in -lxml2... yes
>> > checking for libxml/xmlversion.h... no
>> >
>>
>> Hmm, find_header should be defined by mkmf, so I don't understand what's
>> going on there. Maybe it's something to do with OSX - has anyone else
>> seen this?
>>
>> Anyway, could you post up your ruby version? Also, the results of
>> running this:
>>
>> $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h",
>> "/usr/include/libxml2")'
>>
>> Thanks,
>> --
>> Ross Bamford - [EMAIL PROTECTED]
>> _______________________________________________
>> libxml-devel mailing list
>> libxml-devel@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/libxml-devel
>>
> _______________________________________________
> libxml-devel mailing list
> libxml-devel@rubyforge.org
> http://rubyforge.org/mailman/listinfo/libxml-devel
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net



-- 
Ross Bamford - [EMAIL PROTECTED]
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to