Installing libxml on osx as Gem

N

nicholas.henry

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
 
R

Ross Bamford

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,
 
N

nicholas.henry

Upgrading to 1.8.4 resolved this.

Ross said:
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top