From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.15708.1661159517750634074 for ; Mon, 22 Aug 2022 02:11:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ln/S1Qfh; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 61448B80EF0 for ; Mon, 22 Aug 2022 09:11:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24FA8C43470 for ; Mon, 22 Aug 2022 09:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661159514; bh=NMdarRJRos0MxcCVcuAerj+ZxQLu2+1WJRxRcUChn6E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ln/S1QfhJsl8XImdWRKvhKD4N4HZAjo1AsiUQC4d2iXv6JnUXeLvYsXVv3+7xKsRP Ka0gGpp8G/gxHc6c9InO4ODHqCcE6vtbDxJWOjrKR0dyBGO3LM0bBQPFC2IdCZDFFx /O5tYu4PwSkr7fDxcSOk56rzMwSntmvc8GO8pxjlR13/4npCKH/qkmipX9VHOxkGAK 5ZPtPsjzYCPI6LkzRdGXzxBuVGQlgL4XFPIZSRcQuRll/WrCxjILMNHd7pvZQWQvPp XvKMWX02mPcixxPOKqrdSd08IgfRceHJOxAYe8MM41B5g5ktCLzNqx/hzzN2eIgrdy kTpi2HpjUxqow== Received: by mail-wm1-f48.google.com with SMTP id m10-20020a05600c3b0a00b003a603fc3f81so5636464wms.0 for ; Mon, 22 Aug 2022 02:11:54 -0700 (PDT) X-Gm-Message-State: ACgBeo0cWlWGK60uFcS0sSugE0G7UaqjLtw/j4oQDDOwKu5LyNUgEXRA kQEUPyoSQACI73adQM2Iqjg/4L4ZdobQtMh0I+8= X-Google-Smtp-Source: AA6agR5hWcf6Sl9ztDIKpVYYDFNsrZNT5EbO6UdRZIEGkcj8ALKjkpAxsHXa9gbyzFgDHAe6bfuv8504f4iPQy+0Me8= X-Received: by 2002:a05:600c:3509:b0:3a6:1888:a4bd with SMTP id h9-20020a05600c350900b003a61888a4bdmr11783564wmq.191.1661159512356; Mon, 22 Aug 2022 02:11:52 -0700 (PDT) MIME-Version: 1.0 References: <41a26d57-4fae-f53f-29ae-d6c7b258eaee@bsdio.com> In-Reply-To: <41a26d57-4fae-f53f-29ae-d6c7b258eaee@bsdio.com> From: "Ard Biesheuvel" Date: Mon, 22 Aug 2022 11:11:41 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04 To: devel@edk2.groups.io, rebecca@bsdio.com, "Feng, Bob C" , Liming Gao Cc: Andrew Fish , Leif Lindholm , Michael D Kinney , Jian J Wang Content-Type: text/plain; charset="UTF-8" (cc Bob) NOTE this affects the stable tag - please see below On Sun, 21 Aug 2022 at 06:34, Rebecca Cran wrote: > > I noticed that MdeModulePkg fails to build on my Ubuntu 22.04 system > (and previously on the Ubuntu 20.04 installation). Is this a known bug? > > It shouldn't be relevant, but I'm using gcc version 11.2.0 (Ubuntu > 11.2.0-17ubuntu1). But perhaps more relevant, I'm using Python 3.10.4. > > I'm trying to build commit e2ac68a23b4954d5c0399913a1df3dd9fd90315d. > > > bcran@photon:~/src/tmp/edk2$ build -p MdeModulePkg/MdeModulePkg.dsc -a > AARCH64 -t GCC5 -b RELEASE > Build environment: Linux-5.15.0-46-generic-x86_64-with-glibc2.35 > Build start time: 22:29:18, Aug.20 2022 > > WORKSPACE = /home/bcran/src/tmp/edk2 > EDK_TOOLS_PATH = /home/bcran/src/tmp/edk2/BaseTools > CONF_PATH = /home/bcran/src/tmp/edk2/Conf > PYTHON_COMMAND = /usr/bin/python3 > > > Processing meta-data > .Architecture(s) = AARCH64 > Build target = RELEASE > Toolchain = GCC5 > > Active Platform = > /home/bcran/src/tmp/edk2/MdeModulePkg/MdeModulePkg.dsc > > > build.py... > /home/bcran/src/tmp/edk2/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf(42): > error 3000: PCD > [gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode] in > [/home/bcran/src/tmp/edk2/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf] > is not found in dependent packages: > /home/bcran/src/tmp/edk2/MdePkg/MdePkg.dec > /home/bcran/src/tmp/edk2/MdeModulePkg/MdeModulePkg.dec > > This looks like a BaseTools regression to me - afaik, these packages all used to build for AARCH64 in the past. The following LockBoxLib resolutions appear in MdeModulePkg.dsc (with line numbers) 115-[LibraryClasses.common.PEIM] 119: LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf 178-[LibraryClasses.ARM, LibraryClasses.AARCH64] 181: LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf No other [LlibraryClasses] references to SmmLockBoxPeiLib.inf exist in that file, and the [Components] reference does not apply to AARCH64. This means the DSC parser ends up using the earlier definition, which I think is a bug, or at least a change in behavior. Note that doing this silently could potentially break many platforms in subtle ways so I think this should be root caused and preferably fixed before creating the stable tag.