Since commit 6beec3bcdaa ("target/hexagon: add build config for
softmmu") we build the Hexagon target by default when system
emulation is selected. This commit introduced a hard dependency
on the 'bison' program for the idef parser. The binary provided
by Darwin is too old, and the build now fails:

  $ ../configure
  python determined to be '/opt/homebrew/bin/python3'
  C compiler for the host machine: clang (clang 17.0.0 "Apple clang version 
17.0.0 (clang-1700.6.4.2)")
  Program bison found: NO found 2.3 but need: '>=3.0' (/usr/bin/bison)

  ../target/hexagon/meson.build:300:8: ERROR: Program 'bison' not found or not 
executable

  ERROR: meson setup failed

Since we use a lcitool generated vars file, we already install
'bison' from homebrew, but we don't have its path in our $PATH
variable. Add it to the macos.yml PATH_EXTRA variable which will
amend it to the global $PATH.

Fixes: 6beec3bcdaa ("target/hexagon: add build config for softmmu")
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
This however doesn't help macOS users ... They need to manually
register the homebrew bison path.
---
 .gitlab-ci.d/macos.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.d/macos.yml b/.gitlab-ci.d/macos.yml
index 53b6e6c4d8f..3a9e5f46702 100644
--- a/.gitlab-ci.d/macos.yml
+++ b/.gitlab-ci.d/macos.yml
@@ -37,7 +37,7 @@ aarch64-macos-15-build:
   variables:
     QEMU_JOB_MACOS: 1
     NAME: macos-15
-    PATH_EXTRA: /opt/homebrew/gettext/bin
+    PATH_EXTRA: /opt/homebrew/gettext/bin:/opt/homebrew/opt/bison/bin
     PKG_CONFIG_PATH: 
/opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
     CONFIGURE_ARGS:
         --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu
@@ -54,7 +54,7 @@ aarch64-macos-26-build:
     QEMU_JOB_MACOS: 1
     NAME: macos-26
     DYLD_LIBRARY_PATH: /opt/homebrew/opt/expat/lib/
-    PATH_EXTRA: /opt/homebrew/gettext/bin
+    PATH_EXTRA: /opt/homebrew/gettext/bin:/opt/homebrew/opt/bison/bin
     PKG_CONFIG_PATH: 
/opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
     CONFIGURE_ARGS:
         --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu
-- 
2.53.0


Reply via email to