tianocore/containers

nasm version need Upgrade

yishangzhang opened this issue · 0 comments

Describe the bug
Hello! I intend to build edk2 in Container without using Stuart, but I encountered an error with nasm as Expected behavior show .

To Reproduce
Steps to reproduce the behavior:
After cloning the edk2 repository code, I performed the following operations

    5  git submodule update --init 
    6  make -C BaseTools/
    7  export EDK_TOOLS_PATH=/root/edk2/BaseTools
    8  . edksetup.sh BaseTools
    9  vim Conf/target.txt    # changes: ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc  TOOL_CHAIN_TAG        = GCC5 
   10  build

Expected behavior

"gcc" -MMD -MF /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.obj.deps -E -x assembler-with-cpp -include AutoGen.h -I/root/edk2/MdePkg/Library/BaseLib/Ia32 -I/root/edk2/MdePkg/Library/BaseLib -I/root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/DEBUG -I/root/edk2/MdePkg -I/root/edk2/MdePkg/Include -I/root/edk2/MdePkg/Test/UnitTest/Include -I/root/edk2/MdePkg/Include/Ia32 /root/edk2/MdePkg/Library/BaseLib/Ia32/LongJump.nasm > /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.ii
Trim --trim-long --source-code -o /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.iii /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.ii
"nasm" -I/root/edk2/MdePkg/Library/BaseLib/Ia32/ -I/root/edk2/MdePkg/Library/BaseLib/Ia32/ -I/root/edk2/MdePkg/Library/BaseLib/ -I/root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/DEBUG/ -I/root/edk2/MdePkg/ -I/root/edk2/MdePkg/Include/ -I/root/edk2/MdePkg/Test/UnitTest/Include/ -I/root/edk2/MdePkg/Include/Ia32/ -f elf32 -o /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.obj /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.iii
/root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.iii:42: error: parser: instruction expected
/root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.iii:47: error: parser: instruction expected
make: *** [GNUmakefile:860: /root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib/OUTPUT/Ia32/LongJump.obj] Error 1


build.py...
 : error 7000: Failed to execute command
        make tbuild [/root/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdePkg/Library/BaseLib/BaseLib]


build.py...
 : error F002: Failed to build module
        /root/edk2/MdePkg/Library/BaseLib/BaseLib.inf [IA32, GCC5, DEBUG]

- Failed -
Build end time: 10:24:23, May.16 2023
Build total time: 00:00:08

Execution environment
Building locally on Ubuntu 20.04. with commit tag : 23e284f

Additional context
After searching online, I found a solution that worked https://edk2.groups.io/g/devel/topic/89637409#87359 , but I'm not sure why it wasn't already modified in the repository. Therefore, I am submitting this PR as a fix #73 . If this issue should not have been raised, please close it. THANKS