Skip to content

build: unbreak on non-GNU distributions

Jan Beich requested to merge (removed):bash into main

Bash is a GNU program, so /bin/bash may not exist by default on non-GNU systems like Alpine Linux or FreeBSD (both packaged helvum). For example, DragonFly, FreeBSD, OpenBSD install bash under /usr/local/bin, NetBSD installs bash under /usr/pkg/bin, OpenIndiana installs bash under /usr/bin.

See also Wikipedia, POSIX.

$ meson setup /tmp/helvum_build
[...]
Program build-aux/cargo.sh found: YES (/bin/bash /path/to/helvum/build-aux/cargo.sh)
[...]
$ meson compile -C /tmp/helvum_build
ninja: Entering directory `/tmp/helvum_build'
[0/1] Generating src/cargo-build with a custom command
/bin/sh: /bin/bash: not found
FAILED: src/helvum
/bin/bash /path/to/helvum/build-aux/cargo.sh /tmp/helvum_build /path/to/helvum src/helvum default helvum
ninja: build stopped: subcommand failed.
$ where bash
/usr/local/bin/bash
Edited by Jan Beich

Merge request reports

Loading