perl backend can't use dynamically loaded modules (DBI, POSIX...)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openldap |
Invalid
|
Undecided
|
Unassigned | ||
openldap (Debian) |
Fix Released
|
Unknown
|
|||
openldap (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
openldap2.2 (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
openldap2.3 (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
In slapd back_perl backend if I "use" a module I get "unresolved symbol" errors.
I'm using slapd-2.
Everything works if I don't use modules. For example if in my module i "use DBI", running "slapd -d 0" I get:
slapd: symbol lookup error: /usr/lib/
if I instead "use POSIX" as in the SampleLDAP.pm module given in the openldap sources, i get:
Error Can't load '/usr/lib/
at /usr/lib/
Searching for documentation, I've found this article http://
Am I missing something obvious, or there's been a misalignment in the releases of slapd and perl packages?
To reproduce the error:
define a perl backend "db" adding the following lines to the end of /etc/ldap/
moduleload back_perl
database perl
suffix "dc=perl,
perlModulePath /etc/perl/
perlModule SampleLDAP
Create a file with the following lines in /etc/perl/
package SampleLDAP;
use POSIX;
sub new
{
my $class = shift;
my $this = {};
bless $this, $class;
print STDERR "Posix Var " . BUFSIZ . " and " . FILENAME_MAX . "\n";
return $this;
}
sub init
{
print STDERR "Here in init\n";
return 0;
}
1;
Now you should start slapd:
sudo slapd
You'll get:
Error Can't load '/usr/lib/
at /usr/lib/
Compilation failed in require at /etc/perl/
BEGIN failed--compilation aborted at /etc/perl/
Compilation failed in require at (eval 2) line 1.
BEGIN failed--compilation aborted at (eval 2) line 1.
Using /etc/init.d/slapd start does NOT print the message because the output of start-stop-daemon is put in a $reason variable that's not printed, logged or evaluated (script bug?) but if you add echo $reason to the script you get the same error.
Changing the "use"d module changes the situation only slightly, for example substituting "use POSIX" with "use DBI" you get:
slapd: symbol lookup error: /usr/lib/
I'd more than willing to perform more tests if you can suggest some.
Ciao,
Roberto Maurizzi
description: | updated |
Changed in openldap2.2: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in openldap2.2: | |
status: | Unknown → New |
Changed in openldap2.2: | |
status: | New → Fix Released |
Changed in openldap2.3: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in openldap2.2: | |
status: | Fix Released → New |
Changed in openldap2.2: | |
status: | New → Confirmed |
Changed in openldap: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in openldap2.3: | |
status: | Triaged → Invalid |
Changed in openldap2.2: | |
status: | Triaged → Invalid |
Changed in openldap (Debian): | |
status: | Confirmed → Fix Released |
On Sun, Sep 11, 2005 at 10:13:53AM +0200, Marc Chantreux wrote:
> Package: slapd
> Version: 2.2.26-4
> Severity: normal
Hi. Same behaviour with 2.2.23-8 (Sarge)
> this message was produced by slapd while loading SampleLDAP.pm
provided in the
> openldap source tree:
(and after having copied the 4 sample lines in the comments on the top
of the module file to the slapd.conf configuration file)
> Error Can't load '/usr/lib/ perl/5. 8/auto/ POSIX/POSIX. so' for module
POSIX:
> [...]
Got the same here.
It looks like the compilation of upstream 2.2.30 version doesn't raise
these errors. What about its packaging for unstable?
Cheers,
--
Cyril Brulebois