From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 13 Aug 2019 05:23:11 -0700 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3ECD7308FC22; Tue, 13 Aug 2019 12:23:11 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-193.ams2.redhat.com [10.36.117.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43AA479C75; Tue, 13 Aug 2019 12:23:10 +0000 (UTC) Subject: Re: [edk2-devel] ovmf build fail with gcc 4.8.5 To: devel@edk2.groups.io, farrah.chen@intel.com Cc: "Hao, Xudong" References: <1B925CC0CD9F3341B32D442251E7E1DC3E3115C3@SHSMSX104.ccr.corp.intel.com> From: "Laszlo Ersek" Message-ID: <1f5939cf-2429-7677-03b1-9a07bcf0ac48@redhat.com> Date: Tue, 13 Aug 2019 14:23:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1B925CC0CD9F3341B32D442251E7E1DC3E3115C3@SHSMSX104.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 13 Aug 2019 12:23:11 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/13/19 03:13, Chen, Farrah wrote: > Hi, > > When build ovmf with the latest two commits of master branch, we meet error on Red Hat 7.6 with gcc version 4.8.5, but succeed on Red Hat 8.0 with gcc version 8.2.1. > > Steps: > git clone https://github.com/tianocore/edk2.git > cd edk2 > git submodule init > git submodule update -recursive > OvmfPkg/build.sh -a X64 -n 64 > > Error log: > ....... > /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c:641:50: error: 'PageMapLevel5Entry' may be used uninitialized in this function [-Werror=maybe-uninitialized] > PAGE_MAP_AND_DIRECTORY_POINTER *PageMapLevel5Entry; > ^ > cc1: all warnings being treated as errors > "objcopy" /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe/DEBUG/PciHostBridgeDxe.dll > "GenFw" -e UEFI_DRIVER -o /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/XenBusDxe/XenBusDxe/OUTPUT/XenBusDxe.efi /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/XenBusDxe/XenBusDxe/DEBUG/XenBusDxe.dll > make: *** [/home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/MdeModulePkg/Core/DxeIplPeim/DxeIpl/OUTPUT/X64/VirtualMemory.obj] Error 1 > cp -f /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/XenBusDxe/XenBusDxe/OUTPUT/XenBusDxe.efi /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/OvmfPkg/XenBusDxe/XenBusDxe/DEBUG > > > build.py... > : error 7000: Failed to execute command > make tbuild [/home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/Build/OvmfX64/DEBUG_GCC48/X64/MdeModulePkg/Core/DxeIplPeim/DxeIpl] > > > > > build.py... > : error F002: Failed to build module > /home/build/kvm_build/nightly/kvm_qemu/kvm-next-20190813010558-a738b5e7-5e7bcdcf/edk2/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf [X64, GCC48, DEBUG] > > - Failed - > Build end time: 08:46:33, Aug.13 2019 > Build total time: 00:01:15 > > GCC: > gcc --version > gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) > Copyright (C) 2015 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This bug was introduced in commit b3527dedc395 ("MdeModulePkg/DxeIpl: Create 5-level page table for long mode", 2019-08-09). It's being addressed in the following (pending) patch: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Relocate the operation of PageMapLevel5Entry++ (I'm calling the issue a bug and not an invalid compiler warning because the patch looks like an actual fix.) Thanks Laszlo