From: Tim Mooney Date: 2006-09-16T06:30:59+09:00 Subject: some default ruby extensions don't get -L/path/to/lib/dir All- 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. LDFLAGS='-L/local/openssl/lib -L/local/gnu/lib/64 -L/local/BerkeleyDB/lib/64' export LDFLAGS 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 first line: have_library: checking for gdbm_open() in -lgdbm... -------------------- no 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. Suggestions appreciated. Tim -- Posted via http://www.ruby-forum.com/.