Brian Candler
10/21/2004 5:15:00 PM
On Thu, Oct 21, 2004 at 05:48:31PM +0100, Brian Candler wrote:
> I am building ruby-1.8.2p2 under FreeBSD-5.2.1, but I am unable to get the
> gdbm and iconv modules built. I have gdbm-1.8.3 and libiconv-1.9.1 installed
> from ports. This is what I'm doing:
>
> export LDFLAGS="-L/usr/local/lib"
> export CPPFLAGS="-I/usr/local/include"
> ./configure
> make
>
> However, the modules iconv and gdbm are skipped over. ext/gdbm/mkmf.log and
> ext/iconv/mkmf.log are attached.
But strangely, after I've built and installed ruby if I then do "ruby
extconf.rb" and "make" in those directories, then it builds them!
$ ./configure LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include"
...
$ make
...
$ cd ext/gdbm
$ grep "checking for" mkmf.log
have_library: checking for gdbm_open() in -lgdbm... -------------------- no
$ ruby extconf.rb
checking for gdbm_open() in -lgdbm... yes
checking for gdbm.h... yes
creating Makefile
$ make
...
$ ls -l gdbm.so
-rwxr-xr-x 1 brian brian 22649 Oct 21 18:03 gdbm.so
$ cd ../iconv
$ grep "checking for" mkmf.log
have_func: checking for iconv()... -------------------- no
have_library: checking for iconv() in -liconv... -------------------- no
$ ruby extconf.rb
checking for iconv()... no
checking for iconv() in -liconv... yes
checking for const of iconv() 2nd argument... yes
creating Makefile
$ ls -l iconv.so
-rwxr-xr-x 1 brian brian 16915 Oct 21 18:04 iconv.so
Hmm, so why doesn't that work when building Ruby in the first place?
Regards,
Brian.