perl and db-module

S

Sebastian Diedrich

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
 
B

Ben Morrow

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

Dan Bent

non existent said:
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.
 
B

Ben Morrow

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
 
D

Dan Bent

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
 
B

Ben Morrow

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top