Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Augeas, ruby gem and libxml
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
shanew
n00b
n00b


Joined: 16 Sep 2006
Posts: 34
Location: Austin, TX

PostPosted: Mon Oct 22, 2012 7:02 pm    Post subject: Augeas, ruby gem and libxml Reply with quote

While installing puppet (with the augeas use flag) on a brand new system, I ran into a problem where the ruby gem for augeas (dev-ruby/ruby-augeas) wouldn't compile, complaining thus:

Code:
 * Running compile phase for ruby18 ...
make -j2 -Cext/augeas
make: Entering directory `/var/tmp/portage/dev-ruby/ruby-augeas-0.3.0-r1/work/ruby18/ruby-augeas-0.3.0/ext/augeas'
i686-pc-linux-gnu-gcc -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64  -fPIC -march=i686 -O2 -pipe -fno-strict-aliasing  -fPIC     -c _augeas.c
In file included from _augeas.c:23:0:
/usr/include/augeas.h:24:25: fatal error: libxml/tree.h: No such file or directory
compilation terminated.
make: *** [_augeas.o] Error 1


The file it's looking for resides in /usr/include/libxml2/libxml/, but for some reason the ruby gem isn't finding it. After some experiments (rebuilding libxml2, downgrading libxml2, downgrading ruby-augeas mostly) and some googling, I finally found https://github.com/lutter/ruby-augeas/issues/2, which seemed to be describing my problem, and pointed me at the fact that the issue was really in app-admin/augeas. I downgraded augeas from 0.10.0 to 0.9.0, and then I'm able to successfully build ruby-augeas. With that done, all the other puppet dependencies and puppet itself compile and install fine.

My guess is that there's another, better way to fix this, either by patching augeas, or getting ruby-augeas to look in the right place for the file. I haven't tried any specific fix, but I do notice that 0.10.0 has explicit code to try and determine where libxml2 lives, whereas 0.9.0 doesn't. So my hunch is that 0.10.0 doesn't identify the include directory correctly.

I'd be happy if someone could provide a fix that would allow me to upgrade to augeas-0.10.0 and still have ruby-augeas build properly, but as much as anything, I thought I might save someone else some time trying to figure out what's going on with this.
Back to top
View user's profile Send private message
shanew
n00b
n00b


Joined: 16 Sep 2006
Posts: 34
Location: Austin, TX

PostPosted: Mon Oct 22, 2012 7:35 pm    Post subject: Reply with quote

One workaround is to create a symbolic link from /usr/include/libxml to /usr/include/libxml2/libxml
Code:
ln -s /usr/include/libxml2/libxml /usr/include/libxml


Of course, that may do funny things to other packages looking for libxml, but it does allow ruby-augeas to build off of augeas-0.10.0
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum