The build bot at OpenCSW is failing for Solaris 11 systems:

https://buildfarm.opencsw.org/buildbot/waterfall?category=texinfo

This has been failing for a long time.  I reported in this message
that it has been failing since 2025-07-14:

https://lists.gnu.org/archive/html/bug-texinfo/2025-07/msg00061.html

The failures were related to code for SWIG.

Now recent failures do not appear to be related to SWIG, although the
problems with SWIG likely obscured this error:


/bin/sh ../libtool  --tag=CC   --mode=link /opt/SUNWspro/bin/cc     -o 
ctexi2any ctexi2any-texi2any.o libtexinfo-main.la libtexinfoxs.la 
libtexinfo-convert.la libtexinfo.la ../gnulib/lib/libgnu.la -R /opt/csw/lib 
-m32 -xarch=pentium_pro -xchip=pentium_pro -L/opt/csw/lib -lperl 
-L/opt/csw/bdb48/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/lib  
-L/opt/csw/lib/perl/5.10.1/CORE -lperl -lsocket -lnsl -ldl -lm -lpthread -lc 
-lperl -lgen    
libtool: link: /opt/SUNWspro/bin/cc -o .libs/ctexi2any ctexi2any-texi2any.o 
-m32 -xarch=pentium_pro -xchip=pentium_pro  ./.libs/libtexinfo-main.so 
-L/opt/csw/lib -L/opt/csw/bdb48/lib -L/usr/lib -L/usr/ccs/lib -L/lib 
-L/opt/csw/lib/perl/5.10.1/CORE 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfo-convert.so
 ./.libs/libtexinfoxs.so ./.libs/libtexinfo-convert.so 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfoxs.so
 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfo.so
 ./.libs/libtexinfo.so ../gnulib/lib/.libs/libgnu.a -lsocket -lnsl -ldl -lm 
-lpthread -lc -lperl -lgen -R/usr/local/lib/texi2any -R/opt/csw/lib
ld: warning: file ./.libs/libtexinfo-convert.so: linked to 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfo-convert.so:
 attempted multiple inclusion of file
ld: warning: file 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfoxs.so:
 linked to ./.libs/libtexinfoxs.so: attempted multiple inclusion of file
ld: warning: file ./.libs/libtexinfo.so: linked to 
/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C/.libs/libtexinfo.so:
 attempted multiple inclusion of file
Undefined                       first referenced
 symbol                             in file
libintl_gettext                     ctexi2any-texi2any.o
ld: fatal: symbol referencing errors
gmake[4]: *** [Makefile:3079: ctexi2any] Error 1
gmake[4]: Leaving directory 
'/export/home/buildbot/slave/texinfo-solaris11-i386/build/tta/C'


I don't know what the "attempted multiple inclusion of file" error means,
but the main error is to do with the undefined libintl_gettext symbol.

This error is in building ctexi2any, which is an alternative implementation
in C of the top-level texi2any program (the default implementation is in
Perl, in texi2any.pl.)

Like SWIG, ctexi2any is not an important part of Texinfo and texi2any would
function fine without it.  However, I'm hopeful that this can be fixed as
the buildbot was passing before.  The error appears to be that the -lintl
flag should be passed.  I was able to test this through shell access to
the OpenCSW systems and it worked with the -lintl flag.

There is a mismatch between the results of top-level configure and
tta/configure.  The top level has in config.log:

configure:39411: checking for GNU gettext in libc
configure:39441: /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -o conftest 
-I/opt/csw/include  -D_REENTRANT -I/opt/csw/include -L/opt/csw/lib conftest.c  
>&5
"conftest.c", line 308: warning: statement not reached
Undefined                       first referenced
 symbol                             in file
libintl_gettext                     conftest.o
libintl_bindtextdomain              conftest.o
ld: fatal: symbol referencing errors
configure:39441: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Texinfo"
| #define PACKAGE_TARNAME "texinfo"
| #define PACKAGE_VERSION "7.2dev"

- while in tta/config.log there is:

configure:29658: result: no
configure:29708: checking for GNU gettext in libc
configure:29738: /opt/SUNWspro/bin/cc -o conftest    conftest.c  >&5
"conftest.c", line 215: warning: statement not reached
configure:29738: $? = 0
configure:29748: result: yes

As you can see, the command line for the configure test under tta/ is completely
different.  It doesn't have the -I/opt/csw/include flag, for example, and the
compiler is cc instead of c99.

tta/configure.ac overrides CFLAGS and CC before calling AM_GNU_GETTEXT and
other tests, which may explain the difference in the tests.

However, the program is built with this -I flag.  If I delete
ctexi2any-texi2any.o and then run "make" again, here is the output from the
rebuild:

make  all-am
source='texi2any.c' object='ctexi2any-texi2any.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../build-aux/depcomp \
/opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I.  -I./parsetexi -I./convert -I./main 
-I./structuring_transfo -I. -DDATADIR=\"/home/gavin/local/share\"  
-DSYSCONFDIR=\"/home/gavin/local/etc\" -I../gnulib/lib  -I../gnulib/lib 
-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 
-DPATH_SEP=\":\" -DEMBED_PERL    -c -o ctexi2any-texi2any.o `test -f 
'texi2any.c' || echo './'`texi2any.c
/bin/sh ../libtool  --tag=CC    --mode=link /opt/SUNWspro/bin/cc      -o 
ctexi2any ctexi2any-texi2any.o libtexinfo-main.la libtexinfoxs.la 
libtexinfo-convert.la libtexinfo.la ../gnulib/lib/libgnu.la -R /opt/csw/lib 
-m32 -xarch=pentium_pro -xchip=pentium_pro -L/opt/csw/lib -lperl 
-L/opt/csw/bdb48/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/lib  
-L/opt/csw/lib/perl/5.10.1/CORE -lperl -lsocket -lnsl -ldl -lm -lpthread -lc 
-lperl -lgen    
libtool: link: /opt/SUNWspro/bin/cc -o .libs/ctexi2any ctexi2any-texi2any.o 
-m32 -xarch=pentium_pro -xchip=pentium_pro  ./.libs/libtexinfo-main.so 
-L/opt/csw/lib -L/opt/csw/bdb48/lib -L/usr/lib -L/usr/ccs/lib -L/lib 
/home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfo-convert.so 
-L/opt/csw/lib/perl/5.10.1/CORE ./.libs/libtexinfoxs.so 
./.libs/libtexinfo-convert.so 
/home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfoxs.so 
/home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfo.so ./.libs/libtexinfo.so 
../gnulib/lib/.libs/libgnu.a -lsocket -lnsl -ldl -lm -lpthread -lc -lperl -lgen 
-R/home/gavin/local/lib/texi2any -R/opt/csw/lib
ld: warning: file ./.libs/libtexinfo-convert.so: linked to 
/home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfo-convert.so: attempted 
multiple inclusion of file
ld: warning: file /home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfoxs.so: 
linked to ./.libs/libtexinfoxs.so: attempted multiple inclusion of file
ld: warning: file ./.libs/libtexinfo.so: linked to 
/home/gavin/texinfo-7.2dev/tta/C/.libs/libtexinfo.so: attempted multiple 
inclusion of file
Undefined                       first referenced
 symbol                             in file
libintl_gettext                     ctexi2any-texi2any.o
ld: fatal: symbol referencing errors
*** Error code 1
m

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.  Code to use this
value in the value of CFLAGS is commented out:

  # The usual configure checks use the Autoconf/Gnulib includes, but do not     
  # compile nor link against Perl.  The result of those checks are used for     
  # code never compiled with the Perl flags.  Therefore we do not set the Perl  
  # more specific flags, but use the user-defined.                              
  CFLAGS=$PERL_EXT_CFLAGS                                                       
  CPPFLAGS=$PERL_EXT_CPPFLAGS                                                   
  LDFLAGS=$PERL_EXT_LDFLAGS                                                     
  # Specific checks against Perl should not have the Autoconf/Gnulib includes   
  # but could set the following:                                                
  #CFLAGS="$PERL_EXT_CFLAGS $perl_conf_CFLAGS"                                  
  #LDFLAGS="$PERL_EXT_LDFLAGS $perl_conf_LDFLAGS"   

This was changed on 2025-01-31 (commit b1ecc743d), and further changed on
2025-07-14 (commit 1c8d0009d64).


commit b1ecc743ddb42c1a4f9d9a366a05d24670f680fb
Author: Patrice Dumas <[email protected]>
Date:   2025-01-31 12:00:31 +0100

    * tp/Texinfo/XS/configure.ac (AC_CONFIG_HEADERS, CFLAGS, CPPFLAGS)
    (LDFLAGS): move AC_CONFIG_HEADERS outside of the disable_xs block,
    such that it is always set.
    Set CFLAGS, CPPFLAGS and LDFLAGS outside of the disable_xs block such
    that they are set to the PERL_EXT_* values in any case, even if XS is
    disabled.  Remove Perl flags from CFLAGS and LDFLAGS as these are used
    for Autoconf/Gnulib tests and the Autoconf/Gnulib tests are for code
    not compiled with the Perl flags.

commit 1c8d0009d640c74ff5310eed1b726b37fd21954a
Author: Patrice Dumas <[email protected]>
Date:   2025-07-14 17:02:02 +0200

    * tta/configure.ac (CC, CFLAGS, CPPFLAGS, LDFLAGS): set CC, CFLAGS,
    CPPFLAGS and LDFLAGS to PERL_EXT_* values only if enable_xs is not no.
    That way, a 'pure C' build of the libraries does not use the
    PERL_EXT_* variables but the regular C variables.

However, it appears that these flags are necessary for the tests to work
correctly, at least for the code that is compiled with the Perl flags.

I'm not sure what is meant by the comment:

  "The result of those checks are used for code never compiled with the
  Perl flags."




Reply via email to