Up Prev Next
From: Michael Peppler <mpeppler at mbay dot net>
Subject: Re: SUMMARY:Sybperl 2.08 in DU 4.0b
Date: Dec 31 1997 3:44PM
Laurent Sainte-Marthe wrote:
> Joseph C King writes :
> > This is what I had to do to get sybperl 2.08 working with Open Client
> > 10.0.4, perl 5.004_04, DU 4.0b with current jumbo patch
> > 1) Rebuild perl with out -ldb support.
> > To do this we just ran config again and didn't include -ldb when it
> > asked for libraries and didn't choose DB_FILE to be used also
> > ...
> > I don't know if we needed to do all of this but this is what finally made
> > everything work.
> Happy new year for everybody
> may be someone could be concerned :
> there are two reasons why DBlib doesn't work in Digital Unix :
> LD_LIBRARY_PATH must be set to the sybase openclient libraries directory
> The opendb() function which is called by dblogin() in DBlib.so is the one
> of the Digital Unix library (/usr/shlib/libdb.so) and not the one of the
> sybase openclient library (libsybdb.so)
> So, in dblogin(), dbproc=dbopen(login,server) return a NULL pointer
> and connexion with sybase server fails.
> libdb.so is used by Perl package. Of course, if you supress this library,
> dbopen() function will be correctly called and it will work, but
> in my point of view, it's not the best solution.
> Now, the question is : why libdb.so is called before libsybdb.so in spite
> of link-editor options ?
> May be a problem of digital Unix loader, I'm searching for ...
No - this is a bug in perl's Configure. The issue is that the perl
binary itself does not need libdb.so (only the DB_File module needs
it) but still Configure will link in -ldb if it sees it. This will
take precedence over subsequently linked in code because the library
is linked in *before* the Sybase extension is loaded, so the ld.so
sees the libdb version of dbopen(), and stops looking further.
The fix is to tell perl's Configure to NOT build with -ldb, and then
let DB_File use the -ldb library if you need it.
I hope this clears up some of these issues...
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler