Build-PowerMonkey icon indicating copy to clipboard operation
Build-PowerMonkey copied to clipboard

"build not recognized as internal or external command"

Open arthur-parmentier opened this issue 2 years ago • 9 comments

Hello,

When running build.bat from x64 VS native prompt, I get that "build" is not recognized as internal or external command. I assume that's because I haven't fully installed all the packages for the C++ workflow with VS. Because they take a lot of space and time to download, I would like to know what packages are required or what could be the other reasons why the command call build is not recognized.

arthur-parmentier avatar Jun 07 '22 09:06 arthur-parmentier

Sorry I have no idea about individual packages. I just open up the installer and check the C/C++ workload.

Have you run setup.bat before build.bat?

awyl avatar Jun 07 '22 17:06 awyl

Yes i did successfully! Waiting for you list of packages or insights on this error

arthur-parmentier avatar Jun 07 '22 17:06 arthur-parmentier

Can you try running setup.bat again and look for potential problematic lines?

call build is supposed to be a python executable installed by setup.bat with edk2 pip requirements.

awyl avatar Jun 07 '22 17:06 awyl

thanks, i was not getting it. I will let you that as soon as possible.

arthur-parmentier avatar Jun 07 '22 17:06 arthur-parmentier

After running setup.bat a second time without the @echo off line, I got some errors due to files and found (they probably were moved away by the first run of the script) but what caught my attention is WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Users\dell\Desktop\Build-PowerMonkey\python\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

After adding the folder to my PATH variable, build.bat could work :)

arthur-parmentier avatar Jun 07 '22 22:06 arthur-parmentier

However the build just failed:

C:\Users\dell\Desktop\Build-PowerMonkey\python\Lib\site-packages\edk2basetools\build\build.py:646:` DeprecationWarning: isSet() is deprecated, use is_set() instead if not BuildTask._ErrorFlag.isSet():

build.py... : error 7000: Failed to execute command C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\dell\desktop\build-powermonkey\edk2\Build\MdeModule\RELEASE_VS2019\X64\MdeModulePkg\Universal\Disk\RamDiskDxe\RamDiskDxe] C:\Users\dell\Desktop\Build-PowerMonkey\python\Lib\site-packages\edk2basetools\build\build.py:655: DeprecationWarning: currentThread() is deprecated, use current_thread() instead (threading.currentThread().getName(), Command, WorkingDir) C:\Users\dell\Desktop\Build-PowerMonkey\python\Lib\site-packages\edk2basetools\build\build.py:655: DeprecationWarning: getName() is deprecated, get the name attribute instead (threading.currentThread().getName(), Command, WorkingDir) C:\Users\dell\Desktop\Build-PowerMonkey\python\Lib\site-packages\edk2basetools\build\build.py:500: DeprecationWarning: isSet() is deprecated, use is_set() instead if BuildTask._ErrorFlag.isSet(): C:\Users\dell\Desktop\Build-PowerMonkey\python\Lib\site-packages\edk2basetools\build\build.py:505: DeprecationWarning: getName() is deprecated, get the name attribute instead EdkLogger.debug(EdkLogger.DEBUG_8, "Threads [%s]" % ", ".join(Th.getName() for Th in threading.enumerate()))

build.py... : error 7000: Failed to execute command C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx86\x86\nmake.exe /nologo tbuild [c:\users\dell\desktop\build-powermonkey\edk2\Build\MdeModule\RELEASE_VS2019\X64\MdeModulePkg\Universal\HiiDatabaseDxe\HiiDatabaseDxe]

build.py... : error F002: Failed to build module c:\users\dell\desktop\build-powermonkey\edk2\MdeModulePkg\Universal\Disk\RamDiskDxe\RamDiskDxe.inf [X64, VS2019, RELEASE]

  • Failed - Build end time: 00:22:34, Jun.08 2022 Build total time: 00:01:31

Should I open a new issue for this?

arthur-parmentier avatar Jun 07 '22 22:06 arthur-parmentier

You mentioned you didn't install the whole C++ workload, try install it first.

Then try to use x86 Native Tools Command Prompt, or x64 Native Tools Command Prompt. Some said x86 work, some say x64 works. For me both works.

awyl avatar Jun 07 '22 22:06 awyl

Got the same error message, what exactly is this build command? is it part of Visual Studio or another framework?

lucas-zimerman avatar Aug 27 '22 13:08 lucas-zimerman

build is a python executable. Looks like your setup.bat step has result in error.

As described in this issue, you have to have C++ workload installed.

Please create another issue if you have followed all the steps and post the errors.

I took a lot of time to fine tune these scripts. These were as minimum as I could get. Everything and every steps are required.

Hope you can resolve the issue soon.

awyl avatar Aug 27 '22 19:08 awyl