From: "Bob Feng" <bob.c.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
Andrew Fish <afish@apple.com>
Cc: "Pham, Tony Q" <tony.q.pham@intel.com>
Subject: Re: [edk2-devel] EDK2
Date: Fri, 5 Feb 2021 05:40:04 +0000 [thread overview]
Message-ID: <DM6PR11MB4073B26EF3D7C2B0CD6D8178C9B29@DM6PR11MB4073.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SA2PR11MB4938B25D02818DF1F9F79BF4D2B29@SA2PR11MB4938.namprd11.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 4675 bytes --]
Tony,
This build failure should be caused by one of your c or header files have non-ascii characters.
You may need to change the basetools’ code to see which file has non-ascii characters
Change C:\edk2\BaseTools\Source\Python\AutoGen\StrGather.py, Line 536
except:
EdkLogger.error("UnicodeStringGather", AUTOGEN_ERROR, "SearchString: Error while processing file", File=File, RaiseError=False)
raise
to
except:
EdkLogger.error("UnicodeStringGather", AUTOGEN_ERROR, "SearchString: Error while processing file", File=File, RaiseError=True)
Thanks,
Bob
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D Kinney
Sent: Friday, February 5, 2021 11:30 AM
To: Andrew Fish <afish@apple.com>; edk2-devel-groups-io <devel@edk2.groups.io>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Pham, Tony Q <tony.q.pham@intel.com>
Subject: Re: [edk2-devel] EDK2
Hi Andrew,
If the character is part of the code (not a comment), the ignoring the codec error could silently produce the incorrect FW behavior.
I prefer a failure with a correct identification of the file/line # so the file can be fixed.
The EDK II CI checks will not allow files in with these types of issues.
Mike
From: Andrew Fish <afish@apple.com<mailto:afish@apple.com>>
Sent: Thursday, February 4, 2021 4:11 PM
To: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Cc: Pham, Tony Q <tony.q.pham@intel.com<mailto:tony.q.pham@intel.com>>
Subject: Re: [edk2-devel] EDK2
On Feb 4, 2021, at 3:58 PM, Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> wrote:
Hi Tony,
I suspect that one of your UNI files being processed by StrGather has an invalid Unicode character in it. Can you review the UNI files in the module that is being build when this error is generated?
I would be better if this code identified the file/line number with the issue, so that would be a good Bugzilla to enter.
Mike,
I hit something like this too writing some Python. I think I ended up telling the codec to ignore errors, so that might be another option? This I think the issue I saw was in C code.
Thanks,
Andrew Fish
Mike
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Pham, Tony Q
Sent: Thursday, February 4, 2021 1:39 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [edk2-devel] EDK2
Hi,
I have a problem with build.py
(Python 3.9.1 on win32) Traceback (most recent call last):
File "C:\edk2\BaseTools\Source\Python\build\build.py", line 2635, in Main
MyBuild.Launch()
File "C:\edk2\BaseTools\Source\Python\build\build.py", line 2433, in Launch
self._BuildModule()
File "C:\edk2\BaseTools\Source\Python\build\build.py", line 1895, in _BuildModule
Ma.CreateCodeFile(True)
File "C:\edk2\BaseTools\Source\Python\AutoGen\ModuleAutoGen.py", line 1832, in CreateCodeFile
for File in self.AutoGenFileList:
File "C:\edk2\BaseTools\Source\Python\Common\caching.py", line 28, in __get__
Value = obj.__dict__[self._function.__name__] = self._function(obj)
File "C:\edk2\BaseTools\Source\Python\AutoGen\ModuleAutoGen.py", line 983, in AutoGenFileList
GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, AutoGenUniIdf, UniStringBinBuffer, StringIdf, AutoGenUniIdf, IdfGenBinBuffer)
File "C:\edk2\BaseTools\Source\Python\AutoGen\GenC.py", line 2044, in CreateCode
CreateUnicodeStringCode(Info, AutoGenC, StringH, UniGenCFlag, UniGenBinBuffer)
File "C:\edk2\BaseTools\Source\Python\AutoGen\GenC.py", line 1706, in CreateUnicodeStringCode
Header, Code = GetStringFiles(Info.UnicodeFileList, SrcList, IncList, Info.IncludePathList, ['.uni', '.inf'], Info.Name, CompatibleMode, ShellMode, UniGenCFlag, UniGenBinBuffer, FilterInfo)
File "C:\edk2\BaseTools\Source\Python\AutoGen\StrGather.py", line 563, in GetStringFiles
Uni = SearchString(Uni, sorted (FileList), IsCompatibleMode)
File "C:\edk2\BaseTools\Source\Python\AutoGen\StrGather.py", line 532, in SearchString
for Line in Lines:
File "C:\Users\tqpham\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5457: character maps to <undefined>
- Failed -
Build end time: 13:36:22, Feb.04 2021
Build total time: 00:00:02
[-- Attachment #2: Type: text/html, Size: 15001 bytes --]
next prev parent reply other threads:[~2021-02-05 5:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 21:39 EDK2 Pham, Tony Q
2021-02-04 23:58 ` [edk2-devel] EDK2 Michael D Kinney
2021-02-05 0:10 ` Andrew Fish
2021-02-05 3:30 ` Michael D Kinney
2021-02-05 5:40 ` Bob Feng [this message]
2021-02-05 15:11 ` Kirkendall, Garrett
2021-02-05 17:02 ` Michael D Kinney
2021-02-05 22:14 ` Kirkendall, Garrett
2021-02-05 23:35 ` Andrew Fish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR11MB4073B26EF3D7C2B0CD6D8178C9B29@DM6PR11MB4073.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox