# meson build failure on 'seen'

3 messages from 2025-04-15 to 2025-04-16. Participants: Ramsay Jones, Junio C Hamano, Patrick Steinhardt.
Thread: https://gitlist.dev/t/63299

## Ramsay Jones, 2025-04-15 17:16

Subject: meson build failure on 'seen'
Message-ID: <c358c9b7-bd83-407f-8abc-17ce9363618e@ramsayjones.plus.com>
URL: https://gitlist.dev/e/c358c9b7-bd83-407f-8abc-17ce9363618e%40ramsayjones.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



```

## Junio C Hamano, 2025-04-15 19:11

Subject: Re: meson build failure on 'seen'
Message-ID: <xmqqy0w1kzob.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqy0w1kzob.fsf%40gitster.g
In-Reply-To: <c358c9b7-bd83-407f-8abc-17ce9363618e@ramsayjones.plus.com>

```
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> 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.

Ahh, indeed.  This was the mismerge I was looking for.

Will adjust the broken merge.  Thanks!

```

## Patrick Steinhardt, 2025-04-16 08:56

Subject: Re: meson build failure on 'seen'
Message-ID: <Z_9wukFkVqAykm0L@pks.im>
URL: https://gitlist.dev/e/Z_9wukFkVqAykm0L%40pks.im
In-Reply-To: <xmqqy0w1kzob.fsf@gitster.g>

```
On Tue, Apr 15, 2025 at 12:11:32PM -0700, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
> > 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.
> 
> Ahh, indeed.  This was the mismerge I was looking for.
> 
> Will adjust the broken merge.  Thanks!

Thanks to both of you!

Patrick

```
