A new release of Net::LDAPapi module is now available for Perl via CPAN. This release includes compilation against OpenLDAP libraries from version 2.1 forward. It now supports LDAPv3, including SASL binds.
Support for the Netscape (now Mozilla) C SDK has been kept, but not tested. I welcome feedback on the usability with the Mozilla C SDK.
Many thanks to Howard Chu and Symas Corporation for the work done to realize LDAPv3 support with Net::LDAPapi.
Net::LDAPapi can be obtained from:
http://search.cpan.org/~mishikal/Net-LDAPapi-2.00/
For those who have never used Net::LDAPapi, it uses the C interface for its LDAP operations. This means that it is much faster than the pure perl Net::LDAP module from the perl-ldap package. However, it also relies on having the C libraries it was linked against available.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Quanah Gibson-Mount wrote:
A new release of Net::LDAPapi module is now available for Perl via CPAN. This release includes compilation against OpenLDAP libraries from version 2.1 forward. It now supports LDAPv3, including SASL binds.
Great, glad to see this finally making it back out to the world.
Support for the Netscape (now Mozilla) C SDK has been kept, but not tested. I welcome feedback on the usability with the Mozilla C SDK.
Many thanks to Howard Chu and Symas Corporation for the work done to realize LDAPv3 support with Net::LDAPapi.
Net::LDAPapi can be obtained from:
http://search.cpan.org/~mishikal/Net-LDAPapi-2.00/
For those who have never used Net::LDAPapi, it uses the C interface for its LDAP operations. This means that it is much faster than the pure perl Net::LDAP module from the perl-ldap package. However, it also relies on having the C libraries it was linked against available.
We've observed a 100:1 speed difference between Net::LDAPapi and Net::LDAP. Usually people writing perl scripts don't seem to take performance or efficiency into account, because they're just coding up a "quickie tool." But it then evolves into something else, and eventually gets deployed into production. We've seen this happen over and over with perl-based web login scripts, where gradually the web server gets bogged down under its authentication load. Switching from Net::LDAP to Net::LDAPapi has helped a number of our customers get their systems back up on their feet.
On Fri Feb 09 2007 at 11:18:32 CET, Howard Chu wrote:
Quanah Gibson-Mount wrote:
A new release of Net::LDAPapi module is now available for Perl via CPAN. This release includes compilation against OpenLDAP libraries from version 2.1 forward. It now supports LDAPv3, including SASL binds.
Great, glad to see this finally making it back out to the world.
So am I: as you have also noted below, it is much faster than Net::LDAP.
It appears to use deprecated calls to OpenLDAP. Defining LDAP_DEPRECATED as 0 or 1 has no effect for me. A `make test' produces
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
What am I doing wrong?
-JP
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
Looks like you're linking wrong, maybe the wrong path, maybe the wrong LDAP library. Does "ldd blib/arch/auto/Net/LDAPapi/LDAPapi.so" produce sane results that match your OpenLDAP libraries?
Zitat von Aaron Richton richton@nbcs.rutgers.edu:
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
Looks like you're linking wrong, maybe the wrong path, maybe the wrong LDAP library. Does "ldd blib/arch/auto/Net/LDAPapi/LDAPapi.so" produce sane results that match your OpenLDAP libraries?
i am not the "intended" reciever of your answer/original poster of the question, but as i have the same error messages maybe it helps:
----- marvin:~/krause/downloads/Perl-Net-LDAPapi-2 # ldd blib/arch/auto/Net/LDAPapi/LDAPapi.so linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/libc.so.6 (0xb7eb4000) /lib/ld-linux.so.2 (0x80000000) marvin:~/krause/downloads/Perl-Net-LDAPapi-2 # ----- is this correct? what should i get?
regards markus
--On Friday, February 09, 2007 5:33 PM +0100 Markus Krause krause@biochem.mpg.de wrote:
Zitat von Aaron Richton richton@nbcs.rutgers.edu:
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
Looks like you're linking wrong, maybe the wrong path, maybe the wrong LDAP library. Does "ldd blib/arch/auto/Net/LDAPapi/LDAPapi.so" produce sane results that match your OpenLDAP libraries?
i am not the "intended" reciever of your answer/original poster of the question, but as i have the same error messages maybe it helps:
Download the 2.01 release.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
i am not the "intended" reciever of your answer/original poster of the question, but as i have the same error messages maybe it helps:
marvin:~/krause/downloads/Perl-Net-LDAPapi-2 # ldd blib/arch/auto/Net/LDAPapi/LDAPapi.so linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/libc.so.6 (0xb7eb4000) /lib/ld-linux.so.2 (0x80000000) marvin:~/krause/downloads/Perl-Net-LDAPapi-2 #
is this correct? what should i get?
I'd imagine that you should get references to libldap/liblber, and it osunds like the "2.01" release may help in that matter.
<quote who="Jan-Piet Mens">
On Fri Feb 09 2007 at 11:18:32 CET, Howard Chu wrote:
Quanah Gibson-Mount wrote:
A new release of Net::LDAPapi module is now available for Perl via
CPAN.
This release includes compilation against OpenLDAP libraries from version 2.1 forward. It now supports LDAPv3, including SASL binds.
Great, glad to see this finally making it back out to the world.
So am I: as you have also noted below, it is much faster than Net::LDAP.
It appears to use deprecated calls to OpenLDAP. Defining LDAP_DEPRECATED as 0 or 1 has no effect for me. A `make test' produces
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
What am I doing wrong?
To define LDAP_DEPRECATED, you need to edit Makefile.PL:
113 | 'DEFINE' => '-DOPENLDAP -DLDAP_DEPRECATED',
The make test still fails however:
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl 1..8 Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol: ldap_first_attribute at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. at test.pl line 11 Compilation failed in require at test.pl line 11. BEGIN failed--compilation aborted at test.pl line 11. modinit - not ok make: *** [test_dynamic] Error 2
--On Friday, February 09, 2007 4:42 PM +0100 Jan-Piet Mens jpm@retail-sc.com wrote:
On Fri Feb 09 2007 at 16:38:26 CET, Gavin Henry wrote:
The make test still fails however:
Howard pointed out that the Makefile has no libraries against which it is linking. Add -lldap -llber to Makefile
I found the problem, I'll be releasing 2.01 shortly. ;)
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
--On Friday, February 09, 2007 3:38 PM +0000 Gavin Henry ghenry@suretecsystems.com wrote:
What am I doing wrong?
To define LDAP_DEPRECATED, you need to edit Makefile.PL:
113 | 'DEFINE' => '-DOPENLDAP -DLDAP_DEPRECATED',
The make test still fails however:
Just to follow up on this, 2.01 fixes the linking issues (and is now available from CPAN), and LDAP_DEPRECATED is not a necessary flag, as the module does not use the deprecated routines.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
<quote who="Quanah Gibson-Mount">
--On Friday, February 09, 2007 3:38 PM +0000 Gavin Henry ghenry@suretecsystems.com wrote:
What am I doing wrong?
To define LDAP_DEPRECATED, you need to edit Makefile.PL:
113 | 'DEFINE' => '-DOPENLDAP -DLDAP_DEPRECATED',
The make test still fails however:
Just to follow up on this, 2.01 fixes the linking issues (and is now available from CPAN), and LDAP_DEPRECATED is not a necessary flag, as the module does not use the deprecated routines.
Hmm, I think it still is with 2.01:
LDAPapi.c: In function XS_Net__LDAPapi_ldap_open: LDAPapi.c:431: warning: implicit declaration of function ldap_open LDAPapi.c:431: warning: assignment makes pointer from integer without a cast LDAPapi.xs: In function XS_Net__LDAPapi_ldap_init: LDAPapi.xs:396: warning: implicit declaration of function ldap_init LDAPapi.xs:396: warning: assignment makes pointer from integer without a cast LDAPapi.c: In function XS_Net__LDAPapi_ldap_unbind: LDAPapi.c:657: warning: implicit declaration of function ldap_unbind LDAPapi.c: In function XS_Net__LDAPapi_ldap_unbind_s: LDAPapi.c:680: warning: implicit declaration of function ldap_unbind_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_abandon: LDAPapi.c:731: warning: implicit declaration of function ldap_abandon LDAPapi.c: In function XS_Net__LDAPapi_ldap_add: LDAPapi.c:756: warning: implicit declaration of function ldap_add LDAPapi.c: In function XS_Net__LDAPapi_ldap_add_s: LDAPapi.c:781: warning: implicit declaration of function ldap_add_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_bind: LDAPapi.c:810: warning: implicit declaration of function ldap_bind LDAPapi.c: In function XS_Net__LDAPapi_ldap_bind_s: LDAPapi.c:836: warning: implicit declaration of function ldap_bind_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_simple_bind: LDAPapi.c:861: warning: implicit declaration of function ldap_simple_bind LDAPapi.c: In function XS_Net__LDAPapi_ldap_simple_bind_s: LDAPapi.c:886: warning: implicit declaration of function ldap_simple_bind_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_modify: LDAPapi.c:911: warning: implicit declaration of function ldap_modify LDAPapi.c: In function XS_Net__LDAPapi_ldap_modify_s: LDAPapi.c:936: warning: implicit declaration of function ldap_modify_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_modrdn: LDAPapi.c:961: warning: implicit declaration of function ldap_modrdn LDAPapi.c: In function XS_Net__LDAPapi_ldap_modrdn_s: LDAPapi.c:986: warning: implicit declaration of function ldap_modrdn_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_modrdn2: LDAPapi.c:1012: warning: implicit declaration of function ldap_modrdn2 LDAPapi.c: In function XS_Net__LDAPapi_ldap_modrdn2_s: LDAPapi.c:1038: warning: implicit declaration of function ldap_modrdn2_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_compare: LDAPapi.c:1064: warning: implicit declaration of function ldap_compare LDAPapi.c: In function XS_Net__LDAPapi_ldap_compare_s: LDAPapi.c:1090: warning: implicit declaration of function ldap_compare_s LDAPapi.c: In function XS_Net__LDAPapi_ldap_delete: LDAPapi.c:1114: warning: implicit declaration of function ldap_delete LDAPapi.c: In function XS_Net__LDAPapi_ldap_delete_s: LDAPapi.c:1138: warning: implicit declaration of function ldap_delete_s LDAPapi.xs: In function XS_Net__LDAPapi_ldap_search: LDAPapi.xs:656: warning: implicit declaration of function ldap_search LDAPapi.xs: In function XS_Net__LDAPapi_ldap_search_s: LDAPapi.xs:696: warning: implicit declaration of function ldap_search_s LDAPapi.xs: In function XS_Net__LDAPapi_ldap_search_st: LDAPapi.xs:744: warning: implicit declaration of function ldap_search_st LDAPapi.c: In function XS_Net__LDAPapi_ldap_result2error: LDAPapi.c:1672: warning: implicit declaration of function ldap_result2error LDAPapi.c: In function XS_Net__LDAPapi_ldap_perror: LDAPapi.c:1826: warning: implicit declaration of function ldap_perror LDAPapi.xs: In function XS_Net__LDAPapi_ldap_explode_dn: LDAPapi.xs:961: warning: implicit declaration of function ldap_value_free LDAPapi.xs: In function XS_Net__LDAPapi_ldap_get_values: LDAPapi.xs:1064: warning: implicit declaration of function ldap_get_values LDAPapi.xs:1064: warning: assignment makes pointer from integer without a cast LDAPapi.xs: In function XS_Net__LDAPapi_ldap_set_rebind_proc: LDAPapi.xs:1136: warning: passing argument 2 of ldap_set_rebind_proc from incompatible pointer type LDAPapi.xs: In function XS_Net__LDAPapi_ldap_sort_entries: LDAPapi.xs:1335: warning: implicit declaration of function ldap_sort_entries
--On Friday, February 09, 2007 9:11 PM +0000 Gavin Henry ghenry@suretecsystems.com wrote:
<quote who="Quanah Gibson-Mount"> > > > --On Friday, February 09, 2007 3:38 PM +0000 Gavin Henry > <ghenry@suretecsystems.com> wrote: > > >>> What am I doing wrong? >> >> To define LDAP_DEPRECATED, you need to edit Makefile.PL: >> >> 113 | 'DEFINE' => '-DOPENLDAP -DLDAP_DEPRECATED', >> >> The make test still fails however: > > Just to follow up on this, 2.01 fixes the linking issues (and is now > available from CPAN), and LDAP_DEPRECATED is not a necessary flag, as the > module does not use the deprecated routines.
Hmm, I think it still is with 2.01:
Hm, I don't get those errors at all. And the only LDAP libs anywhere on my system are the OpenLDAP 2.3 ones.
I get:
LDAPapi.c: In function 'XS_Net__LDAPapi_ldap_open': LDAPapi.c:417: warning: assignment makes pointer from integer without a cast LDAPapi.xs: In function 'XS_Net__LDAPapi_ldap_init': LDAPapi.xs:396: warning: assignment makes pointer from integer without a cast LDAPapi.xs: In function 'XS_Net__LDAPapi_ldap_get_values': LDAPapi.xs:1064: warning: assignment makes pointer from integer without a cast LDAPapi.xs: In function 'XS_Net__LDAPapi_ldap_set_rebind_proc': LDAPapi.xs:1136: warning: passing argument 2 of 'ldap_set_rebind_proc' from incompatible pointer type
I've tried to reproduce what you are reporting on Solaris 8, Solaris 9, 32-bit Linux, 64-bit Linux, and both gcc 4.0.3 and gcc 4.1.1. I simply don't get the errors you report.
In any case, I'll look at ignoring the deprecated API when the SDK is OpenLDAP.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Zitat von Jan-Piet Mens jpm@retail-sc.com:
On Fri Feb 09 2007 at 11:18:32 CET, Howard Chu wrote:
Quanah Gibson-Mount wrote:
A new release of Net::LDAPapi module is now available for Perl via CPAN. This release includes compilation against OpenLDAP libraries from version 2.1 forward. It now supports LDAPv3, including SASL binds.
Great, glad to see this finally making it back out to the world.
So am I: as you have also noted below, it is much faster than Net::LDAP.
It appears to use deprecated calls to OpenLDAP. Defining LDAP_DEPRECATED as 0 or 1 has no effect for me. A `make test' produces
Can't load 'blib/arch/auto/Net/LDAPapi/LDAPapi.so' for module \ Net::LDAPapi: blib/arch/auto/Net/LDAPapi/LDAPapi.so: undefined symbol:\ ldap_value_free at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm \ line 230. at test.pl line 11
I also just downloaded the module file and got exact the same error with "make test" here (testing on SLES10). (i omitted the error messages ase the are already listed above)
Any suggestions?
openldap-software@openldap.org