bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building GNU gettext on AIX


From: David Edelsohn
Subject: Re: building GNU gettext on AIX
Date: Wed, 15 Nov 2023 16:31:08 -0500

On Wed, Nov 15, 2023 at 4:22 PM Bruno Haible <bruno@clisp.org> wrote:
David Edelsohn wrote:
> When I try to configure gettext-0.22.3, I receive the following error:
>
> checking for socklen_t equivalent... configure: error: Cannot find a type
> to use in place of socklen_t
>
> configure: error:
> /nasfarm/edelsohn/src/gettext-0.22.3/libtextstyle/configure failed for
> libtextstyle
>
>
> configure:43943: /nasfarm/edelsohn/install/GCC12/bin/gcc -c -g -O2
> -D_THREAD_SAFE
> conftest.c >&5
>
> conftest.c:112:18: error: two or more data types in declaration specifiers
>
>   112 | #define intmax_t long long
>
>       |                  ^~~~
>
> conftest.c:112:23: error: two or more data types in declaration specifiers
>
>   112 | #define intmax_t long long
>
>       |                       ^~~~
>
> In file included from conftest.c:212:
>
> conftest.c:214:24: error: conflicting types for 'ngetpeername'; have
> 'int(int,  void *, long unsigned int *)'
>
>   214 |                    int getpeername (int, void *, unsigned long int
> *);
>
>       |                        ^~~~~~~~~~~
>
> /nasfarm/edelsohn/install/GCC12/lib/gcc/powerpc-ibm-aix7.2.5.0/12.1.1/include-fixed/sys/socket.h:647:9:
> note: previous declaration of 'ngetpeername' with type 'int(int,  struct
> sockaddr * restrict,  socklen_t * restrict)' {aka 'int(int,  struct
> sockaddr * restrict,  long unsigned int * restrict)'}
>
>   647 | int     getpeername(int, struct sockaddr *__restrict__, socklen_t
> *__restrict__);
>
>       |         ^~~~~~~~~~~
>
>
> configure and config.h seems to get itself confused about types.

There seem to be two problems, both related to the include files of
your compiler:

  - The configure test "checking for intmax_t..." must have found the
    answer "no". But on a modern system, <stdint.h> should be defining
    intmax_t already.

  - This configure test that tries to find the getpeername declaration,
    but cannot find it (maybe because of the first problem?):

================================================================================
         for arg2 in "struct sockaddr" void; do
           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
                   #include <sys/socket.h>

                   int getpeername (int, $arg2 *, $t *);
int
main (void)
{
$t len;
                  getpeername (0, 0, &len);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  gl_cv_socklen_t_equiv="$t"
fi
================================================================================

I would concentrate on the first problem. If you don't get it fixed, then I'd
suggest to try 'gcc' from the AIX Toolbox [1] or 'xlc' (as an IBM product)
instead of 'gcc' (that looks like you built it yourself).

Bruno

[1] https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/gcc12-12.3.0-1.spec

Bruno,

I am using my own install of GCC for a reason.  The build of GCC works for everything else, including bootstrap of GCC, GDB, GMP, etc.  The only problem is gettext.

Thanks, David
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]