From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.221.43; helo=mail-wr1-f43.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 17226211BFCC5 for ; Mon, 4 Feb 2019 03:54:32 -0800 (PST) Received: by mail-wr1-f43.google.com with SMTP id r2so2351258wrv.10 for ; Mon, 04 Feb 2019 03:54:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oLJo5Akngo9mMaClgPRVZ2NYBEC+Jk7Du2EnJK9ZVBc=; b=np5GMH8XU//8f/papJSCwjEA+QLB34T7dYwbFG1VMoHFTaWMaqDPGBozKcvvsE+rHH ZCUFa8hP1+Mpb7s8q+4s9R61Vb6+N6BJFQLYTbL9sTyXkhAqNPMfCzG+EW70tB3uCK+D sLBXY7jOtUVdnjvzpy/KLt1KdbgZoeM44u2ouFjb8aFChVlIv8LBtM+H2KakXWdxQ2iR plCLvBL/OES5K6JxfErQje9iyMNTnj2IHA7PIZXo5eBil53YftFwSMheNQ5n0fftFdfE tEnEZ+JRXyNWTYkh7mUfdHD5uWOYyBEVMUSwCe7QOjsTvVK2A80kZ/XXck6FbAgFq4Aq FrYw== X-Gm-Message-State: AJcUukeeNS406jTnrO+6vMpjd2hco1rOLvwu8d2lA5Zf3nJZlTVBr5Zg xdCyBf83BZl0cyEOomF7MUMsS4/APQE= X-Google-Smtp-Source: ALg8bN4OD5hFL1nFObiz0lc90uZjnuC4oxxo6UG5JlyqiVhXTwYZbvgd6Hr55xU5PHSWC924mNwpRg== X-Received: by 2002:adf:c108:: with SMTP id r8mr50971822wre.233.1549281270956; Mon, 04 Feb 2019 03:54:30 -0800 (PST) Received: from [192.168.1.33] (110.red-83-51-161.dynamicip.rima-tde.net. [83.51.161.110]) by smtp.gmail.com with ESMTPSA id w16sm23725853wrp.1.2019.02.04.03.54.30 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 03:54:30 -0800 (PST) To: Liming Gao , Bob Feng References: <20190204095805.goisffon477z5i3b@bivouac.eciton.net> Cc: Leif Lindholm , edk2-devel@lists.01.org From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <93ed2166-35be-9529-314d-234b1a95c93e@redhat.com> Date: Mon, 4 Feb 2019 12:54:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190204095805.goisffon477z5i3b@bivouac.eciton.net> Subject: Re: BaseTools: build failure when specifying multiple BUILDTARGET X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 11:54:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 2/4/19 10:58 AM, Leif Lindholm wrote: > Hi Bob, Liming, > > With the latest BaseTools (current HEAD, 6c61ec4c62), building > multiple targets from a single command line crashes. > > To reproduce: > build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc > (I first built with -n32, but dropped that to see if it would make a > difference - it does not.) > > The first target specified builds successfully. When starting on the > second, the output is as below, and build exits. > > / > Leif > > Architecture(s) = IA32 > Build target = NOOPT > Toolchain = GCC5 > > Active Platform = /work/git/edk2/OvmfPkg/OvmfPkgIa32.dsc > Flash Image Definition = /work/git/edk2/OvmfPkg/OvmfPkgIa32.fdf > > Processing meta-data ... > > > build.py... > : error C0DE: Unknown fatal error when processing [/work/git/edk2/OvmfPkg/OvmfPkgIa32.dsc] > > (Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace!) > > (Python 3.5.3 on linux) Traceback (most recent call last): > File "/work/git/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2387, in Main > MyBuild.Launch() > File "/work/git/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2141, in Launch > self._MultiThreadBuildPlatform() > File "/work/git/edk2/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1921, in _MultiThreadBuildPlatform > self.Progress > File "/work/git/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__ > self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs) > File "/work/git/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in _InitWorker > for BuildData in PGen.BuildDatabase._CACHE_.values(): > RuntimeError: dictionary changed size during iteration I believe the culprit is f8d11e5a4aaa. Sadly the tree isn't bisectable around that commit: HEAD is now at fd2d74007b BaseTools:Update build tool to print python version information $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc build.py... : error C0DE: Unknown fatal error when processing [] (Python 2.7.15 on linux2) Traceback (most recent call last): File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2385, in Main MyBuild = Build(Target, Workspace, Option) File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 799, in __init__ EdkLogger.quiet("%-16s = %s" % ("PYTHON", os.environ["PYTHON"])) File "/usr/lib64/python2.7/UserDict.py", line 40, in __getitem__ raise KeyError(key) KeyError: 'PYTHON' HEAD is now at 4a3773e578 BaseTools:Fixed Rsa issue and a set define issue. $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc Traceback (most recent call last): File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 44, in from AutoGen.AutoGen import * File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 27, in from . import GenC File "BaseTools/Source/Python/AutoGen/GenC.py", line 26, in from .StrGather import * File "BaseTools/Source/Python/AutoGen/StrGather.py", line 21, in from .UniClassObject import * File "BaseTools/Source/Python/AutoGen/UniClassObject.py", line 430 UniStr = ('\u' + (Line[StartPos + 2 : EndPos])).decode('unicode_escape') ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \uXXXX escape HEAD is now at 7fa0e68afd BaseTools:ord() don't match in py2 and py3 $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc build.py... (Python 3.7.2 on linux) Traceback (most recent call last): File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2387, in Main MyBuild.Launch() File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2141, in Launch self._MultiThreadBuildPlatform() File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1921, in _MultiThreadBuildPlatform self.Progress File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__ self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 501, in _InitWorker if MGen in PGen.LibraryAutoGenList: File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 2092, in LibraryAutoGenList for La in Ma.LibraryAutoGenList: File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 4087, in LibraryAutoGenList for Lib in La.CodaTargetList: File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 3259, in CodaTargetList self.Targets File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 3245, in Targets self.SourceFileList File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 3074, in SourceFileList self._MatchBuildRuleOrder(RetVal) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 3082, in _MatchBuildRuleOrder self.BuildOption File "BaseTools/Source/Python/Common/caching.py", line 34, in __get__ Value = obj.__dict__[self._function.__name__] = self._function(obj) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 2987, in BuildOption RetVal, self.BuildRuleOrder = self.PlatformInfo.ApplyBuildOption(self.Module) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 2477, in ApplyBuildOption PlatformModuleOptions.keys() + ModuleTypeOptions.keys() + TypeError: unsupported operand type(s) for +: 'dict_keys' and 'dict_keys' I could narrow down to last good commit: 9c2d68c0a299, first commit reporting Leif symptoms: d943b0c339fe. Regards, Phil.