Cannot build perl 5.8.0 with Berkley DB 4.1.15

Discussion in 'Perl Misc' started by Peter Keller, Jul 8, 2003.

  1. Peter Keller

    Peter Keller Guest

    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//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'
     
    Peter Keller, Jul 8, 2003
    #1
    1. Advertising

  2. Peter Keller

    Dan Wilga Guest

    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.

    --
    Dan Wilga
    ** Remove the -MUNGE in my address to reply **
     
    Dan Wilga, Jul 8, 2003
    #2
    1. Advertising

  3. Peter Keller

    Peter Keller Guest

    Dan Wilga wrote:
    > 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.
     
    Peter Keller, Jul 9, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vagif Abilov
    Replies:
    2
    Views:
    599
    Vagif Abilov
    Jul 7, 2004
  2. Pedro Mir
    Replies:
    2
    Views:
    462
    Winista
    Jun 20, 2006
  3. Nicolas Lehuen
    Replies:
    3
    Views:
    747
    Nicolas Lehuen
    Jan 28, 2004
  4. Toon Knapen
    Replies:
    2
    Views:
    381
    Toon Knapen
    May 17, 2006
  5. Chris
    Replies:
    9
    Views:
    161
    Ben Morrow
    Feb 11, 2004
Loading...

Share This Page