From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id EA12C3882117 for ; Thu, 16 Nov 2023 18:17:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA12C3882117 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 EA12C3882117 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::536 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700158658; cv=none; b=JqwuKHfwwMGCts50MRJjwVJyFkMMZbmBm4yfiN7ugtFplh52iTVcsF40dTvHVQLTTn6dUlitehm2LBC2Ymx7XxtvxBMUgnqoEwE1hvlDaG3mwiUdKZJ7zuFvx0LIKag6+Xu44zmTz6q/tVAqP4xNLOLWq6dMXyCTmZy6v1lLWhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700158658; c=relaxed/simple; bh=3Ne+0EV0vaejyGcroo5tt4p/ALISlqfI2Zg+5Ac1v3s=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Vb+9q2JKASoevQ3PFGBX9PjTI42zV0kvvcvqP4t5H9D/KGKm7dK5HwVLo59Hf2EI6c/lzr1+SHnHODGsw18kBVkldfzJiietLo9I7ahU+7FXyAh1hGP3969DcPm0GFKSVAHS77WIdcltT0VDvs8Ama7PWjTogQk+KK2j3PWhiU0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-53e08b60febso1734150a12.1 for ; Thu, 16 Nov 2023 10:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700158655; x=1700763455; 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=Au8LyzVEM9OM48Y9hkDQ8j/7BDkgUsPAKgSRg7UEQqY=; b=WRzQVIJFWjnP++XiwakD8x7EnCmM8SFTe2CNVBgjxCrjTGsCfc7io4YVj5Kmsnv56K Y/L5XmYwwssfxZXPCBO6MAQuZSoC3VfUkMrzgJobXqvkDJvvn0fepqSMW0ihpyDtBukG V9x1Bszd/TlHbKKt8aL1MAHhRCKy2YlQHM6GrmXOK3/ljzdMX9drDux2b0lPcsGYuZes z7y7OjPVy+12BdeCt/99VlKDKz6iO0yEQjLlBzmJ+fFyP8h+3rJfm860S6NjHz5Gcpao oS5YJ1KSf0/RqeOQPPruR2KZGzPNNvf1kzmK6ufaFBr8cecOoIjcUjJB20UM701lZJ2R s29Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700158655; x=1700763455; 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=Au8LyzVEM9OM48Y9hkDQ8j/7BDkgUsPAKgSRg7UEQqY=; b=toZWduji9KCwezmpoYMvXTpB/5JE9kAdC4oVxAfyMj/Nlv5B7rzH3tzPuEZEov4QLR hCldflKP+lNphleArXDoTlh9A8yr4LiqGU1t8dvFv1xjAiMCyFlZXEs2lxpe16TDvNPV CB+veEs+TKEsGwPlr9Oz7ibh36Whq73CUwq5flTbcnRV6Cg8KxEana8drdk0XBcTabnG KJes+KgPB05/zt6PKfMUNMHQ3BIKrvRUCl0oNNnwPUUZY2EvZSOz04ug+8jl2sQnCSjo a43FSNtcuC9bVqW3/b8OVvQ/kYFh/eIvqH+HyKt2t/Uy15xJBotLjcjkVdq2ZHNQNzbx 0dYQ== X-Gm-Message-State: AOJu0YyoQ5lv2x6b1fy5812su5/CvVeYDnOiuf3o1EfYEQidmcDDC6gL H9qaQDOA4srmBTaRiE1OTg+tn3SJ2r0otlP8dlo= X-Google-Smtp-Source: AGHT+IEYIQCL7bmywEeNviVKhsTvHIHr/Pe4tutatrDxsfskwPu1qeWwSOSsQMSUJZnLORkRjZ+FA+pUZXSf0OhxC94= X-Received: by 2002:a17:906:4c43:b0:9e6:38f2:8439 with SMTP id d3-20020a1709064c4300b009e638f28439mr11786103ejw.60.1700158655357; Thu, 16 Nov 2023 10:17:35 -0800 (PST) MIME-Version: 1.0 References: <4277517.TpOvJl0BfU@nimes> <4734331.o0Uec3RiDg@nimes> In-Reply-To: From: David Edelsohn Date: Thu, 16 Nov 2023 13:17:23 -0500 Message-ID: Subject: Re: building GNU gettext on AIX To: Bruno Haible , =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: GCC Patches , bug-gettext@gnu.org Content-Type: multipart/alternative; boundary="000000000000b6e807060a49082b" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --000000000000b6e807060a49082b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I manually commented out HAVE_PTHREAD_API from config.h and produced a libintl.a without references to pthreads. Configuring GCC with that custom libintl.a enables NLS. I now am building GCC with NLS and we will see how well it functions. gettext depends on pthreads by default and the versions distributed. Thanks, David On Thu, Nov 16, 2023 at 1:01=E2=80=AFPM David Edelsohn = wrote: > Bruno, > > 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 despite requesting --disable-pthreads. > > Thanks, David > > On Thu, Nov 16, 2023 at 11:35=E2=80=AFAM David Edelsohn wrote: > >> I configured gettext with --disable-pthreads and libintl.a still contains >> references to pthread_mutex_lock and pthread_mutex_unlock, which causes = NLS >> configure to fail on AIX. >> >> How can this be corrected? >> >> Thanks, David >> >> libintl.a[libgnu_la-mbrtowc.o]: >> >> - U __lc_charmap >> >> - U errno >> >> - U .locale_encoding_classification >> >> - U .gl_get_mbtowc_lock >> >> - U .pthread_mutex_lock >> >> - U .mbtowc >> >> - U .pthread_mutex_unlock >> >> - U .abort >> >> 0 T ._libintl_mbrtowc >> >> 1952 D _libintl_mbrtowc >> >> libintl.a[libgnu_la-setlocale_null.o]: >> >> - U .gl_get_setlocale_null_lock >> >> - U .pthread_mutex_lock >> >> - U .setlocale >> >> - U .strlen >> >> - U .memcpy >> >> - U .pthread_mutex_unlock >> >> - U .abort >> >> - U .strcpy >> >> 336 T ._libintl_setlocale_null_r >> >> 400 T ._libintl_setlocale_null >> >> 812 D _libintl_setlocale_null_r >> >> 824 D _libintl_setlocale_null >> >> On Thu, Nov 16, 2023 at 11:00=E2=80=AFAM David Edelsohn >> wrote: >> >>> Bruno, >>> >>> I have been able to tweak the environment and build gettext and >>> libintl. With the updated libintl and environment, GCC reliably does n= ot >>> use NLS. >>> >>> The issue is that libintl utilizes pthreads. AIX does not provide no-op >>> pthread stubs in libc. pthreads is an explicit multilib on AIX. >>> >>> 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. The GCC included gettext was built = in >>> the default for GCC libraries, which was not pthreads enabled. >>> >>> I can rebuild libintl with --disable-pthreads and I will see if that >>> works, but the default, distributed libintl library will not allow GCC = to >>> be built with NLS enabled. And, no, GCC on AIX should not be forced to >>> build with pthreads. >>> >>> This is a regression in NLS support in GCC. >>> >>> Thanks, David >>> >>> >>> On Wed, Nov 15, 2023 at 5:39=E2=80=AFPM Bruno Haible = wrote: >>> >>>> David Edelsohn wrote: >>>> > I am using my own install of GCC for a reason. >>>> >>>> I have built GNU gettext 0.22.3 in various configurations on the AIX 7= .1 >>>> and 7.3 machines in the compilefarm, and haven't encountered issues wi= th >>>> 'max_align_t' nor with 'getpeername'. So, from my point of view, GNU >>>> gettext >>>> works fine on AIX with gcc and xlc (but not ibm-clang, which I haven't >>>> tested). >>>> >>>> You will surely understand that I cannot test a release against a >>>> compiler >>>> that exists only on your hard disk. >>>> >>>> The hint I gave you, based on the partial logs that you provided, is to >>>> look at the configure test for intmax_t first. >>>> >>>> Bruno >>>> >>>> >>>> >>>> --000000000000b6e807060a49082b--