I was setting up some servers with the Beanstalk guys and was building the Subversion Ruby bindings - you know, the ones that use SWIG. All was well until I got to
make swig-rb. That resulted in an error which I will present in its entirety for easier Googling:
The problem is that the linker is looking for a shared object library and finding only a static library. The solution is to recompile Ruby with the
--enable-shared and reinstall it. This will create a shared object library (
lib/libruby.so.1.8.6) in addition to the static library (
lib/libruby-static.a), and if you retry
make swig-rb it'll work.
I'm used to seeing Ruby libraries that depend on underlying native code - e.g., libxml-ruby depends on the libxml2 headers and such being in place, the mysql gem depends on the MySQL client, etc. But the Subversion bindings are different - they come with Subversion and depend on Ruby being already installed. It kind of turns things around.
Why doesn't the Subversion autoconf script (or the Makefile?) detect that there's no shared object library and fail with a more helpful error? I'm not sure... but that would be nice.