Activity log for bug #90812

Date Who What changed Old value New value Message
2007-03-10 14:24:52 Roberto Maurizzi bug assigned to openldap2.2 (Ubuntu)
2007-03-10 15:37:32 Roberto Maurizzi description In slapd back_perl backend if I "use" a module I get "unresolved symbol" errors. I'm using slapd-2.2.26-5ubuntu3.1 on Edgy. 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/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr if I instead "use POSIX" as in the SampleLDAP.pm module given in the openldap sources, i get: Error Can't load '/usr/lib/perl/5.8/auto/POSIX/POSIX.so' for module POSIX: /usr/lib/perl/5.8/auto/POSIX/POSIX.so: undefined symbol: PL_sig_name at /usr/lib/perl/5.8/XSLoader.pm line 70. at /usr/lib/perl/5.8/POSIX.pm line 26 Searching for documentation, I've found this article http://www.samag.com/documents/s=9370/sam0505g/0505g.htm that stresses the importance that both openldap and perl are compiled with the same compiler version and options. 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/slapd.conf: module_load back_perl database perl suffix "dc=perl,dc=example,dc=com" perlModulePath /etc/perl/SampleLDAP.pm perlModule SampleLDAP Create a file with the following lines in /etc/perl/SampleLDAP.pm 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/perl/5.8/auto/POSIX/POSIX.so' for module POSIX: /usr/lib/perl/5.8/auto/POSIX/POSIX.so: undefined symbol: PL_sig_name at /usr/lib/perl/5.8/XSLoader.pm line 70. at /usr/lib/perl/5.8/POSIX.pm line 26 Compilation failed in require at /etc/perl/SampleLDAP.pm line 2. BEGIN failed--compilation aborted at /etc/perl/SampleLDAP.pm line 2. 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/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr I'd more than willing to perform more tests if you can suggest some. Ciao, Roberto Maurizzi In slapd back_perl backend if I "use" a module I get "unresolved symbol" errors. I'm using slapd-2.2.26-5ubuntu3.1 on Edgy. 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/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr if I instead "use POSIX" as in the SampleLDAP.pm module given in the openldap sources, i get: Error Can't load '/usr/lib/perl/5.8/auto/POSIX/POSIX.so' for module POSIX: /usr/lib/perl/5.8/auto/POSIX/POSIX.so: undefined symbol: PL_sig_name at /usr/lib/perl/5.8/XSLoader.pm line 70. at /usr/lib/perl/5.8/POSIX.pm line 26 Searching for documentation, I've found this article http://www.samag.com/documents/s=9370/sam0505g/0505g.htm that stresses the importance that both openldap and perl are compiled with the same compiler version and options. 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/slapd.conf: moduleload back_perl database perl suffix "dc=perl,dc=example,dc=com" perlModulePath /etc/perl/SampleLDAP.pm perlModule SampleLDAP Create a file with the following lines in /etc/perl/SampleLDAP.pm 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/perl/5.8/auto/POSIX/POSIX.so' for module POSIX: /usr/lib/perl/5.8/auto/POSIX/POSIX.so: undefined symbol: PL_sig_name at /usr/lib/perl/5.8/XSLoader.pm line 70. at /usr/lib/perl/5.8/POSIX.pm line 26 Compilation failed in require at /etc/perl/SampleLDAP.pm line 2. BEGIN failed--compilation aborted at /etc/perl/SampleLDAP.pm line 2. 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/perl5/auto/DBI/DBI.so: undefined symbol: Perl_Tstack_sp_ptr I'd more than willing to perform more tests if you can suggest some. Ciao, Roberto Maurizzi
2007-09-03 21:27:07 Mathias Gug openldap2.2: importance Undecided Medium
2007-09-03 21:27:07 Mathias Gug openldap2.2: status New Triaged
2007-09-03 21:40:01 Mathias Gug bug assigned to openldap2.2 (Debian)
2007-09-04 08:09:44 Bug Watch Updater openldap2.2: status Unknown New
2007-12-21 09:27:57 Bug Watch Updater openldap2.2: status New Fix Released
2008-02-04 04:40:14 Steve Langasek bug assigned to openldap2.3 (Ubuntu)
2008-02-04 04:40:41 Steve Langasek openldap2.3: importance Undecided Medium
2008-02-04 04:40:41 Steve Langasek openldap2.3: status New Triaged
2008-02-04 04:49:35 Steve Langasek openldap: status New Invalid
2008-02-04 10:24:18 Bug Watch Updater openldap2.2: status Fix Released New
2008-07-13 15:20:23 Bug Watch Updater openldap2.2: status New Confirmed
2008-07-14 18:25:35 Mathias Gug bug assigned to openldap (Ubuntu)
2008-07-14 18:26:03 Mathias Gug openldap: status New Triaged
2008-07-14 18:26:03 Mathias Gug openldap: importance Undecided Medium
2008-07-21 15:59:35 Steve Langasek openldap2.3: status Triaged Invalid
2008-07-21 15:59:53 Steve Langasek openldap2.2: status Triaged Invalid
2010-03-31 20:39:54 Bug Watch Updater bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416266
2011-10-18 14:03:33 Bug Watch Updater openldap (Debian): status Confirmed Fix Released
2012-06-17 19:06:27 Steve Langasek openldap (Ubuntu): status Triaged Fix Released