cpan module install woes - UTF-8 problem?

Discussion in 'Perl Misc' started by Troy Piggins, Oct 31, 2007.

  1. Troy Piggins

    Troy Piggins Guest

    Not sure if this is the correct group. Please let me know if there's a
    more applicable one.

    I'm trying to install amavisd-new, spamassassin, and clamav on my ubuntu
    7.10 system. One of amavisd-new's prerequisites is BerkeleyDB and there's
    also an optional Mail::ClamAV that I want to install. All other modules
    installed fine.

    Not being that knowledgeable with perl, I usually install modules at the
    commandline by:

    $ sudo cpan BerkeleyDB

    type commands. Trouble is for those 2 modules mentioned above, and also
    some others required for spamassassin, I keep getting many errors[1].

    I have read that there may be some problems with perl modules if the
    environment is UTF-8. Mine is. I read that a solution may be to unset
    LANG. Tried that with both:

    $ env LANG= sudo cpan BerkeleyDB

    and

    $ LANG=
    $ sudo cpan BerkeleyDB

    to no avail. Any ideas? Please?


    [1] Some of the output for BDB below. I can provide full if necessary.
    ---------------------------------------------
    CPAN: Storable loaded ok
    Going to read /var/cache/cpan/Metadata
    Database was generated on Tue, 30 Oct 2007 12:36:36 GMT
    Running install for module BerkeleyDB
    Running make for P/PM/PMQS/BerkeleyDB-0.32.tar.gz
    CPAN: Digest::MD5 loaded ok
    CPAN: Compress::Zlib loaded ok
    Checksum for
    /var/cache/cpan/sources/authors/id/P/PM/PMQS/BerkeleyDB-0.32.tar.gz ok
    Scanning cache /var/cache/cpan/build for sizes BerkeleyDB-0.32/
    BerkeleyDB-0.32/constants.
    ....
    [snipped]
    ....
    BerkeleyDB-0.32/Makefile.PL
    Removing previously used /var/cache/cpan/build/BerkeleyDB-0.32

    CPAN.pm: Going to build P/PM/PMQS/BerkeleyDB-0.32.tar.gz

    WARNING: LICENSE is not a known parameter.
    Parsing config.in...
    Looks Good.
    Checking if your kit is complete...
    Looks good
    'LICENSE' is not a known MakeMaker parameter name.
    Note (probably harmless): No library found for -ldb
    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/share/perl/5.8/ExtUtils/xsubpp -noprototypes -typemap
    /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap BerkeleyDB.xs >
    BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c cc -c
    -I/usr/local/BerkeleyDB/include -D_REENTRANT -D_GNU_SOURCE
    -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe
    -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
    -DVERSION=\"0.32\" -DXS_VERSION=\"0.32\" -fPIC "-I/usr/lib/perl/5.8/CORE"
    BerkeleyDB.c BerkeleyDB.xs:68:16: error: db.h: No such file or directory
    BerkeleyDB.xs:76:2: error: #error db.h is not for Berkeley DB at all.
    BerkeleyDB.xs:211: error: expected specifier-qualifier-list before
    'DB_ENV' BerkeleyDB.xs:222: error: expected specifier-qualifier-list
    before 'DBTYPE' BerkeleyDB.xs:264: error: expected
    specifier-qualifier-list before 'DBTYPE' BerkeleyDB.xs:306: error:
    expected specifier-qualifier-list before 'DB_TXN' BerkeleyDB.xs:342:
    error: expected '=', ',', ';', 'asm' or '__attribute__' before 'DBTKEY'
    .... [snip]
    ....
    BerkeleyDB.xs:4517: error: 'my_cxt_t' has no member named 'x_zero'
    BerkeleyDB.xs:4518: error: 'my_cxt_t' has no member named 'x_empty'
    BerkeleyDB.xs:4518: error: 'db_recno_t' undeclared (first use in this
    function) BerkeleyDB.xs:4519: error: 'my_cxt_t' has no member named
    'x_empty' make: *** [BerkeleyDB.o] Error 1
    /usr/bin/make -- NOT OK
    Running make test
    Can't test without successful make
    Running make install
    make had returned bad status, install seems impossible
    ------------------------------------------------

    --
    Troy Piggins
    using Xnews from work while getting new home connected
     
    Troy Piggins, Oct 31, 2007
    #1
    1. Advertising

  2. Troy Piggins

    Troy Piggins Guest

    Sherman Pendley is quoted & my replies are inline below :

    > Troy Piggins <> writes:
    >
    >> Not being that knowledgeable with perl, I usually install modules at
    >> the commandline by:
    >>
    >> $ sudo cpan BerkeleyDB

    >
    > ...snip...
    >
    >> Note (probably harmless): No library found for -ldb

    >
    > Grrr...


    I'm hearing ya! :)

    > It's a pet peeve of mine that missing libraries are described as
    > "probably harmless." At least nine times out of ten, a missing library
    > will result in an XS module that either fails to build or fails its
    > tests.
    >
    > Let's see if that's the case here...
    >
    >> BerkeleyDB.c BerkeleyDB.xs:68:16: error: db.h: No such file or
    >> directory

    >
    > Yep. You're missing the Berkeley DB C library, and it's not as harmless
    > as the warning would have you believe. The Perl module is just a wrapper
    > for the C library, and without the C library it can't work.


    So..... how do we fix it :)

    Is the missing library installed from cpan, or deb package?

    --
    Troy Piggins
    using Xnews from work while getting new home connected
     
    Troy Piggins, Oct 31, 2007
    #2
    1. Advertising

  3. Troy Piggins

    Ben Morrow Guest

    Quoth Troy Piggins <>:
    > Not sure if this is the correct group. Please let me know if there's a
    > more applicable one.
    >
    > I'm trying to install amavisd-new, spamassassin, and clamav on my ubuntu
    > 7.10 system. One of amavisd-new's prerequisites is BerkeleyDB and there's
    > also an optional Mail::ClamAV that I want to install. All other modules
    > installed fine.
    >
    > Not being that knowledgeable with perl, I usually install modules at the
    > commandline by:
    >
    > $ sudo cpan BerkeleyDB
    >
    > type commands. Trouble is for those 2 modules mentioned above, and also
    > some others required for spamassassin, I keep getting many errors[1].
    >
    > I have read that there may be some problems with perl modules if the
    > environment is UTF-8.


    This is not usually an issue if you are using 5.8.1 or above, and in any
    case does not appear to be the problem here.

    > [1] Some of the output for BDB below. I can provide full if necessary.

    <snippety>
    > /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -noprototypes -typemap
    > /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap BerkeleyDB.xs >
    > BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c cc -c
    > -I/usr/local/BerkeleyDB/include -D_REENTRANT -D_GNU_SOURCE
    > -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe
    > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
    > -DVERSION=\"0.32\" -DXS_VERSION=\"0.32\" -fPIC "-I/usr/lib/perl/5.8/CORE"
    > BerkeleyDB.c BerkeleyDB.xs:68:16: error: db.h: No such file or directory


    Here is your problem: you don't have db.h, or, at least, not where perl
    is looking for it. Have you installed the appropriate -dev db package?

    Since you seem to be using Debian, it may be easier to install modules
    through the package manager. This will handle external dependancies like
    this for you.

    Ben
     
    Ben Morrow, Oct 31, 2007
    #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. carl d.
    Replies:
    1
    Views:
    417
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    227
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    309
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    1,007
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    183
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page