[Rpm-maint] [rpm-software-management/rpm] Build fails silently when gawk is missing (Issue #2926)

Mark Dascher notifications at github.com
Thu Feb 22 16:24:46 UTC 2024


**Describe the bug**
The original autotools build relied on AC_PROG_AWK to choose the best awk available (gawk/mawk/nawk/awk), and I imagine it would fail if there weren't any. However, the new CMake build [expects gawk specifically](https://github.com/rpm-software-management/rpm/blob/master/lib/CMakeLists.txt), and it produces a broken build if it doesn't exist.

The only clue is a warning emitted during the build (among a bunch of other normal compiler warnings and output): `lib/gentagtbl.sh: line 74: gawk: command not found`

**To Reproduce**
Steps to reproduce the behavior:
1. OS provides awk, but not gawk.
2. Trigger a build.
3. Try running `rpmbuild -ba …` for a valid test file. It'll fail with a bunch of errors like this: `error: (unknown) field must be present in package: (main package)`

**Expected behavior**
Ideally the build would fallback to awk if gawk is unavailable. At a minimum, the build should fail instead of producing a broken executable.

**Environment**
 - OS / Distribution: MacOS 13 (Ventura)
 - Version rpm-4.19.1.1

**Additional context**
This is loosely a follow-up to #2807 since it was noticed when testing the MacOS build more thoroughly.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2926
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2926 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240222/188f58d6/attachment-0001.html>


More information about the Rpm-maint mailing list