You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Build fail on Ubuntu 20.04.2][OvmfPkg] SecTdxHelper.c:751:26: error: ‘PhysicalEnd’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
#10840
Open
tenpoku1000 opened this issue
Mar 11, 2025
· 1 comment
~/edk2$ build -a X64 -t GCC49 -p OvmfPkg/OvmfPkgX64.dsc
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c: In function ‘TdxHelperProcessTdHob’:
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c:751:26: error: ‘PhysicalEnd’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
751 | APsStackStartAddress = PhysicalEnd - APS_STACK_SIZE (CpusNum);
| ^
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c:335:25: note: ‘PhysicalEnd’ was declared here
335 | EFI_PHYSICAL_ADDRESS PhysicalEnd;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [GNUmakefile:305: /home/tenpoku/edk2/Build/OvmfX64/DEBUG_GCC49/X64/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelperLib/OUTPUT/SecTdxHelper.obj] error 1
build.py...
: error 7000: Failed to execute command
make tbuild [/home/tenpoku/edk2/Build/OvmfX64/DEBUG_GCC49/X64/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelperLib]
~/edk2$ build -a X64 -t GCC49 -p OvmfPkg/OvmfPkgX64.dsc
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c: In function ‘TdxHelperProcessTdHob’:
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c:751:26: error: ‘PhysicalEnd’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
751 | APsStackStartAddress = PhysicalEnd - APS_STACK_SIZE (CpusNum);
| ^
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c:335:25: note: ‘PhysicalEnd’ was declared here
335 | EFI_PHYSICAL_ADDRESS PhysicalEnd;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [GNUmakefile:305: /home/tenpoku/edk2/Build/OvmfX64/DEBUG_GCC49/X64/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelperLib/OUTPUT/SecTdxHelper.obj] error 1
build.py...
: error 7000: Failed to execute command
make tbuild [/home/tenpoku/edk2/Build/OvmfX64/DEBUG_GCC49/X64/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelperLib]
build.py...
: error F002: Failed to build module
/home/tenpoku/edk2/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelperLib.inf [X64, GCC49, DEBUG]
Build end time: 15:59:29, Mar.11 2025
Build total time: 00:00:17
/edk2$ gcc -v20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnuUsing built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
The text was updated successfully, but these errors were encountered: