GDBM_File
am 10.01.2007 05:41:37 von hoco
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
error:
Can't locate loadable object for module GDBM_File in @INC (@INC
contains: /usr/local/lib/perl5/5.8.8/darwin-2level
/usr/local/lib/perl5/5.8.8
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl
/Library/WebServer/Documents/snapsite/site2.2/cgi
/Library/WebServer/Documents/snapsite/site2.2/site
/Library/WebServer/Documents/snapsite/site2.2/cc/lib / /) at
/Library/WebServer/Documents/snapsite/site2.2/cgi/sellweb-db m.pl line
12
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
GDBM_File.
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.
Re: GDBM_File
am 11.01.2007 01:49:06 von hoco
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
hoco wrote:
> 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
> error:
>
> Can't locate loadable object for module GDBM_File in @INC (@INC
> contains: /usr/local/lib/perl5/5.8.8/darwin-2level
> /usr/local/lib/perl5/5.8.8
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
> /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl
> /Library/WebServer/Documents/snapsite/site2.2/cgi
> /Library/WebServer/Documents/snapsite/site2.2/site
> /Library/WebServer/Documents/snapsite/site2.2/cc/lib / /) at
> /Library/WebServer/Documents/snapsite/site2.2/cgi/sellweb-db m.pl line
> 12
>
> 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
> GDBM_File.
>
> 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.