# Can't install libxml-ruby

**URL:** <https://www.ruby-forum.com/t/cant-install-libxml-ruby/152893>\
**Category:** Ruby\
**Created:** [November 9, 2008, 5:48am UTC](https://www.ruby-forum.com/t/cant-install-libxml-ruby/152893 "2008-11-09T05:48:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisolsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Post date:** [November 9, 2008, 5:48am UTC](https://www.ruby-forum.com/t/cant-install-libxml-ruby/152893/1 "2008-11-09T05:48:48Z")

</div>

I was getting errors thrown for the libxml-ruby lib when updating my  
gems, so I decided to install the gem causing the issue, hoping that a  
fresh install would solve the problems.

I am now unable to install it. It seems to have an issue finding some  
libraries, but I am unsure if they are needed, since I did have it  
installed before, but if they are where to get them.

Thanks for any help.

* * *

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

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby  
extconf.rb install 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… 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… yes  
checking for xmlDocFormatDump()… yes  
checking for docbCreateFileParserCtxt()… yes  
creating extconf.h  
creating Makefile

make  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c cbg.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c libxml.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_attr.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_attributes.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_document.c  
ruby\_xml\_document.c: In function â€˜ruby\_xml\_document\_encoding\_setâ€™:  
ruby\_xml\_document.c:373: warning: pointer targets in passing argument 1  
of â€˜xmlStrdupâ€™ differ in signedness  
ruby\_xml\_document.c: In function â€˜ruby\_xml\_document\_encoding\_setâ€™:  
ruby\_xml\_document.c:373: warning: pointer targets in passing argument 1  
of â€˜xmlStrdupâ€™ differ in signedness  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_dtd.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_html\_parser.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_input\_cbg.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_node.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_node\_set.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_ns.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_parser.c  
ruby\_xml\_parser.c: In function  
â€˜ruby\_xml\_parser\_default\_tree\_indent\_string\_setâ€™:  
ruby\_xml\_parser.c:589: warning: pointer targets in passing argument 1 of  
â€˜xmlStrdupâ€™ differ in signedness  
ruby\_xml\_parser.c:589: warning: pointer targets in assignment differ in  
signedness  
ruby\_xml\_parser.c: In function  
â€˜ruby\_xml\_parser\_default\_tree\_indent\_string\_setâ€™:  
ruby\_xml\_parser.c:589: warning: pointer targets in passing argument 1 of  
â€˜xmlStrdupâ€™ differ in signedness  
ruby\_xml\_parser.c:589: warning: pointer targets in assignment differ in  
signedness  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_parser\_context.c  
gcc -I. -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -DRUBY\_EXTCONF\_H=“extconf.h” -fno-common  
-arch ppc -arch i386 -Os -pipe -fno-common -I.  
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0  
-I. -I/usr/local/include -c ruby\_xml\_reader.c  
ruby\_xml\_reader.c: In function â€˜ruby\_xml\_reader\_encodingâ€™:  
ruby\_xml\_reader.c:531: warning: comparison between pointer and integer  
ruby\_xml\_reader.c: In function â€˜ruby\_xml\_reader\_xml\_versionâ€™:  
ruby\_xml\_reader.c:644: warning: comparison between pointer and integer  
ruby\_xml\_reader.c: In function â€˜ruby\_init\_xml\_readerâ€™:  
ruby\_xml\_reader.c:939: error: â€˜XML\_TEXTREADER\_MODE\_INITIALâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:939: error: (Each undeclared identifier is reported  
only once  
ruby\_xml\_reader.c:939: error: for each function it appears in.)  
ruby\_xml\_reader.c:940: error: â€˜XML\_TEXTREADER\_MODE\_INTERACTIVEâ€™  
undeclared (first use in this function)  
ruby\_xml\_reader.c:941: error: â€˜XML\_TEXTREADER\_MODE\_ERRORâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:942: error: â€˜XML\_TEXTREADER\_MODE\_EOFâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:943: error: â€˜XML\_TEXTREADER\_MODE\_CLOSEDâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:944: error: â€˜XML\_TEXTREADER\_MODE\_READINGâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c: In function â€˜ruby\_xml\_reader\_encodingâ€™:  
ruby\_xml\_reader.c:531: warning: comparison between pointer and integer  
ruby\_xml\_reader.c: In function â€˜ruby\_xml\_reader\_xml\_versionâ€™:  
ruby\_xml\_reader.c:644: warning: comparison between pointer and integer  
ruby\_xml\_reader.c: In function â€˜ruby\_init\_xml\_readerâ€™:  
ruby\_xml\_reader.c:939: error: â€˜XML\_TEXTREADER\_MODE\_INITIALâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:939: error: (Each undeclared identifier is reported  
only once  
ruby\_xml\_reader.c:939: error: for each function it appears in.)  
ruby\_xml\_reader.c:940: error: â€˜XML\_TEXTREADER\_MODE\_INTERACTIVEâ€™  
undeclared (first use in this function)  
ruby\_xml\_reader.c:941: error: â€˜XML\_TEXTREADER\_MODE\_ERRORâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:942: error: â€˜XML\_TEXTREADER\_MODE\_EOFâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:943: error: â€˜XML\_TEXTREADER\_MODE\_CLOSEDâ€™ undeclared  
(first use in this function)  
ruby\_xml\_reader.c:944: error: â€˜XML\_TEXTREADER\_MODE\_READINGâ€™ undeclared  
(first use in this function)  
lipo: can’t open input file: /var/tmp//ccnmxnJJ.out (No such file or  
directory)  
make: \*\*\* [ruby\_xml\_reader.o] Error 1

Gem files will remain installed in  
/Library/Ruby/Gems/1.8/gems/libxml-ruby-0.8.3 for inspection.  
Results logged to  
/Library/Ruby/Gems/1.8/gems/libxml-ruby-0.8.3/ext/libxml/gem\_make.out
