Closed Bug 289409 Opened 20 years ago Closed 11 months ago

Cannot build PerLDAP on HP-UX with HP ANSI C

Categories

(Directory :: PerLDAP, defect)

Other
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: ralph.grothe, Assigned: leif)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier: 

Dear LDAP SDK Maintainers,

I face (the usual) 3rd party API Perl module installation nightmare.

I have installed the Netscape Directory Server (NDS) 6.11 from an HP SD depot
that software.hp.com offer for free download.
The installation platform is an HP L-Class server operating on HP-UX 11.00

The HP NDS is (as it appears to me) correctly installed and working.
I already deployed a new directory that simply migrated the 15000 entries of
the /etc/passwd from an HP MC/SG cluster as posixAccount objects.
Together with the ldapsearch and ldapmodify binaries that came with the HP SD 
depot I can successfully manipulate entries in my directory.

As it seems, the HP SD depot also included the (precompiled) libraries and 
header files from your LDAP C SDK, and even an nsperl called binary that has
perldap already incorporated.
But using this nsperl built is not really an option to me since it is really
dated 
(i.e. Perl 5.005_03, while my custom Perl build is
# perl -V:version
version='5.8.6';
)

But what makes it unusable is that it is either producing coredumps
(e.g. if SHLIB_PATH isn't set), and above is searching for libs in really odd 
places (n.b. NSDS_ROOT is a custom env var I set that is pointing to the NDS
install target on HP-UX, viz. /var/opt/netscape/servers)


# chatr $NSDS_ROOT/lib/nsPerl5.005_03/bin/perl
/var/opt/netscape/servers/lib/nsPerl5.005_03/bin/perl: 
         shared executable 
         shared library dynamic path search:
             SHLIB_PATH     enabled   first  
             embedded path  disabled  second Not Defined
         shared library list:
             dynamic   /u/richm/perlsrc/hpux/perl5.005_03/libperl.sl
             dynamic   /usr/lib/libnsl.1
             dynamic   /usr/lib/libnm.sl
             dynamic   /usr/lib/libndbm.2
             dynamic   /usr/lib/libdld.2
             dynamic   /usr/lib/libm.2
             dynamic   /usr/lib/libpthread.1
             dynamic   /usr/lib/libc.2
         shared library binding:
             deferred 
         global hash table disabled
         plabel caching disabled
         shared vtable support disabled
         static branch prediction disabled
         executable from stack: D (default)
         kernel assisted branch prediction enabled
         lazy swap allocation disabled
         text segment locking disabled
         data segment locking disabled
         third quadrant private data space disabled
         fourth quadrant private data space disabled
         third quadrant global data space disabled
         data page size: D (default)
         instruction page size: D (default)
         nulptr references disabled
         shared library private mapping disabled
         shared library text merging disabled


Although I guess one could somehow mend this but this is too fussy for just an
obsolete Perl 5.005

Thus I downloaded perldap 1.4.1 from search.cpan.org and failed during the 
usual (manual) installation of 3rd party Perl modules.

From within the source tarball's top directory:

# SHLIB_PATH=$NSDS_ROOT/lib perl Makefile.PL                         

PerLDAP - Perl 5 Module for LDAP
================================
Directory containing 'include' and 'lib' directory of the Netscape
LDAP Software Developer Kit (default: /usr): /var/opt/netscape/servers
Using LDAPv3 Developer Kit (default: yes)?  
Include SSL Support (default: yes)?  
Located multiple libraries:
 - libldap50.sl
 - libprldap50.sl
 - libssldap50.sl
Libraries to link with (default: -L/var/opt/netscape/servers/lib -lldap50):  
Checking if your kit is complete...
Looks good
Writing Makefile for Mozilla::LDAP::API

# make
cp Conn.pm blib/lib/Mozilla/LDAP/Conn.pm
cp Entry.pm blib/lib/Mozilla/LDAP/Entry.pm
cp Utils.pm blib/lib/Mozilla/LDAP/Utils.pm
cp API.pm blib/lib/Mozilla/LDAP/API.pm
AutoSplitting blib/lib/Mozilla/LDAP/API.pm (blib/lib/auto/Mozilla/LDAP/API)
cp LDIF.pm blib/lib/Mozilla/LDAP/LDIF.pm
cp oldtest.pl blib/lib/Mozilla/LDAP/oldtest.pl
        /usr/bin/perl /opt/perl5/lib/5.8.6/ExtUtils/xsubpp  -nolinenumbers -
typemap /opt/perl5/lib/
5.8.6/ExtUtils/typemap -typemap typemap  API.xs > API.xsc && mv API.xsc API.c
        cc -c  -I/var/opt/netscape/servers/include  +z -Ae -D_HPUX_SOURCE -
Wl,+vnocompatwarnings +D
D64 -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 
+Onolimit    -DVERSION=\"1.
4\"  -DXS_VERSION=\"1.4\" +Z "-I/opt/perl5/lib/5.8.6/PA-RISC2.0-LP64/CORE"  -
DLDAPV3 -DUSE_SSL API.
c
cc: "API.c", line 205: error 1588: "na" undefined.
cc: "API.c", line 205: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 205: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 235: error 1588: "na" undefined.
cc: "API.c", line 235: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 235: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 377: error 1588: "na" undefined.
cc: "API.c", line 377: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 377: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 394: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 394: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 839: error 1588: "na" undefined.
cc: "API.c", line 839: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 839: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 866: error 1588: "na" undefined.
cc: "API.c", line 866: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 866: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 1302: error 1588: "na" undefined.
cc: "API.c", line 1302: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 1302: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 1330: error 1588: "na" undefined.
cc: "API.c", line 1330: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 1330: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2546: error 1588: "na" undefined.
cc: "API.c", line 2546: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2546: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2596: error 1588: "na" undefined.
cc: "API.c", line 2596: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2596: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2624: error 1588: "na" undefined.
cc: "API.c", line 2624: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2624: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2684: error 1588: "na" undefined.
cc: "API.c", line 2684: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2684: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2718: error 1588: "na" undefined.
cc: "API.c", line 2718: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2718: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 2777: error 1588: "na" undefined.
cc: "API.c", line 2777: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 2777: warning 722: Argument #3 converts 32 bit constant to 
pointer.
cc: "API.c", line 3057: error 1588: "sv_undef" undefined.
cc: "API.c", line 3122: error 1588: "na" undefined.
cc: "API.c", line 3122: warning 563: Argument #2 is not the correct type.
cc: "API.c", line 3122: warning 722: Argument #3 converts 32 bit constant to 
pointer.
*** Error exit code 1

Stop.


The first appearence of the undeclared variable na is in this SvPV() function 
call

# find . -type f -name API.c
./API.c

# sed -n 203,206p API.c
   {
      current_val = av_fetch((AV *)SvRV(avref),ix_av,0);
      tmp_cpp[ix_av] = StrDup(SvPV(*current_val,na));
   }




Since I'm not a C hacker it would be too fussy for me to delve into API.c
to see why there is an undeclared variable "na".
I guess this is due to an old implementation of the XS that used to work for
Perl versions prior to 5.6
As I've never coded using XS I don't have the time and knowledge to peruse
"perldoc perlguts"

Is there any chance that your developers will fix this for current Perl 
versions to build correctly?

Regards
Ralph Grothe


Reproducible: Always

Steps to Reproduce:
see my description above

Actual Results:  
see my description above

Expected Results:  
working Mozilla::LDAP modules

Inactive project, closing

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.