I was installing libxml-ruby today and got a weird error:
Hm, ok, libm
is supplied by the glibc-devel
RPM, which is installed and there it is:
After flailing around for a bit I start actually looking at libxml-ruby's ext/libxml/extconf.rb
. Here's the relevant bit around line 50:
Ok, so, have_library
comes from mkmf.rb, and that method does this:
And what does try_func
do? It writes out a small C program that calls that specific function and tries to compile and link it. So that should work unless.... doh, GCC isn't installed! A quick yum install gcc
and everything works.
I think it took me so long to figure out what was happening because I was expecting a "libxml2-devel not found" kind of error, and if GCC wasn't installed I'd expect to get a "no C compiler found" error. Anyhow, hope this helps someone.