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

Tru64 UNIX 5.1A AC_GAI_STRERROR make failure (ITS#2643)

Full_Name: Richard Jackson
Version: 2.1.22
OS: Tru64 UNIX 5.1A
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

Make of 2.1.22 fails to build on Tru64 UNIX 5.1A glorious Alphaserver
using Compaq C compiler.

(cd .libs && rm -f libldap.la && ln -s ../libldap.la libldap.la)
/bin/cc -pthread -I../../include        -I../../include     -c apitest.c
/bin/sh /usr/local/src/openldap_2.1.22/openldap-2.1.22/libtool --mode=link 
/cc -static -pthread     -o apitest apitest.o libldap.la
/liblber.la ../../libraries/liblutil/liblutil.a
/bin/cc -pthread -o apitest apitest.o  ./.libs/libldap.a
r/.libs/liblber.a ../../libraries/liblutil/liblutil.a
*** Exit 1
*** Exit 1
*** Exit 1

# /bin/cc -V
Compaq C V6.4-014 on Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.4-215 (sys) cc Driver

I tracked the problem down to AC_GAI_STRERROR being defined in
include/ac/socket.h if HAVE_GETADDRINFO is defined.

I noted configure did not find getaddrinfo, 'checking for getaddrinfo... no'

config.log reported...

configure:10224: checking for getaddrinfo
configure:10253: /bin/cc -o conftest -pthread   conftest.c  1>&5
configure: failed program was:
#line 10229 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getaddrinfo(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getaddrinfo();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
choke me
f = getaddrinfo;

; return 0; }

If '#include <netdb.h>' is added to conftest.c via configure progress is made
but the C compiler still complains...

# /bin/cc -o conftest -pthread conftest.c
cc: Error: conftest.c, line 8: In this declaration, the type of "ogetaddrinfo"
s not compatible with the type of a previous declaration of "ogetaddrinfo" at
ne number 283 in file /usr/include/netdb.h. (notcompat)
char getaddrinfo();
cc: Warning: conftest.c, line 19: In this statement, the referenced type of the
pointer value "ogetaddrinfo" is "function (pointer to const char, pointer to
st char, pointer to const struct addrinfo, pointer to pointer to struct
) returning int", which is not compatible with "function () returning char".
f = getaddrinfo;

However, changing the following

char getaddrinfo();
char (*f)();


int getaddrinfo();
int (*f)();

Makes the C compiler very happy.  Please advise.