Mailing List Archive

how to use other_dbm
This is going to sound like a dumb question...

Could someone please tell me the exact build steps for getting GDBM and
Berkeley DB binding set up? Let's assume that the libraries have been
ftp'd properly. Does it require special Makefile.PL files? Can Configure
find them if you're building perl from scratch? etc.

thanks,

--tom
Re: how to use other_dbm [ In reply to ]
>From: Tom Christiansen <tchrist@mox.perl.com>
>
>This is going to sound like a dumb question...
>
>Could someone please tell me the exact build steps for getting GDBM and
>Berkeley DB binding set up? Let's assume that the libraries have been
>ftp'd properly. Does it require special Makefile.PL files? Can Configure
>find them if you're building perl from scratch? etc.

If libgdbm.a is present and found by Configure, then GDBM_File will be
compiled and installed with make/make install.

If you get gdbm at a later date than perl is built and installed, you
still can cd to ext/GDBM_File and run the usual
perl Makefile.PL
make
make install

Same for berkeley db.

The question, if Configure finds them is a bit too difficult for
me. Usually it finds the libraries. If it doesn't, well, we have to
check quite a few variables in config.sh.

A small nit comes to mind: If you build perl without gdbm and add gdbm
later, you won't be able to run the test script in t/lib/gdbm.t,
because tht script looks at $Config{xxxlibs} to determine if you have
it. It's on makemaker's todo list to have some improvement there, but
currently no time available.

>
>thanks,
>
>--tom
>


Regards,
andreas
Re: how to use other_dbm [ In reply to ]
On Thu, 7 Sep 1995, Tom Christiansen wrote:

> Could someone please tell me the exact build steps for getting GDBM and
> Berkeley DB binding set up? Let's assume that the libraries have been
> ftp'd properly. Does it require special Makefile.PL files? Can Configure
> find them if you're building perl from scratch? etc.

First, build & install GDBM and DB. I'll presume that you install both in
/usr/local/{lib,include}, and that you're building on a common system with
dyanmic loading (i.e. you expect Configure's going to get everything right
except, perhaps, the GDBM and DB paths).

Then
cd /wherever/perl5.001m
sh Configure -de -Dccflags="-I/usr/local/include" \
-Dldflags="-L/usr/local/lib" \
-Dlddlflags="-L/usr/local/lib"
make
make test

ought to work.

If you run Configure interactively, then it will explicitly prompt you for
-I/whatever flags. The ldflags prompt doesn't explicitly mention
-L flags, though it should. The lddlflags prompt reminds you that
if you used any -Lflags before, you should do so again.

The -I flag is not needed if you run gcc, and gcc was configured with
the default setting of --local-prefix. The -L flags are needed with
either gcc or cc. The fact that gcc searches /usr/local/include but
doesn't tell the linker to look in /usr/local/lib could be construed as a
gcc bug.

I should probably put the above info into some sort of INSTALL file.

Changing Configure to automatically guess the right -I and -L flags is one of
the most-requested Configure enhancements, though no one has found the time
and energy to do anything about it. Just in case someone really wants to do
this, I have previously posted all of the metaconfig units and files needed
to build perl5.001m. I have a few ideas, but little time to follow up on
them.

Good luck,

Andy Dougherty doughera@lafcol.lafayette.edu