[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3595) Can't resolve LDAP server name on HPUX 11.11



At 09:11 AM 3/18/2005, hxdg21@yahoo.com wrote:
>Thanks for the reply, Kurt. I agree with you. Since
>these interfaces are obsolete, it would be indeed a
>waste of time to try and support them. 
>
>Was my analysis of the problem correct? Am I right to
>conclude that it would not be possible to build
>OpenLDAP 2.2.23 on HP-UX 11.11 without changing its
>source code first? It looks to me like this is the
>case but I was looking for some feedback from someone
>who might be more familiar with the source code of
>OpenLDAP.

env ac_cv_func_gethostbyname_r=no ac_cv_func_getaddrbyname_r=no ./configure ...

likely will work around the problem.


>Thanks again
>
>--- "Kurt D. Zeilenga" <Kurt@OpenLDAP.org> wrote:
>
>> In reading getent(3) for HP-UX 11.11
>>  
>> http://docs.hp.com/en/B2355-60103/gethostent.3N.html
>> 
>> that gethostbyname_r(3) and gethostbyaddr_r(3) are
>> categorized
>> as obsolete interfaces, and hence moved from -lc to
>> -ld4r and
>> may be completely removed in subsequent releases.
>> 
>> It would seem that it not appropriate to add
>> detection
>> for -ld4r and these obsolete interfaces.  Instead,
>> the
>> code should use gethostbyname(3) and
>> gethostbyaddr(3).
>> Unforunately, these will be unnecessary mutex
>> protected
>> in -lldap_r as we have no good way of detecting
>> whether
>> or not their implementations are thread-safe.
>> 
>> Kurt
>> 
>> At 10:24 AM 3/11/2005, hxdg21@yahoo.com wrote:
>> >Full_Name: Larry Smith
>> >Version: 2.2.23
>> >OS: HPUX 11.11
>> >URL: ftp://ftp.openldap.org/incoming/
>> >Submission from: (NULL) (129.188.33.222)
>> >
>> >
>> >Hello,
>> >
>> >I have been able to successfully build OpenLDAP
>> 2.2.23 on this system:
>> >
>> >> uname -a
>> >HP-UX myserver B.11.11 U 9000/800 3308236008
>> unlimited-user license
>> >
>> >However, I can only make LDAP work if I use the IP
>> address of the LDAP server.
>> >It cannot resolve the name of my LDAP server. 
>> >
>> >For example:
>> >
>> >It does not work when I do this:
>> >
>> >> bin/ldapsearch -l 10 -z 1 -h ldapsrv.mynet.com -u
>> -A -b
>> >"ou=people,ou=intranet,dc=mybus,dc=com" "uid=myid"
>> >ldap_bind: Can't contact LDAP server (-1)
>> >
>> >but it works fine if I replace ldapsrv.mynet.com by
>> its IP address. I know that
>> >naming resolution is working fine because I can
>> ping or nslookup
>> >ldapsrv.mynet.com . 
>> >
>> >You will find below a full log of the configuration
>> of my build. You will notice
>> >the following in the log:
>> >
>> >checking for gethostbyname_r... yes
>> >checking for gethostbyaddr_r... yes
>> >...
>> >checking number of arguments of gethostbyname_r...
>> 0
>> >checking number of arguments of gethostbyaddr_r...
>> 0
>> >
>> >When I looked at the source code, I got the
>> impression that the problem is
>> >happening because nobody has ported this OpenLDAP
>> version to HP-UX 11.11 yet.
>> >The configuration of OpenLDAP is looking for a
>> gethostbyname_r function
>> >requiring either 5 or 6 parameters and a
>> gethostbyaddr_r function requiring
>> >either 7 or 8 parameters. On HP-UX 11.11 though,
>> these functions are implemented
>> >as follows (from the man page):
>> >
>> >      int gethostbyname_r(const char *name,
>> >                          struct hostent *result,
>> >                          struct hostent_data
>> *buffer);
>> >
>> >      int gethostbyaddr_r(const char *addr,
>> >                          int len,
>> >                          int type,
>> >                          struct hostent *result,
>> >                          struct hostent_data
>> *buffer);
>> >
>> >Has anyone been able to get OpenLDAP to run on HPUX
>> 11.11? If yes, what version
>> >did you use? Did you have to modify the source
>> code? Any ideas will be greatly
>> >appreciated.
>> >
>> >Here is the full log of the configuration of my
>> build
>> >
>> >> CC=gcc LIBS='-ld4r' ./configure
>> --prefix=/apps/public/openldap-2.2.23-hp
>> >--without-cyrus_sasl --disable-slapd --enable-debug
>> >Copyright 1998-2005 The OpenLDAP Foundation. All
>> rights reserved.
>> >        Restrictions apply, see COPYRIGHT and
>> LICENSE files.
>> >Copyright 1998-2005 The OpenLDAP Foundation. All
>> rights reserved.
>> >        Restrictions apply, see COPYRIGHT and
>> LICENSE files.
>> >Configuring [1mOpenLDAP 2.2.23-Release[m ...
>> >checking host system type... hppa2.0w-hp-hpux11.11
>> >checking target system type...
>> hppa2.0w-hp-hpux11.11
>> >checking build system type... hppa2.0w-hp-hpux11.11
>> >checking for a BSD compatible install...
>> /apps/public/bin/ginstall -c
>> >checking whether build environment is sane... yes
>> >checking for mawk... no
>> >checking for gawk... gawk
>> >checking whether make sets ${MAKE}... yes
>> >checking for working aclocal... found
>> >checking for working autoconf... found
>> >checking for working automake... found
>> >checking for working autoheader... found
>> >checking for working makeinfo... found
>> >checking for gnutar... no
>> >checking for gtar... gtar
>> >checking configure arguments... configure: warning:
>> slapd disabled, ignoring
>> >--enable-bdb argument
>> >configure: warning: slapd disabled, ignoring
>> --enable-monitor argument
>> >done
>> >checking for a BSD compatible install...
>> /apps/public/bin/ginstall -c
>> >checking for ar... ar
>> >checking for Cygwin environment... no
>> >checking for mingw32 environment... no
>> >checking for EMX OS/2 environment... no
>> >checking how to run the C preprocessor... gcc -E
>> >checking for gcc... gcc
>> >checking whether the C compiler (gcc   ) works...
>> yes
>> >checking whether the C compiler (gcc   ) is a
>> cross-compiler... no
>> >checking whether we are using GNU C... yes
>> >checking whether gcc accepts -g... no
>> >checking for ld used by GCC... /usr/ccs/bin/ld
>> >checking if the linker (/usr/ccs/bin/ld) is GNU
>> ld... no
>> >checking for /usr/ccs/bin/ld option to reload
>> object files... -r
>> >checking for BSD-compatible nm... /bin/nm -p
>> >checking for a sed that does not truncate output...
>> /apps/public/bin/gsed
>> >checking whether ln -s works... yes
>> >checking how to recognise dependent libraries...
>> file_magic
>> >(s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared
>> library
>> >checking for object suffix... o
>> >checking for executable suffix... no
>> >checking command to parse /bin/nm -p output... ok
>> >checking for dlfcn.h... yes
>> >checking for ranlib... ranlib
>> >checking for strip... strip
>> >checking for objdir... .libs
>> >checking for gcc option to produce PIC... -fPIC
>> >checking if gcc PIC flag -fPIC works... yes
>> >checking if gcc static flag -static works... no
>> >checking if gcc supports -c -o file.o... yes
>> >checking if gcc supports -c -o file.lo... yes
>> >checking if gcc supports -fno-rtti
>> -fno-exceptions... yes
>> >checking whether the linker (/usr/ccs/bin/ld)
>> supports shared libraries... yes
>> >checking how to hardcode library paths into
>> programs... relink
>> >checking whether stripping libraries is possible...
>> no
>> >checking dynamic linker characteristics...
>> hpux11.11 dld.sl
>> >checking if libtool supports shared libraries...
>> yes
>> >checking whether to build shared libraries... yes
>> >checking whether to build static libraries... yes
>> >checking for dllload... no
>> >checking for shl_load... yes
>> >creating libtool
>> >checking whether ln works... yes
>> >checking whether ln -s works... (cached) yes
>> >checking how to run the C preprocessor... gcc -E
>> >checking for Cygwin environment... (cached) no
>> >checking for mingw32 environment... (cached) no
>> 
>=== message truncated ===
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com