Item8967: Crashes with CPAN module Net::LDAP::Constant

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.10, 1.1.0
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
Reported By: JulianLevens
Waiting For:
Last Change By: KennethLavrsen
After installing the LdapContrib, I discovered that install via configure failed. The message was the Net::LDAP::Constant did not export the requested subroutines.

This module creates these subroutines dynamically by scanning the documentation embedded in the code. I assume that this unusual practice causes the problem.

Foswiki is not responsible for CPAN modules. However, no CPAN module should break the install process.

I hacked the code locally to comment out the use Net:LDAP::Constant ... and explicitly declare the three functions recognised, but that's hardly ideal and adds a future maintenance burden.

-- JulianLevens - 03 May 2010

I don't understand the issue here. From the log posted in Support/Question560 it appears that the install actually runs to completion. And you report that the LdapContrib functions after installation.

The Dependency check actually loads each dependency in order to be able to get the version from the module. It also detects and reports load failures. Foswiki 1.1 goes a bit further and can report a dependency as satisfied even if the module fails to compile.

Ah. I've tried to recreate on 1.0.9 and 1.1 w/ Strawberry perl. When run from the command prompt, during the dependency check Strawberry pops up a confirmation dialog stating that it was unable to find libeay32_.dll and the installer script appears to hang. I've found some reports of others having trouble with that library on Strawberry perl. I currently don't have a solution. The 1.1 we installer seems to bypass the error because it doesn't attempt to install the CPAN dependences.

-- GeorgeClark - 30 Jun 2010

Reading this thread: http://groups.google.com/group/perl.par/browse_thread/thread/32ef41cc0553d5c0 it sounds like it might be a packaging problem with one of the perl modules.

-- GeorgeClark - 30 Jun 2010

I am not reporting an error with LDAPContrib, but with configure. LdapContrib installs fine. However, the cpan module Net::LDAP::Constant is now installed on my system. Subsequently any install via configure, not just LdapContrib, fails with the aforementioned error.

-- JulianLevens - 30 Jun 2010

I have been unable to reproduce this problem on trunk. George, do you understand the problem? Can you explain? Is this the same as the problem Padraig Lennon was trying to debug on IRC yesterday?

-- CrawfordCurrie - 20 Jul 2010

PadraigLennon helped debug it in Item9311 and found out that StringifierContrib uses Module::Pluggable which screws up configure.

It seems Net::LDAP::Constant does the same tricky thing playing with the symbol table, and when run through configure, this fails. Will try to figure out why, because configure cannot guarantee itself against such failures, but maybe it can protect itself a bit more.

-- OlivierRaginel - 27 Jul 2010

Tried to reproduce it without success frown, sad smile

-- OlivierRaginel - 27 Jul 2010

I think we've found part of the problem. When Foswiki is configured for LDAP authentication and LDAP mapping, configure can't create a Foswiki environment for checking in modified files against the admin user. A workaround is to set the LoginManager to 'none' and the Mapping manager to BaseUserMapping in extender.pl.

It doesn't explain why LDAP is having trouble, but it is probably preferable that configure run using the minimum default mapper / login manager. Configure needs to be functional when mapping and/or Foswiki authentication is not working correctly.

-- GeorgeClark - 28 Jul 2010

Babar, I've checked in fixes to 1.0.10 and 1.1 that overrides the MappingManager and PasswordManager to use the minimal configuration when installing extensions.

I believe that this resolves the issue, but if you (or anyone else) can recreate or test, please do.

Changing this to Waiting for Release. No negative feedback,

-- GeorgeClark - 12 Aug 2010

Good timing, I just hit this myself today. Installed LdapContrib yesterday and got the funny error about the constants, yet it didn't seem to cause a functional problem.

This morning I tried to install LdapNgPlugin, which failed due to an error about extender.pl

I found this page, applied the patch to my extender.pl, and this time the plugin install succeeded - although it still complained about the constants, thinking that error meant that the contrib wasn't installed, so it went and tried to reinstall the contrib. It downloaded the installer, but failed to run it. Since I already had it installed and working, that didn't matter.

Afterward I installed GluePlugin to test the install of an unrelated plugin and it installed perfectly normal.

Here's the output from my HTTPD error log for the reinstall of LdapNgPlugin in case it is useful to anybody:

[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] ************************************************************, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Could not load /var/www/html/foswiki/tools/extender.pl, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] There was a compile error: "LDAP_SUCCESS" is not exported by the Net::LDAP::Constant module, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203]  "LDAP_SIZELIMIT_EXCEEDED" is not exported by the Net::LDAP::Constant module, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203]  "LDAP_CONTROL_PAGED" is not exported by the Net::LDAP::Constant module, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Can't continue after import errors at /var/www/html/foswiki/lib/Foswiki/Contrib/LdapContrib.pm line 21, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] BEGIN failed--compilation aborted at /var/www/html/foswiki/lib/Foswiki/Contrib/LdapContrib.pm line 21, <DATA> chunk 1., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Compilation failed in require at /var/www/html/foswiki/lib/Foswiki/Users/LdapUserMapping.pm line 21, <DATA> chunk 1., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] BEGIN failed--compilation aborted at /var/www/html/foswiki/lib/Foswiki/Users/LdapUserMapping.pm line 21, <DATA> chunk 1., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Compilation failed in require at (eval 32) line 3, <DATA> chunk 1., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] BEGIN failed--compilation aborted at /var/www/html/foswiki/tools/extender.pl line 151, <DATA> chunk 1., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] , referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Error when trying to eval the file content: This installer must be run from the root directory of a Foswiki installation at (eval 33) line 116., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] BEGIN failed--compilation aborted at (eval 33) line 151., referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] , referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin
[Thu Aug 12 10:39:00 2010] [error] [client 172.18.130.203] Installation of LdapContrib failed: 512, referer: http://wiki.citizensfla.com/bin/configure?action=InstallExtension;repository=Foswiki.org;extension=LdapNgPlugin

To summarize, everything works after applying the patch to extender.pl - although it still doesn't look too pretty, in part or fully thanks to the CPAN module quirk. I'm not really sure why there's still an error being reported about loading extender.pl, this logging is post-patch where before I got the extender.pl error in the configure output, and nothing actually worked.

-- RasmusPraestholm - 12 Aug 2010
 

ItemTemplate edit

Summary Crashes with CPAN module Net::LDAP::Constant
ReportedBy JulianLevens
Codebase 1.0.8
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:96a07e44122a distro:9620e8a641c8
TargetRelease patch
ReleasedIn 1.0.10, 1.1.0
Topic revision: r14 - 08 Sep 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy