public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: "Bruno Haible" <bruno@clisp.org>, "Arsen Arsenović" <arsen@aarsen.me>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, bug-gettext@gnu.org
Subject: Re: building GNU gettext on AIX
Date: Thu, 16 Nov 2023 13:01:30 -0500	[thread overview]
Message-ID: <CAGWvnymnEbbgSHQ8sspoOWAiUDxaUi-PGgepfKqTXtUX4z9fdw@mail.gmail.com> (raw)
In-Reply-To: <CAGWvnykMHBbakiECbJGC6rjE+q4YUqsLvuOPp1McvRGb=FWivA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3355 bytes --]

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 AM David Edelsohn <dje.gcc@gmail.com> 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 AM David Edelsohn <dje.gcc@gmail.com> wrote:
>
>> Bruno,
>>
>> I have been able to tweak the environment and build gettext and libintl.
>> With the updated libintl and environment, GCC reliably does not 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 PM Bruno Haible <bruno@clisp.org> 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 with
>>> '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
>>>
>>>
>>>
>>>

  reply	other threads:[~2023-11-16 18:01 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 20:37 [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext David Edelsohn
2023-11-14 23:06 ` Arsen Arsenović
2023-11-15  1:49   ` David Edelsohn
2023-11-15 12:29     ` building GNU gettext on AIX Bruno Haible
2023-11-15 19:26       ` David Edelsohn
2023-11-15 21:22         ` Bruno Haible
2023-11-15 21:31           ` David Edelsohn
2023-11-15 22:39             ` Bruno Haible
2023-11-16 16:00               ` David Edelsohn
2023-11-16 16:35                 ` David Edelsohn
2023-11-16 18:01                   ` David Edelsohn [this message]
2023-11-16 18:17                     ` David Edelsohn
2023-11-16 18:52                       ` Bruno Haible
2023-11-16 22:18                         ` David Edelsohn
2023-11-16 22:46                           ` Bruno Haible
2023-11-16 23:10                             ` Arsen Arsenović
2023-11-17  8:33                               ` Richard Biener
2023-11-17  8:49                                 ` Arsen Arsenović
2023-11-17 12:24                                 ` Bruno Haible
2023-11-17 13:06                                   ` Arsen Arsenović
2023-11-16 23:38                             ` David Edelsohn
2023-11-17  0:07                               ` Bruno Haible
2023-11-17  0:15                                 ` David Edelsohn
     [not found]                 ` <84B39BF1-33D5-488E-8CF5-D08B09417568@gmail.com>
2023-11-16 17:44                   ` David Edelsohn
2023-11-16 18:47                     ` Bruno Haible
2023-11-16 18:50                       ` Arsen Arsenović
2023-11-16 18:59                         ` Bruno Haible
2023-11-16 19:14                           ` Arsen Arsenović
2023-11-19 19:49                       ` Bruno Haible
2023-11-15 14:14     ` [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext Arsen Arsenović
2023-11-15 15:51       ` Xi Ruoyao
2023-11-16 18:48         ` Arsen Arsenović
2023-11-15 17:19       ` David Edelsohn
2023-11-16 18:33         ` Arsen Arsenović
2023-11-16 21:11           ` Arsen Arsenović
2023-11-16 21:40             ` David Edelsohn
2023-11-16 22:19               ` Arsen Arsenović
2023-11-16 22:30                 ` David Edelsohn
2023-11-16 22:32                   ` Arsen Arsenović
2023-11-16 23:59                     ` David Edelsohn
2023-11-17  8:34                       ` Arsen Arsenović
2023-11-17  8:50                         ` Richard Biener
2023-11-17  8:56                           ` Arsen Arsenović
2023-11-17 14:41                         ` David Edelsohn
2023-11-17 15:16                           ` Arsen Arsenović
2023-11-17 16:07                             ` David Edelsohn
2023-11-18 18:10                               ` Arsen Arsenović
2023-11-19 21:55                               ` Bruno Haible
2023-11-19 23:00                                 ` Bruno Haible
2023-11-19 23:06                                   ` Andrew Pinski
2023-11-20  1:17                                 ` David Edelsohn
2023-11-20 21:18                                   ` Arsen Arsenović
2023-11-20 21:38                                     ` David Edelsohn
2023-11-21  0:44                                       ` Arsen Arsenović
2023-11-20 23:00                                     ` Bruno Haible
2023-11-21  0:45                                       ` Arsen Arsenović
2023-11-21 13:13                                         ` Arsen Arsenović
2023-11-21 16:28                                           ` David Edelsohn
2023-11-21 20:58                                           ` Eric Gallager
2023-11-15 19:58       ` David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGWvnymnEbbgSHQ8sspoOWAiUDxaUi-PGgepfKqTXtUX4z9fdw@mail.gmail.com \
    --to=dje.gcc@gmail.com \
    --cc=arsen@aarsen.me \
    --cc=bruno@clisp.org \
    --cc=bug-gettext@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).