I am attempting to require a .so from JRuby and am having a bit of
The library in question is the 64bit, ruby 1.8 version of pdflib.so
found in the ruby package at http://www.pdflib.com
MRI Ruby 1.8 and 1.9 load without trouble but jruby fails with the
LoadError: load error: /home/jjones/Projects/gemini/castor/vendor/PDFlib
– java.lang.UnsatisfiedLinkError: failed to load shim library, error:
/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14’ not found (required by
So it appears that my libstdc++.so is too old for libjruby-cext.so. This
is the standard libstdc++ that ships with Ubuntu 10.04 LTS (Long Term
I have done some more googling based on the error messages and other
applications that had the same problem were fixed so that they ran with
that version of libstdc++. From what I read the difference between
3.4.13 and 3.4.14 doesn’t affect the majority of programs.
Would this be possible with jruby?
Another option of course is to use the java version of pdflib and then
access it from jruby, I chose the ruby version because it was the path
of least resistance in terms of testing etc. Would the java version be
faster than calling a C extension from jruby?