From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 4006E3858D20 for ; Wed, 15 Nov 2023 19:26:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4006E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4006E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700076395; cv=none; b=pLD9Gnv2BcZTu3Bm53a4jxXkmcUp0SoRkXbCxcHLo8wBReGTVxFm51NGogIxQFEKoMbkDL/1ygpxSlhWVau6tXVru1OzvonPGjttYntRqjsKj3nQMxgarTZ4nBifwrkyTsfdvELyNbb/MihheR8TpSdLMafr4uwyvWnNJd0WLQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700076395; c=relaxed/simple; bh=QWznDEYsdmMRieJGpEy4LIFY5pM7a76JKawupa9epiI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=GvZq80DWYgVEsKWxmi1CaCoeAkqLfpAS/mtGMGWptGw0jdI7FBkMbjgX81OhK/mfU+xG6Be6P4DQQN7IXrBTEE4jYeNsJztVpMYcCJiC0Y5JX8eSqzBhPUFsudMOvKsE3Ib3XGWhUrxXTW7chNbCNQIOmYewfJOA8lbixL4eVbs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9d216597f64so6162566b.3 for ; Wed, 15 Nov 2023 11:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700076392; x=1700681192; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MM0wRhMgZFICcBpFFIdRcFsJoPK+DE1ATVPNlqtccpg=; b=m4KI/rRgNuMOKLuuFOf4C/rO/lMHfEh5ELJfleSu8rtfT2SCUIc+WWDvAQtGbkGEDb 8ZnP9LAdjRsgl3M8y6yhf1CTDabKvtb5yu0c3aw5+kxEAijPkxe0k+EVgkDr2dCWbDgz 6wa3E0dmp+x7yb9JQdhq83ip9WDcaYnMqPyXA+0aY7sPU5OoRbzYk76IhUDvnOPS6qzn OwDJt7OZvQZqNOVnybt1e5MBvjpDkDpnM3MA1c7+THkWK1tr0QYjSImKm0HTDGAVuys+ loDF1uvEvWjW9C4e93lrpWFIkyPLHYXsg1ksUID6FwhyYYmUBUPmo1MyasEbO+VjVaPm 9tkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700076392; x=1700681192; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MM0wRhMgZFICcBpFFIdRcFsJoPK+DE1ATVPNlqtccpg=; b=nBp0me4+ejA6N1HLhnPy9c7NgOMv6BCqfIOjuqIikAJwJcu/E1fF4q6ogHqEcwbbxe K7kBBVl2luJcOsgDJkegD+W9+UgZ7Ph/dxgMuMEmQdC8teYc2db3ax74ky6qBqMn8IbD AEMCEKBvOZYT02I9VHnWiju5GbfCJiIvnk85aaczbnCz26Ucp1Foylzva7j1HWyraRRb 5dXlRQpiWm49VCZVgOvPJCdwkpwXGNgX6hHZwi1ffza3eMULcfNjCzzkj85luIPjxYFS Y1B/bEz3T0uxWWhyKDBErLnT1d6WjrtKMlZWZF+lVjDCCr1NuM+2o/vEBODieUykVk16 55Fw== X-Gm-Message-State: AOJu0YyKiHT55x8Rhs7W8HVdj/+wCjYNFWRM/qRZlbfb+5ioFvZbYUC/ jCByhF5eNy98OpNa7eaDWHEU6IewKCYRpcVGrbo= X-Google-Smtp-Source: AGHT+IGjnv/RKlwatPHnyW7c9kdTnOMd1W36fb7ISOUWmg47D0AasXISUwRujrNtoo++xzvGEi0xkvWzAJD1ktUQYrY= X-Received: by 2002:a17:906:711b:b0:9bd:dfaa:3f2 with SMTP id x27-20020a170906711b00b009bddfaa03f2mr10412700ejj.6.1700076391620; Wed, 15 Nov 2023 11:26:31 -0800 (PST) MIME-Version: 1.0 References: <86o7fwhr03.fsf@aarsen.me> <3872428.LUUfaPJgs6@nimes> In-Reply-To: <3872428.LUUfaPJgs6@nimes> From: David Edelsohn Date: Wed, 15 Nov 2023 14:26:20 -0500 Message-ID: Subject: Re: building GNU gettext on AIX To: Bruno Haible Cc: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= , GCC Patches , bug-gettext@gnu.org Content-Type: multipart/alternative; boundary="00000000000069e4fc060a35e181" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000069e4fc060a35e181 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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/inclu= de-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. David On Wed, Nov 15, 2023 at 7:29=E2=80=AFAM Bruno Haible wrot= e: > [CCing bug-gettext] > > David Edelsohn wrote in > : > > The current gettext-0.22.3 fails to build for me on AIX. > > Here are some hints to get a successful build of GNU gettext on AIX: > > 1. Set the recommended environment variables before running configure: > https://gitlab.com/ghwiki/gnow-how/-/wikis/Platforms/Configuration > > Namely: > * for a 32-bit build with gcc: > CC=3Dgcc > CXX=3Dg++ > CPPFLAGS=3D"-I$PREFIX/include" > LDFLAGS=3D"-L$PREFIX/lib" > unset AR NM > * for a 32-bit build with xlc: > CC=3D"xlc -qthreaded -qtls" > CXX=3D"xlC -qthreaded -qtls" > CPPFLAGS=3D"-I$PREFIX/include" > LDFLAGS=3D"-L$PREFIX/lib" > unset AR NM > * for a 64-bit build with gcc: > CC=3D"gcc -maix64" > CXX=3D"g++ -maix64" > CPPFLAGS=3D"-I$PREFIX/include" > LDFLAGS=3D"-L$PREFIX/lib" > AR=3D"ar -X 64"; NM=3D"nm -X 64 -B" > * for a 64-bit build with xlc: > CC=3D"xlc -q64 -qthreaded -qtls" > CXX=3D"xlC -q64 -qthreaded -qtls" > CPPFLAGS=3D"-I$PREFIX/include" > LDFLAGS=3D"-L$PREFIX/lib" > AR=3D"ar -X 64"; NM=3D"nm -X 64 -B" > > where $PREFIX is the value that you pass to the --prefix configure > option. > > Rationale: you can run into all sorts of problems if you choose compil= er > options at random and haven't experience with compiler options on that > platform. > > 2. Don't use ibm-clang. > > Rationale: It's broken. > > 3. Don't use -Wall with gcc 10.3. > > Rationale: If you specify -Wall, gettext's configure adds -fanalyzer, > which > has excessive memory requirements in gcc 10.x. In particular, on AIX, = it > makes cc1 crash while compiling regex.c after it has consumed 1 GiB of > RAM. > > 4. Avoid using a --prefix that contains earlier installations of the same > package. > > Rationale: Because the AIX linker hardcodes directory names in shared > libraries, GNU libtool has a peculiar configuration on AIX. It ends up > mixing the in-build-tree libraries with the libraries in the install > locations, leading to all sorts of errors. > > If you really need to use a --prefix that contains an earlier > installation of the same package: > - Either use --disable-shared and remove libgettextlib.a and > libgettextsrc.a from $PREFIX/lib before starting the build. > - Or use a mix of "make -k", "make -k install" and ad-hoc workarounds > that cannot be described in a general way. > > Bruno > > > > --00000000000069e4fc060a35e181--