On Sat, Nov 15, 2025 at 11:44:19PM +0100, Patrice Dumas wrote:
> On Sat, Nov 15, 2025 at 07:17:49PM +0000, Gavin Smith wrote:
> > On Thu, Nov 13, 2025 at 07:25:13PM +0000, Gavin Smith wrote:
> >
> > > You can see that the -I/opt/csw/include option is given on the first
> > > run of "cc". On this system, this directory contains a GNU "libintl.h"
> > > file which appears to redefine "gettext" as "libintl_gettext". This flag
> > > appears to come from the Perl configuration values:
> > >
> > > perl_conf_CFLAGS='-D_REENTRANT -xO3 -m32 -xarch=pentium_pro
> > > -xchip=pentium_pro -I/opt/csw/bdb48/include -I/opt/csw/include
> > > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -KPIC'
> > >
> > > But this is not used for the tests in tta/configure.ac.
>
> On that subject, I found some information in the gettext FAQ:
> https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
Yes, that's all consistent with my understanding of the issue. AM_GNU_GETTEXT
would do the job correctly if the flags were consistent for both the check
and for the build.
>From tta/C/Makefile.am:
ctexi2any_CPPFLAGS = -I$(srcdir)/parsetexi -I$(srcdir)/convert -I$(srcdir)/main
-I$(srcdir)/structuring_transfo $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS)
$(PERL_EXTUTILS_EMBED_ccopts) -DPATH_SEP=\"${PATH_SEPARATOR}\" -DEMBED_PERL
The extra flags come from $(PERL_EXTUTILS_EMBED_ccopts):
unstable11x$ /opt/csw/bin/perl -MExtUtils::Embed -e ccopts
-D_REENTRANT -xO3 -m32 -xarch=pentium_pro -xchip=pentium_pro
-I/opt/csw/bdb48/include -I/opt/csw/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -I/opt/csw/lib/perl/5.10.1/CORE
unstable11x$
This variable is set in tta/configure.ac. (It's not directly from
perl_conf_CFLAGS as I had thought, although the value is very similar.)
> But it is not fully clear what the issue is. In the configure run,
> there is:
>
> checking how to link with libintl... /opt/csw/lib/libintl.so -R/opt/csw/lib
If you're looking at a log file like
https://buildfarm.opencsw.org/buildbot/builders/texinfo-solaris11-i386/builds/6874/steps/shell_1/logs/stdio
(most recent build at
https://buildfarm.opencsw.org/buildbot/waterfall?category=texinfo),
then this line is from the configure run at the top-level directory. The
tta directory has its own configure script and the results are different.
There the "checking how to link with libintl..." test is never run because
"checking for GNU gettext in libc..." results in "yes" rather than "no".
As a result LIBINTL and LTLIBINTL autoconf output variables remain empty
rather than referencing the libintl library.