View Single Post

   
  #2 (permalink)  
Old 02-16-2008, 08:07 AM
Joachim Schipper
 
Posts: n/a
Default Re: [4.1] BerkeleyDB from CPAN

Helmut Schneider <jumper99@gmx.de> wrote:
> Hi,
>
> using amavisd/SpamAssassin I need some perl modules, e.g BerkeleyDB. I am
> used to install all of them from CPAN (perl -MCPAN -e 'install BerkeleyDB').


Any good reason to not just pkg_add spamassassin?

> I have an old machine which I countinually updated from 3.9 to 4.1.
> Installation of BerkeleyDB runs fine from within CPAN.
> Now I installed a machine from scratch and BerkeleyDB fails:
>
> [...]
> CPAN.pm: Going to build P/PM/PMQS/BerkeleyDB-0.31.tar.gz
>
> Parsing config.in...
> Looks Good.
> Checking if your kit is complete...
> Looks good
> Note (probably harmless): No library found for -ldb
> Writing Makefile for BerkeleyDB
> CPAN: YAML loaded ok (v0.65)
> cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm
> AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB)
> cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm
> cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod
> cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm
> /usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -noprototypes -typemap
> /usr/libdata/perl5/ExtUtils/typemap -typemap typemap BerkeleyDB.xs >
> BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c
> cc -c -I/usr/local/BerkeleyDB/include -fno-strict-aliasing -fno-delete-null-pointer-checks
> -pipe -I/usr/local/include -O2 -DVERSION=\"0.31\" -DXS_VERSION=\"0.31\"
> -DPIC -fPIC "-I/usr/libdata/perl5/i386-openbsd/5.8.8/CORE" BerkeleyDB.c
> BerkeleyDB.xs:74:2: #error db.h is from Berkeley DB 1.x - need at least
> Berkeley DB 2.6.4
> [...]


That's not the proper Berkeley DB. (-ldb fails, db.h is not recognized).

> I know BerkeleyDB 0.27 is available from ports and currently I am using it
> but I am curious why the compilation via CPAN fails on the new installation
> while an updated machine compiles fine. Both machines have the same ports
> installed, db-4.2.52p11 of course is installed, too.
>
> This is what the other machine says:
>
> [...]
> Removing previously used /root/.cpan/build/BerkeleyDB-0.31
>
> CPAN.pm: Going to build P/PM/PMQS/BerkeleyDB-0.31.tar.gz
>
> Parsing config.in...
> Looks Good.
> Checking if your kit is complete...
> Looks good
> Writing Makefile for BerkeleyDB
> cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm
> AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB)
> cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm
> cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod
> cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm
> /usr/bin/perl /usr/libdata/perl5/ExtUtils/xsubpp -noprototypes -typemap
> /usr/libdata/perl5/ExtUtils/typemap -typemap typemap BerkeleyDB.xs >
> BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c
> cc -c -I/usr/local/BerkeleyDB/include -fno-strict-aliasing -fno-delete-null-pointer-checks
> -pipe -I/usr/local/include -O2 -DVERSION=\"0.31\" -DXS_VERSION=\"0.31\"
> -DPIC -fPIC "-I/usr/libdata/perl5/i386-openbsd/5.8.8/CORE" BerkeleyDB.c
> Running Mkbootstrap for BerkeleyDB ()


That is.

> db.h on both machines (/usr/include/db.h) have the same MD5.


Yes, but the first machine uses /usr/include/db.h (included with
OpenBSD; see dbopen(3)), and the latter uses /usr/include/local/db4/db.h
(Berkeley DB 4 from ports).

I wouldn't know how to fix this, but that is what is happening.

Joachim
Reply With Quote