Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > cpan module install woes - UTF-8 problem?

Reply
Thread Tools

cpan module install woes - UTF-8 problem?

 
 
Troy Piggins
Guest
Posts: n/a
 
      10-31-2007
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
 
Reply With Quote
 
 
 
 
Troy Piggins
Guest
Posts: n/a
 
      10-31-2007
Sherman Pendley is quoted & my replies are inline below :

> Troy Piggins <usenet-> 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
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      10-31-2007

Quoth Troy Piggins <usenet->:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 2.6 What modules and extensions are available for Perl? What is CPAN? What does CPAN/src/... mean? PerlFAQ Server Perl Misc 0 01-24-2011 11:00 PM
on windows 7 / cygwin / perl / cpan - cannot make cpan work SVCitian Perl Misc 1 10-22-2010 03:59 PM
rt.cpan.org, search.cpan.org: why so unuseable? Ben Bullock Perl Misc 12 07-08-2008 12:51 PM
Is there a better way to search CPAN than search.cpan.org? usenet@DavidFilmer.com Perl Misc 5 10-12-2005 04:50 AM
Upgrading to CPAN.pm v1.76 install Bundle::CPAN fails carl d. Perl Misc 1 05-10-2005 09:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57