Cannot build perl 5.8.0 with Berkley DB 4.1.15

P

Peter Keller

Hi,

I am trying to build perl 5.8.0 on a HP/Compaq Tru64 Unix system with the
current version of the Berkeley DB library (version 4.1.25), in order
to work around the known problem with the system-supplied libdb.

I have managed to get the configure script to use the correct libdb.so
and db.h (some manipulation of the rpath is necessary - I will post
more details if I get the whole build to work), but DB_File.xs does
not compile:

Making DB_File (dynamic)
cc -c -pthread -std -D_INTRINSICS -fprm d -ieee
-I/ebi/msd/software/perl5.8.0/db-4.1.25/include -DLANGUAGE_C -O4
-DVERSION=\"1.804\" -DXS_VERSION=\"1.804\" "-I../.." DB_File.c
cc: Warning: DB_File.xs, line 1369: In this statement, the referenced
type of the pointer value "name" is "char", which is not compatible with
"struct __db_txn". (ptrmismatch)
status = (RETVAL->dbp->open)(RETVAL->dbp, name, NULL, RETVAL->type,
--------------------------------------------------^
cc: Warning: DB_File.xs, line 1369: In this statement, "RETVAL->type" of
type "enum declared without a tag", is being converted to "pointer to
const char". (cvtdiftypes)
status = (RETVAL->dbp->open)(RETVAL->dbp, name, NULL, RETVAL->type,
--------------------------------------------------------------^
cc: Error: DB_File.xs, line 1369: In this statement,
"(RETVAL->dbp->open)" expects 7 arguments, but 6 are supplied. (toofewargs)
status = (RETVAL->dbp->open)(RETVAL->dbp, name, NULL, RETVAL->type,
-----------------^
*** Exit 1

I have double-checked (using cc -P and looking at DB_File.i) that I am
getting the right db.h here. From the comments at
http://archive.develooper.com/[email protected]/msg06998.html it
seems that someone has managed to get beyond this point with the same
version of libdb that I am using. Does anyone have any idea how they
did it?

Any suggestions much appreciated,
Peter.

======= output of myconfig follows =========

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=dec_osf, osvers=5.1, archname=alpha-dec_osf-thread-multi
uname='osf1 rum.ebi.ac.uk v5.1 1885 alpha '
config_args='-Dmksymlinks -Duseithreads
-Dlocincpth=/ebi/msd/software/perl5.8.0/db-4.1.25/include
-Dloclibpth=/ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-pthread -std -D_INTRINSICS -fprm d -ieee
-I/ebi/msd/software/perl5.8.0/db-4.1.25/include -DLANGUAGE_C',
optimize='-O4',
cppflags='-pthread -std -D_INTRINSICS -fprm d -ieee
-I/ebi/msd/software/perl5.8.0/db-4.1.25/include -DLANGUAGE_C'
ccversion='V6.4-014', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags ='-L/ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib
-L/usr/shlib -rpath /ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib'
libpth=/ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib /usr/shlib
/usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib
libs=-ldbm -ldb -lm -lutil -lpthread -lexc
perllibs=-lm -lutil -lpthread -lexc
libc=/usr/shlib/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-rpath,/ebi/msd/software/perl5.8.0/lib/5.8.0/alpha-dec_osf-thread-multi/CORE:/ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib'
cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -O4 -msym
-std -s -L/ebi/msd/software/perl5.8.0/db-4.1.25/dec/lib -L/usr/shlib'
 
D

Dan Wilga

If it helps any, in the past I've had success working around problems
compiling DB into Perl by setting it to use one of the older methods
(like DBM), and then using CPAN to install DB_File separately, afterward.
 
P

Peter Keller

Dan said:
If it helps any, in the past I've had success working around problems
compiling DB into Perl by setting it to use one of the older methods
(like DBM), and then using CPAN to install DB_File separately, afterward.
Dear Dan,

Many thanks for this helpful suggestion - it worked fine. The version
of DB_File in the perl5.8.0 distribution is 1.803, whereas the version
from CPAN is now 1.806, which may have made the difference.

The only tweak was that I had to add an -rpath argument to the LDDLFLAGS
in the generated Makefile. This is because I chose to put the DB
installation into its own tree inside the perl install tree, to insulate
it from any changes in external DB libs that other people might do.

Thanks again,
Peter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top