# Error installing libxml

**URL:** <https://www.ruby-forum.com/t/error-installing-libxml/133163>\
**Category:** Ruby\
**Created:** [March 28, 2008, 12:46pm UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163 "2008-03-28T12:46:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [March 28, 2008, 12:46pm UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163/1 "2008-03-28T12:46:40Z")

</div>

i have this error:

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

c:/ruby/bin/ruby.exe extconf.rb install libxml-ruby  
extconf.rb:6:in `[]': stack level too deep (SystemStackError) from extconf.rb:6:in`method\_missing’  
from extconf.rb:6:in `method\_missing’  
from extconf.rb:34

Gem files will remain installed in  
c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.  
5.4 for inspection.  
Results logged to  
c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.4/ext/libxml/ge  
m\_make.out

What can i do?  
Tnx

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [March 28, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163/2 "2008-03-28T16:10:30Z")

</div>

On Mar 28, 7:46 am, Bu Mihai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> from extconf.rb:6:in `method_missing'
> from extconf.rb:34
> 
> ```
> 
> Gem files will remain installed in  
> c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.  
> 5.4 for inspection.  
> Results logged to  
> c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.4/ext/libxml/ge  
> m\_make.out
> 
> What can i do?

Change line 34 to:

objs = srcs.collect do |srcfile|

(ie. change src → srcs)

T.

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [March 28, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163/3 "2008-03-28T22:25:41Z")

</div>

Trans wrote:

> On Mar 28, 7:46 am, Bu Mihai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > ```
> > from extconf.rb:6:in `method_missing'
> > from extconf.rb:34
> > 
> > ```
> > 
> > Gem files will remain installed in  
> > c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.  
> > 5.4 for inspection.  
> > Results logged to  
> > c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.4/ext/libxml/ge  
> > m\_make.out
> > 
> > What can i do?
> 
> Change line 34 to:
> 
> objs = srcs.collect do |srcfile|
> 
> (ie. change src → srcs)
> 
> T.

Tnx, but now i have this error:  
C:\libxml\libxml-ruby-0.5.4\ext\libxml\>ruby extconf.rb  
extconf.rb:51: (eval):11: compile error (SyntaxError)  
(eval):2: unknown regexp option - h  
(eval):9: syntax error, unexpected ‘.’  
(eval):11: syntax error, unexpected $undefined  
hdrdir = $(topdir)

There is a gem to intall it without any error, or could u help me to  
install without gem install command?

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [March 28, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163/4 "2008-03-28T23:05:03Z")

</div>

On Mar 28, 5:25 pm, Bu Mihai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > m\_make.out
> 
> Tnx, but now i have this error:  
> C:\libxml\libxml-ruby-0.5.4\ext\libxml\>ruby extconf.rb  
> extconf.rb:51: (eval):11: compile error (SyntaxError)  
> (eval):2: unknown regexp option - h  
> (eval):9: syntax error, unexpected ‘.’  
> (eval):11: syntax error, unexpected $undefined  
> hdrdir = $(topdir)
> 
> There is a gem to intall it without any error, or could u help me to  
> install without gem install command?

Ah, you are installing on Windows. I’m afriad the extconf.rb code is  
“under development” with regard to Windows. Let me get back to you.

T.

---

<div class="post-metadata">

**Author:** ![mihai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/35a633/32.png) [@mihai](https://www.ruby-forum.com/u/mihai)\
**Post date:** [March 29, 2008, 12:11am UTC](https://www.ruby-forum.com/t/error-installing-libxml/133163/5 "2008-03-29T00:11:10Z")

</div>

Trans wrote:

> On Mar 28, 5:25 pm, Bu Mihai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > > m\_make.out
> > 
> > Tnx, but now i have this error:  
> > C:\libxml\libxml-ruby-0.5.4\ext\libxml\>ruby extconf.rb  
> > extconf.rb:51: (eval):11: compile error (SyntaxError)  
> > (eval):2: unknown regexp option - h  
> > (eval):9: syntax error, unexpected ‘.’  
> > (eval):11: syntax error, unexpected $undefined  
> > hdrdir = $(topdir)
> > 
> > There is a gem to intall it without any error, or could u help me to  
> > install without gem install command?
> 
> Ah, you are installing on Windows. I’m afriad the extconf.rb code is  
> “under development” with regard to Windows. Let me get back to you.
> 
> T.

Yes im using windows. sorry for not telling that; i really need libxml  
because i was using rexml am my xml file is a little big (~1000 lines  
for the moment) and methods like find\_first\_recursive are slow(~10  
seconds) so i need something faster.

Tnx for the help.
