I’m brand new to ruby, but have plenty of experiencing with UNIX,
autoconf & configure, building software, etc. I’m trying to build ruby
1.8.5 on my x86_64-sun-solaris2.10 box, using the Sun Workshop 11
compiler and development toolchain. I am building in 64-bit mode.
Before I configure ruby, I add a few include directories to CFLAGS and
CPPFLAGS, so that configure can find headers installed in nonstandard
places. I add a few library directories to LDFLAGS, e.g.
The problem is that most of the extensions under ext ignore the settings
for LDFLAGS, so any of the extensions that require additional libraries
(like gdbm, or readline) are skipped.
Oddly, that doesn’t happen for the openssl extension – it does have
DLDFLAGS = -L/local/openssl/lib
in the Makefile, and the extension builds.
Looking at the ‘mkmf.log’ for an extension like gdbm, I see, as the
have_library: checking for gdbm_open() in -lgdbm… --------------------
The DLDFLAGS settings in ext/gdbm/Makefile is empty.
So, any tips to explain why this is happening? It looks like the
extension build procedure uses an ‘mkmf’ extension, so I’m guessing the
fault is with that, but since I’m brand new to ruby, I can’t exactly
debug what’s going on in mkmf.rb. I’m suspicious that ‘mkmf’ can’t find
the libraries that are installed in a library directory that’s a
“lib/64” directory, but that’s just a first guess.