$(MAKE) should not be passed to podman
-
I agree that I have searched opened and closed issues to prevent duplicates.
Description
There are several podman guards as follows:
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) $(MAKE) $@
else
...
endif
The problem here is that $(MAKE)
evaluates to the full path of the make
binary on the host system, but the command is executed in a podman container.
This would only work if the path to make
is the same on both of these systems (e.g. /usr/bin/make
). This is not always the case.
For instance, with macOS and Xcode-bundled make, the path is /Applications/Xcode.app/Contents/Developer/usr/bin/make
.
This causes the following error:
Error: preparing container 925e52883b3b41687c4c5337502a406b7de3b369073aee283eba0e04589a4563 for attach: crun: executable file `/Applications/Xcode.app/Contents/Developer/usr/bin/make` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
Environment info
- Operating system: macOS Sonoma 14.2.1
-
uname -a
:Darwin [REDACTED].local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
-
rustc -V
:rustc 1.74.0-nightly (e3abbd499 2023-09-06)
-
git rev-parse HEAD
:4888505cdbd6ecabadc6c0801b58cf9a7d794a14
Steps to reproduce
- Use a macOS system with Xcode installed.
- Resolve another problem with Redox assuming that the host user's GID is the same as their UID.
- Run
make all
.
Behavior
-
Expected behavior:
Either just
make
or the full path of the container'smake
binary should be used when callingmake
inside podman.
-
Actual behavior:
The variable
$(MAKE)
is used and expands to the full path of the host system'smake
binary.
Error: preparing container 925e52883b3b41687c4c5337502a406b7de3b369073aee283eba0e04589a4563 for attach: crun: executable file `/Applications/Xcode.app/Contents/Developer/usr/bin/make` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
Proposed solution:
- Create a var,
PODMAN_MAKE
, defined as/usr/bin/make
inconfig.mk
orpodman.mk
. - Replace
$(MAKE)
with$(PODMAN_MAKE)
insidePODMAN_BUILD
guards.
Optional references
Optional extras
Edited by Sara Elsayeda