Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > perl and db-module

Reply
Thread Tools

perl and db-module

 
 
Sebastian Diedrich
Guest
Posts: n/a
 
      01-31-2004
hi all,

i have some problems with perl and the berkeley-db-module. when i
start a perl-prog such as cyradm (cyrus-imap) or some other that uses
the berkeley-db; perl throws this error:

<---------------------------
Can't load '/usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/Cyrus/IMAP/IMAP.so'
for module Cyrus::IMAP:
/usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/Cyrus/IMAP/IMAP.so:
undefined symbol: db_version at
/usr/lib/perl5/5.6.1/i586-linux/DynaLoader.pm line 206.
at /usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Admin.pm line
44
Compilation failed in require at
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Admin.pm line 44.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Admin.pm line 44.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Shell.pm line 60.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.6.1/i586-linux/Cyrus/IMAP/Shell.pm line 60.
Compilation failed in require.
BEGIN failed--compilation aborted.
---------------------------->

i' m on an suse 7.3 box with berkeley 3.1 and perl. 5.0.6.1 (revision
5.0 version 6 subversion 1). db_file is version is 1.807 (detected
with: perl -e 'use DB_File; print "DB_File ver $DB_File::VERSION\n"').
have anyone an idea how to solve this problem?

thanx in advance

cya
sebastian
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      01-31-2004

(Sebastian Diedrich) wrote:
> i have some problems with perl and the berkeley-db-module. when i
> start a perl-prog such as cyradm (cyrus-imap) or some other that uses
> the berkeley-db; perl throws this error:
>
> <---------------------------
> Can't load '/usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/Cyrus/IMAP/IMAP.so'
> for module Cyrus::IMAP:
> /usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/Cyrus/IMAP/IMAP.so:
> undefined symbol: db_version at

<snip>
>
> i' m on an suse 7.3 box with berkeley 3.1 and perl. 5.0.6.1 (revision
> 5.0 version 6 subversion 1).


That's odd... perl -v does indeed say 'revision 5.0 version...'.
This is referred to as perl 5.6.1.

> db_file is version is 1.807 (detected
> with: perl -e 'use DB_File; print "DB_File ver $DB_File::VERSION\n"').


If you can load DB_File then that is not your problem. Try
reinstalling the Cyrus::IMAP module.

Ben

--
Razors pain you / Rivers are damp
Acids stain you / And drugs cause cramp. [Dorothy Parker]
Guns aren't lawful / Nooses give
Gas smells awful / You might as well live.
 
Reply With Quote
 
 
 
 
Dan Bent
Guest
Posts: n/a
 
      02-13-2004
non existent <> wrote in message news:<>. ..
> On Sat, 31 Jan 2004 03:15:08 -0800, Sebastian Diedrich wrote:
>
> > i have some problems with perl and the berkeley-db-module. when i start
> > a perl-prog such as cyradm (cyrus-imap) or some other that uses the
> > berkeley-db; perl throws this error:
> >
> > <---------------------------
> > Can't load
> > '/usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/Cyrus/IMAP/IMAP.so' for
> > module Cyrus::IMAP:

>
> I hardly know how to spell perl but in regards to a complied from source
> cyrus-imapd that was installed in the default /usr/local location I was
> able to: 'export
> PERL5LIB=/usr/local/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi'
> thereby adding this path to perl's @INC and working around the problem. If
> your cyrus_imapd is installed in /usr/local, and not /usr adjust the
> example for your paths.
>
> Chris


I am also perl impaired. I'm having the same problem on FreeBSD
5.1-RELEASE, and perl 5.8.3. I tried the solution above (at least I
think I did - I exported the environment variable, adjusted to match
my system, and ran cyradm. I didn't compile anything with the
environment variable set), but got the same result. There's a comment
near line 229 in DynaLoader.pm:

# Many dynamic extension loading problems will appear to come from
# this section of code: XYZ failed at line 123 of DynaLoader.pm.
# Often these errors are actually occurring in the initialisation
# C code of the extension XS file. Perl reports the error as being
# in this perl code simply because this was the last perl code
# it executed.

Sorry I'm no help, but I'd like to learn the solution, myself.
 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      02-13-2004

(Dan Bent) wrote:
> non existent <> wrote in message news:<>. ..
> >
> > I hardly know how to spell perl but in regards to a complied from source
> > cyrus-imapd that was installed in the default /usr/local location I was
> > able to: 'export
> > PERL5LIB=/usr/local/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi'
> > thereby adding this path to perl's @INC and working around the
> > problem.

>
> I am also perl impaired.


An unfortunate state to be in, to be sure; but I believe it's curable .

> I'm having the same problem on FreeBSD 5.1-RELEASE, and perl
> 5.8.3. I tried the solution above (at least I think I did - I
> exported the environment variable, adjusted to match my system, and
> ran cyradm. I didn't compile anything with the environment variable
> set


That shouldn't be necessary: if the compilation succeeded, it found
everything it needed anyway.

> ), but got the same result. There's a comment
> near line 229 in DynaLoader.pm:
>
> # Many dynamic extension loading problems will appear to come from


[ dynamic-extension loading-problems, but never mind... ]

> # this section of code: XYZ failed at line 123 of DynaLoader.pm.
> # Often these errors are actually occurring in the initialisation
> # C code of the extension XS file. Perl reports the error as being
> # in this perl code simply because this was the last perl code
> # it executed.
>
> Sorry I'm no help, but I'd like to learn the solution, myself.


Right, what was the *exact* error message you got? Usually it's
something like (example taken from a module I'm working on at the
moment)

Can't load '.../auto/Hook/CallStack/CallStack.so' for module
Hook::CallStack: .../auto/Hook/CallStack/CallStack.so: undefined
symbol: SvSetSv_nosteal at .../DynaLoader.pm line 229.

If it is like this, the name of the undefined symbol is a big clue as
to where the problem lies.

Ben

--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased]
 
Reply With Quote
 
Dan Bent
Guest
Posts: n/a
 
      02-13-2004
<snip>
> Right, what was the *exact* error message you got? Usually it's
> something like (example taken from a module I'm working on at the
> moment)
>
> Can't load '.../auto/Hook/CallStack/CallStack.so' for module
> Hook::CallStack: .../auto/Hook/CallStack/CallStack.so: undefined
> symbol: SvSetSv_nosteal at .../DynaLoader.pm line 229.
>
> If it is like this, the name of the undefined symbol is a big clue as
> to where the problem lies.
>
> Ben

Right on! Here's my error message.

Can't load '/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/auto/Cyrus/IMAP/IMAP.so'
for module Cyrus::IMAP:
/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/auto/Cyrus/IMAP/IMAP.so:
Undefined symbol "db_version" at
/usr/local/lib/perl5/5.8.3/i386-freebsd/DynaLoader.pm line 229.
at /usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Cyrus/IMAP/Admin.pm
line 44
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Cyrus/IMAP/Admin.pm
line 44.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Cyrus/IMAP/Admin.pm
line 44.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Cyrus/IMAP/Shell.pm
line 60.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Cyrus/IMAP/Shell.pm
line 60.
Compilation failed in require.
BEGIN failed--compilation aborted.

I've been discussing this with a fellow who solved a similar problem
on Suse 7.1. He says:
i have de-installed berkeley 3.1 devel-packages (comes with suse
standard-install). after that - cyradm runs fine. i think it was the
additional installation of an different berkeley-version that course
the problem. the devel-pkg make some sym-links for berkeley < 3.1 ->
and that's the prob!

So, we're clearly on the trail. I just need to learn how to identify,
and un-install the offending berkeley db libraries. I installed
Berkeley 4.2 earlier in this process, and I'm afraid I might break
something if I am not careful.

Thanks for your help in this, by the way. I have a Camel book (it's
good read for a technical manual), and I'm learning about perl
 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      02-13-2004

(Dan Bent) wrote:
> Can't load '/.../auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP:
> /.../auto/Cyrus/IMAP/IMAP.so: Undefined symbol "db_version" at
> /.../DynaLoader.pm line 229.
>
> I've been discussing this with a fellow who solved a similar problem
> on Suse 7.1. He says:
> i have de-installed berkeley 3.1 devel-packages (comes with suse
> standard-install). after that - cyradm runs fine. i think it was the
> additional installation of an different berkeley-version that course
> the problem. the devel-pkg make some sym-links for berkeley < 3.1 ->
> and that's the prob!
>
> So, we're clearly on the trail. I just need to learn how to identify,
> and un-install the offending berkeley db libraries. I installed
> Berkeley 4.2 earlier in this process, and I'm afraid I might break
> something if I am not careful.


It certainly looks like the db libs are the problem... on my machine,
I have 3 versions installed: libdb-1.so with no symbol db_version,
libdb-3.2.so with db_version, libdb-4.0.so with db_version_4000, and a
bunch of symlinks. The headers for db4 have

#define db_version db_version_4000

so I wonder if this may be part of your problem... What versions do
you have installed, and what db_version symbols do they define (nm -D
/usr/lib/libdb-1.so | grep db_version)? Also, which libs is IMAP.so
trying to load (ldd /.../Cyrus/IMAP/IMAP.so | grep db)?

I suspect that in your friend's case, IMAP.so was built against db <
3.1 and thus it failed, whereas yours is built against db-3.*, and
thus is looking for a db_version rather than a db_version_4000 symbol;
the answer if this is the case is to rebuild IMAP.so against the
currently installed libraries.

Ben

--
If you put all the prophets, | You'd have so much more reason
Mystics and saints | Than ever was born
In one room together, | Out of all of the conflicts of time.
|----------------+---------------| The Levellers, 'Believers'
 
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
ActiveState Perl and MinGW [was: Perl 5.14 Windows Strawberry Perl 64 bits] Dilbert Perl Misc 0 11-10-2011 02:20 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 02-27-2011 11:00 PM
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 AM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



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