libxml-ruby gem安装错误

时间:2014-04-29 18:46:39

标签: ruby-on-rails ruby libxml2

我在使用ruby 1.8.7-p375和rails 2.3.13安装libxml-ruby gem(版本1.1.3)时遇到问题。任何帮助将不胜感激。我知道这些都是旧版本,但在将我们的项目改造为更新版本之前,我们需要支持一段时间。我使用的是GCC版本的OSX 10.9.2。我不确定它是否与gcc有任何关系,但仍然如此。

$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)

这是我得到的错误:

$ gem install libxml-ruby -v '1.1.3' 
Building native extensions.  This could take a while...
ERROR:  Error installing libxml-ruby:
    ERROR: Failed to build gem native extension.

        /Users/priyamanda/.rbenv/versions/1.8.7-p375/bin/ruby extconf.rb 
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... no
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... yes
checking for libxml/xmlversion.h... yes
creating extconf.h
creating Makefile

make
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c libxml.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_attr.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_attr_decl.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_attributes.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_cbg.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_document.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_dtd.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_encoding.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_error.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_html_parser.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_html_parser_context.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_html_parser_options.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_input_cbg.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_io.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_namespace.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_namespaces.c
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/include  -fno-common  -O3 -Wno-error=shorten-64-to-32  -pipe -fno-common  -I/usr/include/libxml2 -I. -I/Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/usr/local/include  -c ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:575: error: dereferencing pointer to incomplete type
ruby_xml_node.c:577: error: dereferencing pointer to incomplete type
make: *** [ruby_xml_node.o] Error 1


Gem files will remain installed in /Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3 for inspection.
Results logged to /Users/priyamanda/.rbenv/versions/1.8.7-p375/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/ext/libxml/gem_make.out

0 个答案:

没有答案