Hi

I got a CI/CD build failure [1] for libidn on the new release fedora 42.

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating csharpcomp.sh
./config.status: line 2711: awk: command not found
config.status: error: could not create csharpcomp.sh

This is building from a "make dist" tarball and not from git, so the
installed dependencies are minimal:

dnf -y install make gcc diffutils valgrind

This used to work fine with Fedora 41.  But Fedora 42 doesn't have awk
by default any more:

jas@kaka:~$ podman run -it --rm fedora:41
[root@0a7731017978 /]# awk --version|head -1
GNU Awk 5.3.0, API 4.0, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)
[root@0a7731017978 /]# 
exit
jas@kaka:~$ podman run -it --rm fedora:42
[root@8e2093893358 /]# awk --version
bash: awk: command not found
[root@8e2093893358 /]# 

Looking at the config.status [2] line 2711:

eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5

That is looking like normal autoconf stuff?!  Not gnulib or csharpcomp
related.  Autoconf 2.72e lib/autoconf/status.m4 has this line:

eval sed \"\$ac_sed_extra\" "$ac_file_inputs" m4_defn([_AC_SUBST_CMDS]) \
  >$ac_tmp/out || AC_MSG_ERROR([could not create $ac_file])

And AC_SUBST_CMDS looks like this:

dnl Define the pipe that does the substitution.
m4_ifdef([_AC_SUBST_FILES],
[m4_define([_AC_SUBST_CMDS], [|
if $ac_cs_awk_getline; then
  $AWK -f "$ac_tmp/subs.awk"
else
  $AWK -f "$ac_tmp/subs.awk" | $SHELL
fi])],
[m4_define([_AC_SUBST_CMDS],
[| $AWK -f "$ac_tmp/subs.awk"])])dnl

So awk is pretty much required by autoconf here, unless I'm missing
something else that overrides this or AWK.

I tried reading through the autoconf manual to see if 'awk' is a
run-time dependency for running generated ./configure scripts, but as
far as I can tell it looks like awk is treated the same like other
non-required tools like ar, yacc, etc.  Is awk required for running
Autoconf-generated ./configure or not?

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/autoconf.html

I'm not sure what the next step is.  Ideas?  Some of mine include:

0) Modify autoconf to continue to work in this situation without awk,
   replacing it with more POSIX shell or something else?

1) Autoconf truly require awk and then this should be documented and I
   need to document it as a build-time dependency for libidn.

2) Autoconf require awk only for certain kind of usages (substitions?),
   and then this should be documented to clarify which autoconf
   functionality requires awk, and I need to document for libidn.

3) It was actually gnulib somehow that led to this situation, and this
   is really a gnulib problem.

4) If 2) is true and gnulib uses the necessary features from autoconf
   that brings in awk, could gnulib be modified to not use those
   features so that building on systems without awk works?

/Simon

[1] https://gitlab.com/libidn/libidn/-/jobs/9750009545
[2] 
https://gitlab.com/libidn/libidn/-/jobs/9750009545/artifacts/raw/config.status

Attachment: signature.asc
Description: PGP signature

Reply via email to