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 <[email protected]> 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 <[email protected]> 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
>>
>>
>>
>>