Date   

Re: Reg, Building EDKII source.

Mohammad Younas Khan Pathan
 

Liming,
I have reinstalled WinSDK and it shows the header file.
but still I am getting other errors.
May I know what environment vars need to be created post WinSDK
installation? I have set INCLUDE, LIB, LIBPATH vars

Also attached the build log for BaseTools (using edksetup.bat rebuild).

Thank you,
Younas.

On Fri, 5 Mar 2021 at 06:35, gaoliming <gaoliming@byosoft.com.cn> wrote:

Seemly, your WinSDK is not correct.

Windows.h is in my C:\Program Files (x86)\Windows
Kits\10\Include\10.0.17763.0\um directory.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月4日 18:58
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
After creating a new INCLUDE env variable, it resolved the build error.
But
faced other errors and created a LIB env variable for WinSDK libs.
I am getting another error for *windows.h* header file which is not there
in the WinSDK include folder. Can you help me with this?

######################
# Build executables
######################
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry
F:\younas\edk2_latest\BaseTools\Source\C\GenFfs

Microsoft (R) Program Maintenance Utility Version 14.28.29910.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -c /nologo /Zi /c /O2 /MT /W4 /WX /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -I . -I
F:\younas\edk2_latest\BaseTools\Source\C\Include -I
F:\younas\edk2_latest\BaseTools\Source\C\Include\Ia32 -I
F:\younas\edk2_latest\BaseTools\Source\C\Common GenFfs.c -FoGenFfs.obj
GenFfs.c
*GenFfs.c(10): fatal error C1083: Cannot open include file: 'windows.h':
No
such file or directory*
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.ex
e"' :
return code '0x2'
Stop.

Thank you,
Younas.

On Wed, 3 Mar 2021 at 19:58, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this
env
value.



Thanks

Liming

*发件人:* Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>
*发送时间:* 2021年3月3日 22:25
*收件人:* gaoliming <gaoliming@byosoft.com.cn>
*抄送:* discuss@edk2.groups.io
*主题:* Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from
MS
VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?


Thank you,

Younas.



On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn>
wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083:
Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.














Re: 回复: [edk2-discuss] edk2 build error

Sean
 

EmulatorPkg on Windows is a Windows application and thus you need all the tools/libs to support building a windows application.

I would suggest making sure you have VS2019 and WinSdk as listed here:

https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#visual-studio-2019-preferred

https://microsoft.github.io/mu/CodeDevelopment/prerequisites/#optional-windows-driver-kit

Thanks
Sean

On 3/4/2021 6:23 AM, Mohammad Younas Khan Pathan wrote:
The mu_nasm dependency issue is resolved with below cmd:
stuart_update -c .pytool/CISettings.py
I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:
*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall: ['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*
Do we need to do any setup for these variables?
Thank you,
Younas.
On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...









回复: [edk2-discuss] Reg, Building EDKII source.

gaoliming
 

Seemly, your WinSDK is not correct.

Windows.h is in my C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um directory.

Thanks
Liming

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月4日 18:58
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
After creating a new INCLUDE env variable, it resolved the build error. But
faced other errors and created a LIB env variable for WinSDK libs.
I am getting another error for *windows.h* header file which is not there
in the WinSDK include folder. Can you help me with this?

######################
# Build executables
######################
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry
F:\younas\edk2_latest\BaseTools\Source\C\GenFfs

Microsoft (R) Program Maintenance Utility Version 14.28.29910.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -c /nologo /Zi /c /O2 /MT /W4 /WX /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -I . -I
F:\younas\edk2_latest\BaseTools\Source\C\Include -I
F:\younas\edk2_latest\BaseTools\Source\C\Include\Ia32 -I
F:\younas\edk2_latest\BaseTools\Source\C\Common GenFfs.c -FoGenFfs.obj
GenFfs.c
*GenFfs.c(10): fatal error C1083: Cannot open include file: 'windows.h': No
such file or directory*
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.ex
e"' :
return code '0x2'
Stop.

Thank you,
Younas.

On Wed, 3 Mar 2021 at 19:58, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this env
value.



Thanks

Liming

*发件人:* Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>
*发送时间:* 2021年3月3日 22:25
*收件人:* gaoliming <gaoliming@byosoft.com.cn>
*抄送:* discuss@edk2.groups.io
*主题:* Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from MS
VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?


Thank you,

Younas.



On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn>
wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan
<pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083:
Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.







Re: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Bret Barkelew
 

Happy to help. Can you send the full console output including your original command?
Thanks!

- Bret

From: Mohammad Younas Khan Pathan via groups.io<mailto:pmdyounaskhan786=gmail.com@groups.io>
Sent: Thursday, March 4, 2021 6:23 AM
To: Feng, Bob C<mailto:bob.c.feng@intel.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>; alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Subject: [EXTERNAL] Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall: ['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FEmulatorPkg%2FPlatformCI%2FR&;data=04%7C01%7Cbret.barkelew%40microsoft.com%7Cbbcdf46a0d0f4e50b30f08d8df192459%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637504646368276783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sa0LlLWD7dEFVUzRTHER%2FYOzHUM%2FoGnDQpdT4t6o1Zc%3D&amp;reserved=0
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...









Re: 回复: [edk2-discuss] edk2 build error

Bob Feng
 

Looks like the WINSDK10 is not installed.

Thanks,
Bob

From: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>
Sent: Thursday, March 4, 2021 10:24 PM
To: Feng, Bob C <bob.c.feng@intel.com>
Cc: discuss@edk2.groups.io; alexgdi@outlook.com
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

The mu_nasm dependency issue is resolved with below cmd:


stuart_update -c .pytool/CISettings.py



I am facing another error if I try stuart_build (for EmulatorPkg) or running BaseTools/Edk2ToolsBuild.py for VS2019:
ERROR - We were not able to find on the keys requested from vcvarsall.
ValueError: Missing keys when querying vcvarsall: ['WINDOWSSDKVERSION', 'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH', 'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION', 'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>> wrote:
OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to build OvmfPkg in details. Those instruction can also apply to EmulatorPkg Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32 TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>> On Behalf Of Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com<mailto:alexgdi@outlook.com>
Cc: discuss@edk2.groups.io<mailto:discuss@edk2.groups.io>
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in <module>
File
"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line 122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before running this tool.")
RuntimeError: SDE is not current. Please update your env before running this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com<mailto:alexgdi@outlook.com>> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...





Re: 回复: [edk2-discuss] edk2 build error

Mohammad Younas Khan Pathan
 

The mu_nasm dependency issue is resolved with below cmd:

stuart_update -c .pytool/CISettings.py


I am facing another error if I try stuart_build (for EmulatorPkg) or
running BaseTools/Edk2ToolsBuild.py for VS2019:

*ERROR - We were not able to find on the keys requested from vcvarsall.*
* ValueError: Missing keys when querying vcvarsall: ['WINDOWSSDKVERSION',
'WINDOWSSDKBINPATH', 'UNIVERSALCRTSDKDIR', 'WINDOWSLIBPATH', 'PATH',
'VCTOOLSINSTALLDIR', 'EXTENSIONSDKDIR', 'UCRTVERSION',
'WINDOWSSDKVERBINPATH', 'WINDOWSSDKDIR']*

Do we need to do any setup for these variables?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 19:24, Feng, Bob C <bob.c.feng@intel.com> wrote:

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to
build OvmfPkg in details. Those instruction can also apply to EmulatorPkg
Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary
environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32
TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept
with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in
<module>
File

"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...









Re: 回复: [edk2-discuss] edk2 build error

Bob Feng
 

OvmfPkg\Platform\ReadMe.md describes the instruction of using Pytools to build OvmfPkg in details. Those instruction can also apply to EmulatorPkg Build.

This command is to init and update the edk2 submodules
stuart_setup -c OvmfPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to install the nasm and iasl
stuart_update -c OvmfPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>

This command is to build BaseTools C tools and set the necessary environment variable
python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>

This command is to OvmfPkg
stuart_build -c OvmfPkg/PlatformCI/PlatformBuild.py -a IA32 TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG>


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Mohammad Younas Khan Pathan
Sent: Thursday, March 4, 2021 7:07 PM
To: alexgdi@outlook.com
Cc: discuss@edk2.groups.io
Subject: Re: [edk2-discuss] 回复: [edk2-discuss] edk2 build error

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept with NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in <module>
File
"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line 122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before running this tool.")
RuntimeError: SDE is not current. Please update your env before running this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> #
ToolChainTag
It is not necessary to compile BaseTools. If you want to build
EmulatorPkg try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/R
eadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...





Re: 回复: [edk2-discuss] edk2 build error

alexgdi@...
 

What's compiler do you use?
The dependency mu_nasm needs to be installed.

Follow this instruction - https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/ReadMe.md


Re: 回复: [edk2-discuss] edk2 build error

Mohammad Younas Khan Pathan
 

Alex,
I tried that cmd, but it gives below error: NASM is installed and kept with
NASM_PREFIX env variable.

ERROR - Dependency 'mu_nasm' is not met!
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\stuart_build.exe\__main__.py", line 7, in <module>
File
"c:\python\lib\site-packages\edk2toolext\invocables\edk2_platform_build.py",
line 113, in main
Edk2PlatformBuild().Invoke()
File
"c:\python\lib\site-packages\edk2toolext\base_abstract_invocable.py", line
122, in Invoke
raise RuntimeError("SDE is not current. Please update your env before
running this tool.")
RuntimeError: SDE is not current. Please update your env before running
this tool.

Have you got any errors like this?

Thank you,
Younas.

On Thu, 4 Mar 2021 at 16:06, <alexgdi@outlook.com> wrote:

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> # ToolChainTag
It is not necessary to compile BaseTools. If you want to build EmulatorPkg
try this instruction
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/ReadMe.md
and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py
TOOL_CHAIN_TAG=VS2019 -a X64

...





Re: Reg, Building EDKII source.

Mohammad Younas Khan Pathan
 

Liming,
After creating a new INCLUDE env variable, it resolved the build error. But
faced other errors and created a LIB env variable for WinSDK libs.
I am getting another error for *windows.h* header file which is not there
in the WinSDK include folder. Can you help me with this?

######################
# Build executables
######################
subprocess not exit successfully
Error while execute command 'nmake all' in direcotry
F:\younas\edk2_latest\BaseTools\Source\C\GenFfs

Microsoft (R) Program Maintenance Utility Version 14.28.29910.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe -c /nologo /Zi /c /O2 /MT /W4 /WX /D
_CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE -I . -I
F:\younas\edk2_latest\BaseTools\Source\C\Include -I
F:\younas\edk2_latest\BaseTools\Source\C\Include\Ia32 -I
F:\younas\edk2_latest\BaseTools\Source\C\Common GenFfs.c -FoGenFfs.obj
GenFfs.c
*GenFfs.c(10): fatal error C1083: Cannot open include file: 'windows.h': No
such file or directory*
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe"' :
return code '0x2'
Stop.

Thank you,
Younas.

On Wed, 3 Mar 2021 at 19:58, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this env
value.



Thanks

Liming

*发件人:* Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>
*发送时间:* 2021年3月3日 22:25
*收件人:* gaoliming <gaoliming@byosoft.com.cn>
*抄送:* discuss@edk2.groups.io
*主题:* Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from MS
VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?


Thank you,

Younas.



On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083: Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.





Re: 回复: [edk2-discuss] edk2 build error

alexgdi@...
 

On Thu, Mar 4, 2021 at 02:27 AM, Mohammad Younas Khan Pathan wrote:


cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> # ToolChainTag
It is not necessary to compile BaseTools. If you want to build EmulatorPkg try this instruction https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/ReadMe.md and use MSVC 2019 compiler

for example

stuart_build -c EmulatorPkg/PlatformCI/PlatformBuild.py TOOL_CHAIN_TAG=VS2019 -a X64

...


Re: 回复: [edk2-discuss] edk2 build error

Mohammad Younas Khan Pathan
 

I am also facing the same build error (GenFfs error) when I build
EmulatorPkg in Windows Server 2016 with MS VS 2019. Then I tried the steps
in the link below to build basetools.
https://github.com/tianocore/edk2/blob/master/EmulatorPkg/PlatformCI/ReadMe.md
cmd: python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag> # ToolChainTag
as CLANGPDB

I am getting below error, can any one help on how to build in windows? I
have installed pip and other necessary SWs.

F:\younas\edk2_latest>python BaseTools\Edk2ToolsBuild.py -t CLANGPDB
SECTION - Init SDE
SECTION - Loading Plugins
SECTION - Start Invocable Tool
CRITICAL - Tool Chain not supported
SECTION - Summary
ERROR - Error

Thank you,
Younas.

On Wed, 3 Mar 2021 at 21:55, Rebecca Cran <rebecca@nuviainc.com> wrote:

Would it be helpful to perhaps delete all the files except the README,
to make it more difficult to accidentally use? Or could the repo just be
deleted? Especially since there's now an edk2-basetools repo that's
being maintained.


--
Rebecca Cran

On 3/2/21 8:00 PM, gaoliming wrote:
Please don't use the binary base tools. They are not maintained. Before
you build, please make sure EDK_TOOLS_BIN be not set.

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
alexgdi@outlook.com
发送时间: 2021年3月2日 22:07
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] edk2 build error

Hello! I am trying to compile an EDK2 under Windows 10 using VS2019.
When
compiling, I get an error from the GenFFs utility which says that the
option -oi
is not valid. Here is part of the build script output.

Building ...
e:\fw\edk2\MdeModulePkg\Universal\Disk\PartitionDxe\PartitionDxe.inf
[X64]
GenFfs -t EFI_FV_FILETYPE_PEIM -g
9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50 -o
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs
-oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\PEIPcdDataBaseSec.raw -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC1
.1.dpx -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC2
.1.pe32 -n 0 -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC3
.ui -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC4
.ver
Building ... e:\fw\edk2\MdeModulePkg\Core\Pei\PeiMain.inf [X64]
GenFfs: ERROR 1000: Unknown option
-oi

NMAKE : fatal error U1077: 'E:\fw\edk2-BaseTools-win32\GenFfs.EXE' :
return code '0x2'
Stop.

Thank you!















Re: 回复: [edk2-discuss] edk2 build error

Rebecca Cran
 

Would it be helpful to perhaps delete all the files except the README, to make it more difficult to accidentally use? Or could the repo just be deleted? Especially since there's now an edk2-basetools repo that's being maintained.


--
Rebecca Cran

On 3/2/21 8:00 PM, gaoliming wrote:
Please don't use the binary base tools. They are not maintained. Before you build, please make sure EDK_TOOLS_BIN be not set.
Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
alexgdi@outlook.com
发送时间: 2021年3月2日 22:07
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] edk2 build error

Hello! I am trying to compile an EDK2 under Windows 10 using VS2019. When
compiling, I get an error from the GenFFs utility which says that the option -oi
is not valid. Here is part of the build script output.

Building ...
e:\fw\edk2\MdeModulePkg\Universal\Disk\PartitionDxe\PartitionDxe.inf
[X64]
GenFfs -t EFI_FV_FILETYPE_PEIM -g
9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50 -o
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50.ffs
-oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\PEIPcdDataBaseSec.raw -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC1
.1.dpx -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC2
.1.pe32 -n 0 -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC3
.ui -oi
e:\fw\Build\EmulatorX64\RELEASE_VS2019\FV\Ffs\9B3ADA4F-AE56-4c24-8D
EA-F03B7558AE50PcdPeim\9B3ADA4F-AE56-4c24-8DEA-F03B7558AE50SEC4
.ver
Building ... e:\fw\edk2\MdeModulePkg\Core\Pei\PeiMain.inf [X64]
GenFfs: ERROR 1000: Unknown option
-oi

NMAKE : fatal error U1077: 'E:\fw\edk2-BaseTools-win32\GenFfs.EXE' :
return code '0x2'
Stop.

Thank you!




回复: [edk2-discuss] Reg, Building EDKII source.

gaoliming
 

Please open new cmd, and cd Edk2, type edksetup.bat Rebuild again.



System header files are searched from INCLUDE env. Please check this env value.



Thanks

Liming

发件人: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>
发送时间: 2021年3月3日 22:25
收件人: gaoliming <gaoliming@byosoft.com.cn>
抄送: discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.



Liming,

Still I am facing the same error even after installing SDK tools from MS VS 2019 installer.

And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\



Do I need to make any changes apart from this?




Thank you,

Younas.

On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> > wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <mailto:discuss@edk2.groups.io> <discuss@edk2.groups.io <mailto:discuss@edk2.groups.io> > 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com <mailto:pmdyounaskhan786@gmail.com> >;
discuss@edk2.groups.io <mailto:discuss@edk2.groups.io>
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using "edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083: Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.




Re: Reg, Building EDKII source.

Mohammad Younas Khan Pathan
 

Liming,
Still I am facing the same error even after installing SDK tools from MS VS
2019 installer.
And also added the below path (which has assert.h) to PATH variable:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\

Do I need to make any changes apart from this?

Thank you,
Younas.

On Wed, 3 Mar 2021 at 14:14, gaoliming <gaoliming@byosoft.com.cn> wrote:

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using
"edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083: Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.






EDK2 Pytool and edk2-Libc

alexgdi@...
 

How can i build libc and use for my edk2 project?

Do I need to set up workspaces? How to do it in pytool build system?

Thanque.


Re: edk2 build error

alexgdi@...
 


Re: edk2 build error

alexgdi@...
 

I am very grateful! You helped solve my problem.

I used the old build system BaseTools instead of pytool build system. EDK2 wiki confuses newbie EDK developers.


回复: [edk2-discuss] Reg, Building EDKII source.

gaoliming
 

Please make sure install WINSDK10

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表
Mohammad Younas Khan Pathan
发送时间: 2021年3月3日 15:42
收件人: Mohammad Younas Khan Pathan <pmdyounaskhan786@gmail.com>;
discuss@edk2.groups.io
主题: Re: [edk2-discuss] Reg, Building EDKII source.

Liming,
I can able to download the build tools for VS from
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-
2019
I am facing a build error while building latest Basetools using "edksetup.bat
rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083: Cannot
open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.




Re: Reg, Building EDKII source.

Mohammad Younas Khan Pathan
 

Liming,
I can able to download the build tools for VS from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
I am facing a build error while building latest Basetools using "edksetup.bat rebuild" command.
BaseTools\Source\C\Common\CommonLib.h(14): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory

Is there any issue for it? or is it fixed?

Thanks,
Younas.

281 - 300 of 862