cpan module install woes - UTF-8 problem?

cpan module install woes - UTF-8 problem?

am 31.10.2007 01:46:28 von 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. 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

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 04:42:44 von Sherm Pendley

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...

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.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 06:21:08 von Troy Piggins

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

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 07:59:11 von Sherm Pendley

Troy Piggins writes:

> Sherman Pendley is quoted & my replies are inline below :
>
>> 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 :)

How to install the C library & headers is dependent on your OS. I didn't get
into that because I didn't know what OS you're using. :-)

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

You need the libdb4.4-dev package.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 08:01:33 von Ben Morrow

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.

> /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

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 08:16:14 von Troy Piggins

* Sherman Pendley is quoted
* & my replies are inline below :
> Troy Piggins writes:
>
>> Sherman Pendley is quoted & my replies are inline below :
>>
>>> 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 :)
>
> How to install the C library & headers is dependent on your OS. I didn't get
> into that because I didn't know what OS you're using. :-)

Sorry. I think it was in my original post but we snipped it
somewhere along the way.

>> Is the missing library installed from cpan, or deb package?
>
> You need the libdb4.4-dev package.

Excellent! Thanks for that. I actually installed libdb4.6-dev
since it was the latest available. It seems to have worked.

--
Troy Piggins | http://piggo.com/~troy
RLU#415538 ,-O (o- O
O ) //\ O
`-O V_/_ OOO

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 08:20:27 von Troy Piggins

* Ben Morrow is quoted
* & my replies are inline below :
>
> 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.
>
>> /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.

Thanks mate. I've resolved it by installing the libdb4.6-dev
package. BerkeleyDB module installs fine now with cpan, but
still having trouble with Mail::ClamAV and some others. I'll
struggle on.

This group the appropriate place to ask these sort of q's?

--
Troy Piggins | http://piggo.com/~troy
RLU#415538 ,-O (o- O
O ) //\ O
`-O V_/_ OOO

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 09:48:25 von Sherm Pendley

Troy Piggins writes:

> * Sherman Pendley is quoted
>>
>> You need the libdb4.4-dev package.
>
> Excellent! Thanks for that. I actually installed libdb4.6-dev
> since it was the latest available.

I looked in stable. If you're using unstable or testing, that probably
accounts for the different verison.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: cpan module install woes - UTF-8 problem?

am 31.10.2007 09:51:12 von Sherm Pendley

Troy Piggins writes:

> This group the appropriate place to ask these sort of q's?

Don't worry - if you question were off-topic, you definitely would have
heard about it by now. :-)

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net