Operating System - Linux
1829012 Members
2166 Online
109986 Solutions
New Discussion

Re: HP-UX 11.11 : nss_ldap compil error

 
charbonnier_1
Occasional Contributor

HP-UX 11.11 : nss_ldap compil error

I'm trying to compile nss_ldap-215 onto an HP 11.11 server and getting configure errors:
# CC=/usr/local/bin/gcc \
LD="ld -Fl /usr/local/openssl/lib/libcrypto.a -Fl /usr/local/openssl/lib/libssl.a - /usr/local/lib/gcc-lib/hppa2.0n-hp-hp-hpux11.00/3.2.3/libgcc.a" \
LDFLAGS="-L/usr/local/lib" CPFLAGS="-I/usr/local/include/openssl" \
./configure --prefix=/usr/local --with-tls --disable-slapd --prefix=/usr/local/nss_ldap
--enable-rfc2308bis

#more config.log
.../..
configure:3721: /usr/local/bin/gcc -c -g -O2 -Wall -fPIC -DLDAP_REFERRALS -DLDA
P_DEPRECATED -D_REENTRANT -I. -DHPUX conftest.c 1>&5
In file included from configure:3712:
/usr/include/sys/socket.h:484: error: parse error before "sendfile"
/usr/include/sys/socket.h:484: error: parse error before "bsize_t"
/usr/include/sys/socket.h:486: error: parse error before "sendpath"
/usr/include/sys/socket.h:486: error: parse error before "bsize_t"
In file included from /usr/include/sys/mp.h:55,
from /usr/include/sys/malloc.h:59,
from /usr/include/net/netmp.h:53,
from /usr/include/net/if.h:59,
from configure:3713:
/usr/include/machine/sys/setjmp.h:45: error: redefinition of `struct label_t'
configure: In function `main':
configure:3717: error: storage size of `x' isn't known
configure:3717: warning: unused variable `x'
configure: failed program was:


What do I need to resolve these errors?
.../...
3 REPLIES 3
U.SivaKumar_2
Honored Contributor

Re: HP-UX 11.11 : nss_ldap compil error

Hi,

can you compile it on HP-UX 11.0 ?.

socket.h will differ in HP-UX 11.11. you try using HP-UX 11.0 socket.h until compilation and see whether you get that error. Put the original socket.h back.

regards,

U.SivaKumar.

Innovations are made when conventions are broken
charbonnier_1
Occasional Contributor

Re: HP-UX 11.11 : nss_ldap compil error

Thank you very much, it's OK for HP-UX 11.00 but I've another problem :
# CC=/usr/local/bin/gcc \...
.../..
configure:3721: /usr/local/bin/gcc -c -g -O2 -Wall -fPIC -DLDAP_REFERRALS -DLDA
P_DEPRECATED -D_REENTRANT -I. -DHPUX conftest.c 1>&5
configure: In function `main':
configure:3717: storage size of `x' isn't known
configure:3717: warning: unused variable `x'
configure: failed program was:
#line 3710 "configure"
#include "confdefs.h"
#include
#include
#include
#include
#include
int main() {
struct ether_addr x;
; return 0; }
configure:3739: checking for socklen_t
configure:3749: /usr/local/bin/gcc -c -g -O2 -Wall -fPIC -DLDAP_REFERRALS -DLDA
P_DEPRECATED -D_REENTRANT -I. -DHPUX conftest.c 1>&5
configure: In function `main':
configure:3745: warning: unused variable `len'
Julian Morelli
New Member

Re: HP-UX 11.11 : nss_ldap compil error

You don´t have to change the socket.h Try with this..

Socket.h have a bug in the new release 11.11. GCC works on HPUX 11.0 perfectly. but has some issues with not being able to parse correctly the socket.h under /usr/include/sys directory due to incompatibilities between HPUX 11 and HPUX 11.11. The file to has to be changed is:

/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.2/include/sys/types.h (could be other, but I almost sure is this one)

What you need to do is add the following lines to that file, right before the final '#endif' in the file and things should work.
The reason for this change is that some system header files changed between 11.00, where GCC was built, and 11i where you are running it. I think this problem will fixed with a new compiler release.
These are the lines:

#ifndef _BSIZE32_T
# define _BSIZE32_T
typedef int32_t sbsize32_t;
typedef uint32_t bsize32_t;
#endif
#ifndef _BSIZE64_T
# define _BSIZE64_T
# if !defined(__STDC_32_MODE__)
typedef int64_t sbsize64_t;
typedef uint64_t bsize64_t;
# endif
#endif
#ifndef _BSIZE_T
# define _BSIZE_T
# if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)
typedef int64_t sbsize_t;
typedef uint64_t bsize_t;
# else
typedef long sbsize_t;
typedef unsigned long bsize_t;
# endif
#endi