meson build failure on 'seen'
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Apr 15, 2025, 17:16 UTC
- Message-ID
- <c358c9b7-bd83-407f-8abc-17ce9363618e@ramsayjones.plus.com>
Hi Junio,
Attempting to configure a meson build of the current 'seen'@916e0fb7c0 branch, I find:
$ meson setup --optimization=2 -Dprefix=$HOME -Dpcre2=disabled build/ The Meson build system ...
meson.build:769:46: ERROR: Unknown variable "target_shell".
A full log can be found at /home/ramsay/git/build/meson-logs/meson-log.txt $
It appears that the tip commit 916e0fb7c0 (Merge branch 'ps/meson-build-perf-bench' into seen, 2025-04-14) drops the call to 'find_program()' which sets/defines the 'target_shell' variable.
The following diff allows me to configure the build:
$ git diff
diff --git a/meson.build b/meson.build
index 015ead27e6..4d537b7a00 100644
--- a/meson.build
+++ b/meson.build
@@ -237,6 +237,8 @@ shell = find_program('sh', dirs: program_path, native: true)
tar = find_program('tar', dirs: program_path, native: true)
time = find_program('time', dirs: program_path, native: true, required: false)
+target_shell = find_program('sh', dirs: program_path, native: false)
+
# Sanity-check that programs required for the build exist.
foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']
find_program(tool, dirs: program_path, native: true)
$ This allows me to compile the project (I'm still waiting for the test run to finish).
HTH
ATB, Ramsay Jones