build command not found


Schultschik, Sven
 

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/edksetup.sh". 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".

I wonder why the edk2 build is so picky in the build environment I try to run it.

Thank you for any hints.

Regards

Sven


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/edksetup.sh". 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 edksetup.sh It should put the path to the build command in your $PATH. Here is an example from my Mac:
/Volumes/Case/edk2/BaseTools/BinWrappers/PosixLike

We can see that is how it works from the command line.
/Volumes/Case/edk2(master)>which build
/Volumes/Case/edk2/BaseTools/BinWrappers/PosixLike/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 edksetup.sh 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 edksetup.sh?

Thanks,

Andrew Fish

Thank you for any hints.

Regards

Sven