Re: 回复: [edk2-discuss] compile error



Our project has several components, EDK2 is one of them. This project has a top makefile, and this top makefile will call sub makefile to build every component.
In the top makefile, it uses make -j4 to build every component include EDK2. So even if we add "option -n 1" to EDK2 build command, it doesn't work.
But if changing -j4 to -j1 in the top makefile, the error will not occur again.

And there's a warning when using make -j4.
Copying $EDK_TOOLS_PATH/Conf/target.template
to /home/phisik3/bios_tt/bios/output/edk2/BaseTools/Conf/target.txt
make[7]:warning: jobserver unvaliable: using -j1. Add '+' to parent make rule.
make[7]:Entering directory '/home/phisik3/bios_tt/bios'


On 2021/5/14 10:40, gaoliming wrote:

Build command has option -n. Can you try build -n 1 to disable multiple thread?

-n THREADNUMBER Build the platform using multi-threaded compiler. The
value overrides target.txt's
MAX_CONCURRENT_THREAD_NUMBER. When value is set to 0,
tool automatically detect number of processor threads,
set value to 1 means disable multi-thread build, and
set value to more than 1 means user specify the

发件人: <> 代表 wenyi,xie
发送时间: 2021年5月13日 20:05
收件人: Feng, Bob C <bob.c.feng@...>;;
Andrew (EFI) Fish <afish@...>
主题: Re: [edk2-discuss] compile error

The environment is a docker, itself has no kernel, it depends on the kernel of
host machine.

On 2021/5/13 19:29, Feng, Bob C wrote:
Could you try the python3?


-----Original Message-----
From: <> On Behalf Of
wenyi,xie via
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@...>;
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit
log and find this error relate to the feature "BaseTools Enable multiple-thread
Maybe this environment doesn't support multi thread well, the root cause is
still unknown.
May I ask whether there's a way to disable this feature, or any other
workaround for this problem.


On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via
<xiewenyi2@...> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a
compile error, the error message like below. we roll back the EDK2 version
and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
[AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/", line 801, in __bootstrap_inner
edk2/BaseTools/Source/Python/AutoGen/", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.



Join to automatically receive all group messages.