Re: building GNU gettext on AIX

2023-11-19 Thread Bruno Haible
I wrote in : > > The latest issue is that a few files in gettext ignore --disable-pthreads > > and creates a dependency on pthread_mutex. > ... > * If no, then the simple solution would be to pass the configure option > --

Re: building GNU gettext on AIX

2023-11-17 Thread Arsen Arsenović
Bruno Haible writes: > David Edelsohn and Richard Biener wrote: >> > > * GCC can pass --enable-threads=isoc, to avoid the libpthread >> > > dependency >> > > on AIX ≥ 7.2. >> > >> > Hmm, would that option work everywhere, though? Or would we have to >> > wire up configury to detect which

Re: building GNU gettext on AIX

2023-11-17 Thread Bruno Haible
David Edelsohn and Richard Biener wrote: > > > * GCC can pass --enable-threads=isoc, to avoid the libpthread dependency > > > on AIX ≥ 7.2. > > > > Hmm, would that option work everywhere, though? Or would we have to > > wire up configury to detect which flag to use? If so, what would it > >

Re: building GNU gettext on AIX

2023-11-17 Thread Arsen Arsenović
Richard Biener writes: > On Fri, Nov 17, 2023 at 12:13 AM Arsen Arsenović wrote: >> >> >> Bruno Haible writes: >> >> > Hi David, >> > >> >> the default, distributed libintl library will not allow GCC to be built >> >> with NLS enabled. >> > >> > The problem is this configure test from gettext.

Re: building GNU gettext on AIX

2023-11-17 Thread Richard Biener
On Fri, Nov 17, 2023 at 12:13 AM Arsen Arsenović wrote: > > > Bruno Haible writes: > > > Hi David, > > > >> the default, distributed libintl library will not allow GCC to be built > >> with NLS enabled. > > > > The problem is this configure test from gettext.m4 > > > > checking for GNU gettext

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
On Thu, Nov 16, 2023 at 7:07 PM Bruno Haible wrote: > David Edelsohn wrote: > > > ibm-clang links against libpthread.a as well: > > > $ ldd /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig > > > /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig needs: > > > /usr/lib/libpthreads.a(shr_xp

Re: building GNU gettext on AIX

2023-11-16 Thread Bruno Haible
David Edelsohn wrote: > > ibm-clang links against libpthread.a as well: > > $ ldd /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig > > /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig needs: > > /usr/lib/libpthreads.a(shr_xpg5_64.o) > > /usr/opt/zlibNX/lib/libz.a(libz.so.1) > >

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
On Thu, Nov 16, 2023 at 5:47 PM Bruno Haible wrote: > Hi David, > > > the default, distributed libintl library will not allow GCC to be built > > with NLS enabled. > > The problem is this configure test from gettext.m4 > > checking for GNU gettext in libintl... no > > It should say > > checki

Re: building GNU gettext on AIX

2023-11-16 Thread Arsen Arsenović
Bruno Haible writes: > Hi David, > >> the default, distributed libintl library will not allow GCC to be built >> with NLS enabled. > > The problem is this configure test from gettext.m4 > > checking for GNU gettext in libintl... no > > It should say > > checking for GNU gettext in libintl...

Re: building GNU gettext on AIX

2023-11-16 Thread Bruno Haible
Hi David, > the default, distributed libintl library will not allow GCC to be built > with NLS enabled. The problem is this configure test from gettext.m4 checking for GNU gettext in libintl... no It should say checking for GNU gettext in libintl... yes I reproduce it with simple hello-wo

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
On Thu, Nov 16, 2023 at 1:52 PM Bruno Haible wrote: > David Edelsohn wrote: > > I manually commented out HAVE_PTHREAD_API from config.h and produced a > > libintl.a without references to pthreads. > > Good finding! > > Commenting out HAVE_PTHREAD_API from config.h is also what makes the > option

Re: building GNU gettext on AIX

2023-11-16 Thread Arsen Arsenović
Bruno Haible writes: > Arsen Arsenović wrote: >> > * 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 p

Re: building GNU gettext on AIX

2023-11-16 Thread Bruno Haible
Arsen Arsenović wrote: > > * 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

Re: building GNU gettext on AIX

2023-11-16 Thread Bruno Haible
David Edelsohn wrote: > I manually commented out HAVE_PTHREAD_API from config.h and produced a > libintl.a without references to pthreads. Good finding! Commenting out HAVE_PTHREAD_API from config.h is also what makes the option --enable-threads=isoc work as expected on AIX 7.3. Bruno

Re: building GNU gettext on AIX

2023-11-16 Thread Arsen Arsenović
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 AI

Re: building GNU gettext on AIX

2023-11-16 Thread Bruno Haible
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. > ... > The la

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
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 d

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
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 wrote: > I c

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
On Thu, Nov 16, 2023 at 11:58 AM Richard Biener wrote: > > > Am 16.11.2023 um 17:00 schrieb David Edelsohn : > >  > 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

Re: building GNU gettext on AIX

2023-11-16 Thread Richard Biener
Am 16.11.2023 um 17:00 schrieb David Edelsohn :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.  pt

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
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

Re: building GNU gettext on AIX

2023-11-16 Thread David Edelsohn
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

Re: building GNU gettext on AIX

2023-11-15 Thread Bruno Haible
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 work

Re: building GNU gettext on AIX

2023-11-15 Thread David Edelsohn
On Wed, Nov 15, 2023 at 4:22 PM Bruno Haible wrote: > David Edelsohn wrote: > > 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: > > /

Re: building GNU gettext on AIX

2023-11-15 Thread Bruno Haible
David Edelsohn wrote: > 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 fo

Re: building GNU gettext on AIX

2023-11-15 Thread David Edelsohn
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: /n

Re: building GNU gettext on AIX

2023-11-15 Thread Bruno Haible
[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 r