Do you have a question? Post it now! No Registration Necessary. Now with pictures!
January 10, 2007, 4:41 am
rate this thread
I've compiled perl 5.8.8 on my OS X machine (10.4.8) both by hand and
then I tried it using cpan. It says that it comes with GDBM_File, but
this appears not to be the case. When I try "use GDBM_File" I get this
Can't locate loadable object for module GDBM_File in @INC (@INC
/Library/WebServer/Documents/snapsite/site2.2/cc/lib / /) at
I do find that there is a GDBM_File.pm out there, but there doesn't
seem to be anything compiled for it.
On a sun box I have with GDBM installed, there is both a GDBM_File.pm
and elsewhere a GDBM_File.so (a shared object file). In other words,
there is a compiled version of GDBM_File which gets dynamically loaded.
I tried using cpan to "force make GDBM_File" and, alas, cpan rebuilds
perl from scratch. And, I still can't "use GDBM_File". I couldn't
believe that "force make GDBM_File" actually rebuilt perl, so I did it
again, and it happily deleted perl and rebuiilt it. But, no joy. No
I went to search.cpan.org and found GDBM_File, but there is no way to
download it. The download link is simply the link for perl.5.8.8.
I have already built the libraries for gdbm. I have a
/usr/local/lib/libgdbm.a and a libgdbm.dylib and a libgdbm.la. I have
gdbm on my machine, and I noticed that the compilation process for perl
did find the gdbm library. It seemed happy. But, no joy.
Can anyone give me any ideas of what might be going wrong? If it is
built-in, why isn't it getting built, and if it isn't built in, where
can I get it so I can compile and install it manually? Thanks for any
help you can offer.
After much diagnosis, I found the problem. The gdbm software has a
makefile which assumes that the installation should change the
ownership of the gdbm files to bin with group bin. There is a bin
group on OS X, but there is no user called bin. I changed the makefile
to be this:
# File ownership and group
BINOWN = root
BINGRP = wheel
Then the make install worked for gdbm.
See, because the install didn't work, there was no gdbm.h file found,
and this caused the build for GDBM_File to fail. Hence there was no
loadable object for GDBM_File even though GDBM_File.pm was found.
I had also installed gdbm via fink, but the fink version wasn't being
used by the default perl build