Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure against libxml2-2.9.0 #49

Closed
sheldonh opened this issue Dec 6, 2012 · 4 comments
Closed

build failure against libxml2-2.9.0 #49

sheldonh opened this issue Dec 6, 2012 · 4 comments

Comments

@sheldonh
Copy link

sheldonh commented Dec 6, 2012

Heads up!

When Fedora 18 is released, you're probably going to get a lot of people tripping over the libxml-ruby. That Fedora release looks set to ship with libxml2-2.9.0. When building libruby-xml-2.3.3 native extensions with that version of libxml2 installed, you get:

...
gcc -I. -I. -I/home/sheldonh/.rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/libxml2 -I/usr/local/include -DRUBY_EXTCONF_H="extconf.h" -fPIC -O2 -fno-tree-dce -fno-optimize-sibling-calls -fPIC -I. -I/home/sheldonh/.rvm/rubies/ruby-1.8.7-p371/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/libxml2 -I/usr/local/include -c ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:622:54: error: dereferencing pointer to incomplete type
ruby_xml_node.c:624:56: error: dereferencing pointer to incomplete type
make: *** [ruby_xml_node.o] Error 1

Tested with ruby-1.8.7-p371 and ruby-1.9.3-p327 (using rvm), on a fresh Fedora 18 Beta x86_64 box with libxml2-2.9.0-3.fc18 and libxml2-devel-2.9.0-3.fc18 installed.

Hope that helps.

Ciao,
Sheldon.

@sheldonh
Copy link
Author

sheldonh commented Dec 7, 2012

Here's a work-around for rvm users:

rvm pkg libxml2
bundle config build.libxml-ruby
--with-xml2-lib=${HOME}/.rvm/usr/lib
--with-xml2-include=${HOME}/.rvm/usr/include/libxml2

The rvm pkg command can be run from anywhere. The bundle config should be run from the directory containing the Gemfile for the project on which you've run into this problem.

Then you can "bundle install" as normal.

@cfis
Copy link
Member

cfis commented Dec 12, 2012

Cool thanks, will provide an update.

@cfis
Copy link
Member

cfis commented Jan 19, 2013

This was fixed in the 2.4.0 release.

@shileshv2
Copy link

This helped me, Thanks

fw42 pushed a commit to Shopify/opensrs that referenced this issue Feb 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants