Skip to contentSkip to conversation

support/dependencies/dependencies.sh: awk is needed by Buildroot

PATCH Applied Thomas Petazzoni via buildroot 2 participants 3 messages May 8, 2025 – May 16, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 support/dependencies/dependencies.sh: awk is needed by Buildroot

A basic Fedora 42 container does not have 'awk' installed, but it is needed by Buildroot. First by check-host-python3.sh:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found

but then even building host-expat assumes awk is available:

config.status: creating Makefile ./config.status: line 1404: awk: command not found config.status: creating expat.pc ./config.status: line 1404: awk: command not found

Since it's a pretty basic tool, make it part of the tools checked by dependencies.sh. One minor annoyance is that check-host-python3.sh is executed *before* dependencies.sh does its thing, so when 'awk' is not available, we end up seeing:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found
which: no awk in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) You must install 'awk' on your build machine
make: *** [support/dependencies/dependencies.mk:27: dependencies] Error 1

It would be nice to have the awk check *before* it gets used in check-host-python3.sh, but that's a topic for another patch.

---
v1 -> v2: fix documentation syntax, spotted by Baruch

---
 docs/manual/prerequisite.adoc        | 1 +
 support/dependencies/dependencies.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
docs/manual/prerequisite.adoc +1 -0
index 5d3aa297a9..1bfcff1a4a 100644
@@ -38,6 +38,7 @@ between distributions).
 ** +file+ (must be in +/usr/bin/file+)
 ** +bc+
 ** +findutils+
+** +awk+
 
 * Source fetching tools:
 ** +wget+
support/dependencies/dependencies.sh +1 -1
index fb0defd0c9..2843e3c5d5 100755
@@ -154,7 +154,7 @@ fi
 
 # Check that a few mandatory programs are installed
 missing_progs="no"
-for prog in perl tar wget cpio unzip rsync bc cmp find xargs ${DL_TOOLS} ; do
+for prog in perl tar wget cpio unzip rsync bc cmp find xargs awk ${DL_TOOLS} ; do
 	if ! which $prog > /dev/null ; then
 		echo "You must install '$prog' on your build machine";
 		missing_progs="yes"
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 26 lines · Thomas Petazzoni via buildroot

A basic Fedora 42 container does not have 'awk' installed, but it is needed by Buildroot. First by check-host-python3.sh:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found

but then even building host-expat assumes awk is available:

config.status: creating Makefile ./config.status: line 1404: awk: command not found config.status: creating expat.pc ./config.status: line 1404: awk: command not found

Since it's a pretty basic tool, make it part of the tools checked by dependencies.sh. One minor annoyance is that check-host-python3.sh is executed *before* dependencies.sh does its thing, so when 'awk' is not available, we end up seeing:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found
which: no awk in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) You must install 'awk' on your build machine
make: *** [support/dependencies/dependencies.mk:27: dependencies] Error 1

Quoted 4 lines

It would be nice to have the awk check *before* it gets used in check-host-python3.sh, but that's a topic for another patch.

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 26 lines · Thomas Petazzoni via buildroot

A basic Fedora 42 container does not have 'awk' installed, but it is needed by Buildroot. First by check-host-python3.sh:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found

but then even building host-expat assumes awk is available:

config.status: creating Makefile ./config.status: line 1404: awk: command not found config.status: creating expat.pc ./config.status: line 1404: awk: command not found

Since it's a pretty basic tool, make it part of the tools checked by dependencies.sh. One minor annoyance is that check-host-python3.sh is executed *before* dependencies.sh does its thing, so when 'awk' is not available, we end up seeing:

support/dependencies/check-host-python3.sh: line 6: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found support/dependencies/check-host-python3.sh: line 19: awk: command not found
which: no awk in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) You must install 'awk' on your build machine
make: *** [support/dependencies/dependencies.mk:27: dependencies] Error 1

Quoted 4 lines

It would be nice to have the awk check *before* it gets used in check-host-python3.sh, but that's a topic for another patch.

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 24 lines

---
v1 -> v2: fix documentation syntax, spotted by Baruch

---
  docs/manual/prerequisite.adoc        | 1 +
  support/dependencies/dependencies.sh | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)
docs/manual/prerequisite.adoc +1 -0
index 5d3aa297a9..1bfcff1a4a 100644
@@ -38,6 +38,7 @@ between distributions).
  ** +file+ (must be in +/usr/bin/file+)
  ** +bc+
  ** +findutils+
+** +awk+
 
  * Source fetching tools:
  ** +wget+
support/dependencies/dependencies.sh +0 -0
index fb0defd0c9..2843e3c5d5 100755

support/dependencies/dependencies.sh fi · line 160

Quoted 8 lines
support/dependencies/dependencies.sh +1 -1
@@ -154,7 +154,7 @@ fi
 
  # Check that a few mandatory programs are installed
  missing_progs="no"
-for prog in perl tar wget cpio unzip rsync bc cmp find xargs ${DL_TOOLS} ; do
+for prog in perl tar wget cpio unzip rsync bc cmp find xargs awk ${DL_TOOLS} ; do
  	if ! which $prog > /dev/null ; then
  		echo "You must install '$prog' on your build machine";
  		missing_progs="yes"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot