From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 2DB513858CD1 for ; Thu, 16 Nov 2023 18:51:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DB513858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2DB513858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.152 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700160676; cv=none; b=Dk4GXR+UFmWHKFbitIhdg88XEhEXGyt+wWH36MSczBwYSEE3xsdEZm8ka3x8k5VXsqLLMnvsUaTl9ZoyVxEc2UlNt5lSxiJ2kZmonToOoVmdCDBEyH6X+KP4hJ1jonbTErukrv8JjRM9WsYTCKrCFuzeoh1oDIaJuTDeU9yHOqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700160676; c=relaxed/simple; bh=R9MFFBsjpMAELDoXnlxl27N+6Cflr/T2GeDw5jl1VZw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kQxHWPViOtWptoF9ofBwqGGqCAsO5Es2UJj+fz5gONzuCz5S0IMIONKXnCOaEf8G4yI2DqeCOaNi7fZl7A/DdjEddfxQiB/htx70xRPXfVq5ig0gmAtvZVcNU4b48fHKofhQ++fJgYa88eLdueiwXPzaGVimGzrArkaArsw508Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4SWTdX0rcZz9sdh; Thu, 16 Nov 2023 19:51:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1700160672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W6reVyIG0mbcTRLb+Kat9ZVoM0BxdjUsHgRv6rXG9gw=; b=L9iFXUAPc6a2oF68SbTVz27lGSxdCiiQ5v2EDWtXK0IW2Osmplp4QxtZUoCm62hI3uZ+gQ HjGkIGjV/ZRjCU+JcMC2qYUt/xMcu3fnLcBhmpVV/Frj2RupQH4ihVDScAvAjvLuHnbMF+ +pxQTJCULmKpvSmvqb9ZPWaSWtxsdtJzZz2ridcHBjGI8o5sOldIw+3a0j8asaQvViUSmd zaBe5Se97Ek37g/bbVECCEBLJhwzgPd00KhmRtvZzp+SxVQI3C/3Rko7cTdEcviPTiRuHD iXNhemnGEbIktMSraJly2ntUnrLUTar1LHSZlkhaswxqCr+2vmdUfBRcQVO+KA== References: <84B39BF1-33D5-488E-8CF5-D08B09417568@gmail.com> <6664645.lMtyQzBqa6@nimes> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Bruno Haible Cc: Richard Biener , David Edelsohn , GCC Patches , bug-gettext@gnu.org Subject: Re: building GNU gettext on AIX Date: Thu, 16 Nov 2023 19:50:11 +0100 In-reply-to: <6664645.lMtyQzBqa6@nimes> Message-ID: <86msvdedlt.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,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: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Bruno Haible writes: > David Edelsohn wrote: >> > It is great that gettext and libintl can be built thread-safe, but GCC >> > (cc1, gcov, etc.) are not pthreads applications and are not built with >> > pthreads. Because libintl defaults to pthreads enabled, NLS cannot >> > function in GCC on AIX by default.=20=20 >> ... >> The latest issue is that a few files in gettext ignore --disable-pthreads >> and creates a dependency on pthread_mutex. > > GNU gettext does not have an option '--disable-pthreads'. Instead, it has > options > > --enable-threads=3D{isoc|posix|isoc+posix|windows} > specify multithreading API > > --disable-threads build without multithread safety > >> The issue appears to be that intl/gnulib-lib/{mbrtowc.c,setlocale_null.c} >> include pthread.h based on HAVE_PTHREAD_API, which is defined as 1 in >> intl/config.h build directory > > Yup, I confirm that the dependency comes from these two object files. > > Will the next GCC release support AIX 7.1.x ? Recall that AIX 7.1 went > end-of-life on 2023-04-30 [1] > > * If no, then the simple solution would be to pass the configure option > --enable-threads=3Disoc > This should not introduce a link dependency, because the mtx_lock, > mtx_unlock, and mtx_init functions are in libc in AIX =E2=89=A5 7.2. = Currently it > does not work (it still uses pthread_mutex_lock and pthread_mutex_unl= ock > despite --enable-threads=3Disoc). But I could make this work and rele= ase > a gettext 0.22.4 with the fix. > > * If yes, then the question is how distributors will in general package > libintl on AIX. If it's installed in public locations (such as in > /opt/freeware/{lib,lib64}/libintl.a on gcc119.fsffrance.org), then we > have a problem: It may cause undefined behaviour in multithreaded > packages that use GNU libintl. > If you can guarantee that it will be installed in GCC-private directo= ries > (and outside the path where GCC looks for libraries to link with!) th= en > it would be OK to install such a non-thread-safe libintl. > But if you cannot guarantee that, we are in trouble. The in-tree configuration already passes --disable-shared, so I imagine passing --disable-threads would be OK too, for the case that it is utilized. (relevant for the latter case: GCC-private build of libintl) > How do other library vendors handle this issue on AIX? Do they ship t= wo > libraries, one MT-safe and one not? Under different names? Or in diff= erent > library search paths? > > Bruno > > [1] https://www.ibm.com/support/pages/aix-support-lifecycle-information =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZVZknl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTSjsBAIngnd1CnDFPOqeJiyqP/w/DxENaOiqGk74l b/a5CqFjAP400gWWyUQFlWDIoKgQVBi+ZJcxR0MwaX9Yt3RSKiveAw== =hOkw -----END PGP SIGNATURE----- --=-=-=--