Re: build command not found

Andrew Fish

On May 27, 2022, at 9:55 AM, Schultschik, Sven <sven.schultschik@...> wrote:

Hi all,

I currently work on integrate the edk2 build within a buildsystem.

I startet with the docu, made manual builds and wrote me a bash script to automate the steps. Worked all very well.

The first issue I had was a not correctly running "source edk2/". I fixed by switching to /bin/bash from /bin/sh
The second issue was the failing tests which I fixed in setting manually the PYTHON_COMMAND to python3

Now the current issue which is still left.

build -p "Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc" -b RELEASE -a AARCH64 -t GCC5 -n `nproc`
/bin/bash: line 1: build: command not found

For some reason the build command is not available. Doing the same steps manually it works, but not in the build environment.
All steps bevor are running without any error.

I'm currently looking for the place, where the build command get's "created and published".
When you source It should put the path to the build command in your $PATH. Here is an example from my Mac:

We can see that is how it works from the command line.
/Volumes/Case/edk2(master)>which build

Also the -n takes a number of threads so it looks like ’nproc’ did not expand properly to a number.

I wonder why the edk2 build is so picky in the build environment I try to run it.
Yikes looks like is missing the shebang. I’m guessing we ran some script to update headers at some point and removed it?

Could you file a Bugzilla for the missing shebang in


Andrew Fish

Thank you for any hints.



Join to automatically receive all group messages.