[openwrt/openwrt] build: add which command to build requirements
LEDE Commits
lede-commits at lists.infradead.org
Wed Mar 3 22:04:36 GMT 2021
ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/ceb6869cd982056b02f97b51a0e4e2d300ea5b12
commit ceb6869cd982056b02f97b51a0e4e2d300ea5b12
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Wed Mar 3 19:48:55 2021 +0100
build: add which command to build requirements
`which` utility is not shipped by default for example on recent Arch
Linux and then any steps relying on its presence fails, like for example
following Python3 prereq build check:
$ python3 --version
Python 3.9.1
$ make
/bin/sh: line 1: which: command not found
...
Checking 'python3'... failed.
So make `which` utility host build requirement.
References: PR#3820 FS#3525
Signed-off-by: Petr Štetiar <ynezz at true.cz>
(cherry picked from commit 13069b1a1dcbef0bb9b42db98025fa9203283220)
---
README.md | 2 +-
include/prereq-build.mk | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 21acbf4b80..6bb4d2e913 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ documentation.
```
gcc binutils bzip2 flex python3 perl make find grep diff unzip gawk getopt
-subversion libz-dev libc-dev rsync
+subversion libz-dev libc-dev rsync which
```
### Quickstart
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 7c668968b6..86c22f7c95 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -166,6 +166,9 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
+$(eval $(call SetupHostCommand,which,Please install 'which', \
+ which which | grep which))
+
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
mkdir -p $(dir $@)
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
More information about the lede-commits
mailing list