"make" errors for installing Net::LDAP

Posted on 2002-06-07
Last Modified: 2012-06-27
I am getting some errors while installing perl module Net::LDAP
I am installing according to perl documentation mentioned in

1. gunzip *.gz
2. tar xvf *.tar
3. perl Makefile.PL
4. make

Steps 1-3 executed without errors.
step4 yielded this error

nev# /usr/ccs/bin/make
gcc -c -I /iplanet/suitespot/plugins/include/ldapsdk31 -I/usr/local/include
ION=\"1.42\" -fPIC -I /perl/lib/5.6.0/sun4-solaris/CORE -DNETSCAPE_LDAP LDAP
LDAPapi.xs: In function `av2modvals':
LDAPapi.xs:95: `na' undeclared (first use in this function)
LDAPapi.xs:95: (Each undeclared identifier is reported only once
LDAPapi.xs:95: for each function it appears in.)
LDAPapi.xs: In function `parse1mod':
LDAPapi.xs:197: `na' undeclared (first use in this function)
LDAPapi.xs: In function `XS_Net__LDAPapi_ldap_search':
LDAPapi.xs:578: `na' undeclared (first use in this function)
LDAPapi.xs: In function `XS_Net__LDAPapi_ldap_search_s':
LDAPapi.xs:614: `na' undeclared (first use in this function)
LDAPapi.xs: In function `XS_Net__LDAPapi_ldap_search_st':
LDAPapi.xs:660: `na' undeclared (first use in this function)
LDAPapi.xs: In function `XS_Net__LDAPapi_ldap_url_parse':
LDAPapi.xs:1137: `sv_undef' undeclared (first use in this function)
LDAPapi.xs: In function `XS_Net__LDAPapi_ldap_multisort_entries':
LDAPapi.xs:1221: `na' undeclared (first use in this function)
*** Error code 1
make: Fatal error: Command failed for target `LDAPapi.o'  

Can you tell me why this error is happening?
p.s Im using Iplanet webserver.

Here is my perl output
 perl Makefile.PL

Net::LDAPapi Perl5 Module - by Clayton Donley <>

Enter How I Should Run Perl5 (ex. /usr/bin/perl, c:\perl\bin\perl),

Select your Development Kit:
  1.  Netscape (default)
  2.  University of Michigan
  3.  ISODE (compiled with LDAP)
Choose: Iplanet
Location of LDAP Include Files (default: /usr/include): (i typed)  /iplanet/suitespot/plugins/include/ldapsdk31
Location of LDAP Library Files (default: /usr/lib): (i left it default)
Using Netscape's NEW LDAPv3 Development Kit (default: n)? n (not sure?)
Note (probably harmless): No library found for -lldap10
Writing Makefile for Net::LDAPapi  

thanks a lot,

p.s I did try doing "make install" , that also gave same errors ,and  my perl program that uses ldap module gave compilation error

nev# perl phone.cgi
Can't locate Convert/ in @INC (@INC contains:/perl/lib/5.6.0/sun4-so
laris /perl/lib/5.6.0 /perl/lib/site_perl/5.6.0/sun4-solaris /per
l/lib/site_perl/5.6.0 /snps/perl/lib/site_perl .) at  /perl/lib/site_perl/5.
6.0/Net/LDAP/ line 7.
BEGIN failed--compilation aborted at /perl/lib/site_perl/5.6.0/Net/LDAP/BER
.pm line 7.
Compilation failed in require at /perl/lib/site_perl/5.6.0/Net/ line
BEGIN failed--compilation aborted at /perl/lib/site_perl/5.6.0/Net/
line 10.
Compilation failed in require at phone.cgi line 3.
BEGIN failed--compilation aborted at phone.cgi line 3.  

Any help is appreciated!!

Thanks !!!
Question by:chazhs
  • 4
  • 3
  • 2
LVL 51

Expert Comment

ID: 7067800
AFAIK Net::LDAP requires Netscape/iPlanet's ldapsdk. Did you install the ldapsdk?

Author Comment

ID: 7068219
No I have not installed the sdk. Where can I find it ?

couldnt find at

Thanks for your time!
LVL 51

Accepted Solution

ahoffmann earned 200 total points
ID: 7068291
check at
search for ldapsdk
You need to download and install it
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Expert Comment

ID: 7069819 also works fine with Net::LDAP.
Other usefull toys going well along Net::LDAP:
XML::Parser, URI, IO::Socket::SSL,
Digest::MD5, Convert::ASN1, Net::SSLeay.
LVL 51

Expert Comment

ID: 7070537
take care !
Net::LDAP builds .so libraries which depend on the installed SDK.
AFAIK you cannot build with Netscape SDK and run against openldap (I'm not absolutely shure, it's way too long when I installed my Net::LDAP)

Author Comment

ID: 7070561
Thanks. I did install ldapsdk, still got some fatal errors. Today I am going to install Convert::ASN1 module also.
Will let you know how it goes.
Thanks again!

Author Comment

ID: 7070839
I installed ldapsdk, Convert::ASN1,Digest::MD5,URI::ldap and XML::Parser
and my program runs perfectly.
Thank you ahoffman and rrbf for your valuable time!  

Expert Comment

ID: 7071781
to compile with openldap, choose 'university of michigan',
The openldap code is but a branch from it.
it sure does work, as I use it.
LVL 51

Expert Comment

ID: 7072152
rrbf, didn't say that Net::LDAP does not work with openldap, just said that I'm not shure if it works with openldap when Net::LDAP was compiled with ldapsdk from Netscape. It might work, but I'm not shure ..

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (,  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question