From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400c:c08::22e; helo=mail-ua0-x22e.google.com; envelope-from=adurbin@google.com; receiver=edk2-devel@lists.01.org Received: from mail-ua0-x22e.google.com (mail-ua0-x22e.google.com [IPv6:2607:f8b0:400c:c08::22e]) (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 224C721C913C9 for ; Mon, 13 Nov 2017 09:33:26 -0800 (PST) Received: by mail-ua0-x22e.google.com with SMTP id q18so10938169uaa.0 for ; Mon, 13 Nov 2017 09:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lkCjaue+yFrjaCUG3i0rvS/BSriK8bSzKdPkPHkKb0A=; b=inUJgpNPRsNqrJGyOXTDUlOjPGs7VPzI8RotnCAsxDgTGYYxcbsFLW5I9HAJwVzFD/ 5docOzCbvzqxt5xalXESSMUAjwpw6uiJnujtdt1Xm41vXtdnxohAgao9wtPe2NKUyk7/ EDGkiDvJXCacMRbgoFDecUTvofU07dCOzWEWq1ENfa4J5nljBOK8FvZsaHD1kyEqcdDX oICBKFaaz7EroK21HkVe5S5cxIbWreYFIDnp1Wqiod06Srg6V1VFXz5XqV1hXF1tuahR cUofU0rFxJs1NsbaMtbdDz9X+CGsEZ3AEWSU92NCa+SXAVOkapTkBV9bLUDND79mzr+4 JjzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lkCjaue+yFrjaCUG3i0rvS/BSriK8bSzKdPkPHkKb0A=; b=MzyLTHJd9osdMhNB/pZ77FciOV+YPnj4cgILQ62RhWI4FxjQEt7G0CPq/A1tr/CQzh bEqYIIa9IjdsGQrYMv6xo2qXL8zWRnjYURHAzKGy1AuYXC2VCnqYG5FQ9Ys5/jHsau7e RvUgcP6baNWDJeK7Z5mu7yvhbCAeRfx0TnSKckagu7ln4dynuDcchgQVZ2mvaaIIyms1 dVR45g2s0w9CcoTIZEJPLKZMSLYLlMyMhPT1HF1jEVp04pbAL3WnDAO3YQnJptCCOsMH Mtogoh9e2ztfoWArF2LV9VJohy+Wrc3meGvn8JeWJiL6pkq/kNDCUN1Cb2xcC1Dib4Jf N7eQ== X-Gm-Message-State: AJaThX6Wvv1Oi91GunmYG2vXd+xCdGiMf2n0HVmWhpUqGNIUD+dhf9vI dLNqe57jm4wFjPRbRv/i3QZIte4scaeyA7reinUeUg== X-Google-Smtp-Source: AGs4zMb9CP6VrcxfBR11HJWTK2lQYWknS1dfDEcpm+NxEUr088c5lZuu5sySjrKY8J6pSJYqmwz9KcThlNj+3xx3v7E= X-Received: by 10.176.74.196 with SMTP id t4mr4340504uae.83.1510594652194; Mon, 13 Nov 2017 09:37:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.158.87 with HTTP; Mon, 13 Nov 2017 09:37:31 -0800 (PST) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17CC73@SHSMSX104.ccr.corp.intel.com> References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E17CC73@SHSMSX104.ccr.corp.intel.com> From: Aaron Durbin Date: Mon, 13 Nov 2017 10:37:31 -0700 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" Subject: Re: EDK2 build issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 17:33:27 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2017 at 7:15 PM, Gao, Liming wrote: > Yes. BaseTools needs some environments. Before build BaseTools, we need t= o call edkset.sh to setup them. > > 1. BaseTools Soure tools are compiled in serial instead of parallel. And,= VfrCompiler depends on Anltr tool. So, Anltr is required to be built first= . I agree that this way takes some time to compile BaseTools source. I have= one proposal to compile C source tools with multiple thread. I can share m= y draft patch. If the depedencies are correctly met in the makefiles then why are they built serially? It sounds like you understand the dependencies so why aren't those explicitly noted so one can build in parallel? > 2. BaseTools C source are compiled to the executable files. They run in h= ost machine. Here ARCH is for the executable files those can run in host ma= chine. edk2\BaseTools\Source\C\GNUmakefile auto detects ARCH based on 'unam= e -m' command. ARCH !=3D host is my point. Why are those being conflated? Or are you saying edk2 tools define ARCH to be what the host is? > 3. There are more GCC compiler distribution. We try to use the generic op= tions in GCC tool chain. If you find the option doesn't work on your GCC co= mpiler, please report it. And, we also notice tools_def.txt is too big to b= e hard to be maintain. We have one proposal to simplify it. I will send thi= s RFC to edk2 community. > >>-----Original Message----- >>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >>Aaron Durbin >>Sent: Saturday, November 11, 2017 6:27 AM >>To: edk2-devel@lists.01.org >>Subject: [edk2] EDK2 build issues >> >>Hello, >> >>Here are some observations I've encountered trying to utilize edk2 for >>certain builds. Part of the problem seems to be with implicit >>assumptions in how edk2 is used. I'm trying to build things using edk2 >>from a clean enviroment on an automated builder. i.e. there isn't a >>workspace that exists on one persons computer for the lifetime of >>development. >> >>1. BaseTools can't build in parallel. The tests are racey which result >>in test failures. Because of this one has to build these in serial >>instead of in parallel. >> >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>FAIL: testHelp (TianoCompress.Tests) >>---------------------------------------------------------------------- >>Traceback (most recent call last): >> File "/build/zoombini/tmp/portage/sys-boot/fsp-cnl-9999/work/fsp-cnl- >>9999/Edk2/BaseTools/Tests/TianoCompress.py", >>line 34, in testHelp >> self.assertTrue(result =3D=3D 0) >>AssertionError: False is not true >> >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>FAIL: testRandomDataCycles (TianoCompress.Tests) >>---------------------------------------------------------------------- >>Traceback (most recent call last): >> File "/build/zoombini/tmp/portage/sys-boot/fsp-cnl-9999/work/fsp-cnl- >>9999/Edk2/BaseTools/Tests/TianoCompress.py", >>line 65, in testRandomDataCycles >> self.compressionTestCycle(data) >> File "/build/zoombini/tmp/portage/sys-boot/fsp-cnl-9999/work/fsp-cnl- >>9999/Edk2/BaseTools/Tests/TianoCompress.py", >>line 44, in compressionTestCycle >> self.assertTrue(result =3D=3D 0) >>AssertionError: False is not true >> >>In addition, it seems compilation even breaks trying to build a parser: >> >>VfrSyntax.cpp:53:1: error: expected class-name before '{' token >> {^M >> ^ >>VfrSyntax.cpp: In constructor 'CVfrDLGLexer::CVfrDLGLexer(DLGFileInput*)'= : >>VfrSyntax.cpp:55:36: error: class 'CVfrDLGLexer' does not have any >>field named 'VfrLexer' >> CVfrDLGLexer (DLGFileInput *F) : VfrLexer (F) {};^M >> ^ >> >>This just slows down builds needing to things serially. >> >>2. It appears the BaseTools uses the ARCH environment variable. I'm >>not sure of the origins, but ARCH seems like a complete misnomer for >>the *host* you are trying to build tools on -- not the target. Trying >>to incorporate edk2 builds into a portage environment effectively >>breaks because of this as ARCH refers to target architecture -- not >>host builder's ARCH. >> >>3. This more of an observation, but the tools definition seems to make >>quite the leap on how consistent compilers are of a certain version. >>e.g. GCC 4.9 can be built with all kinds of default options that edk2 >>implicitly assumes are set based on some distribution's default flags? >>And in order to extend toolchain support one needs to create a series >>of entries associated with a certain family. Barrier to entry is >>pretty high in teasing out where to put things in the ~8000 line >>tools_def.template. >> >>Thanks for the consideration. >> >>-Aaron >>_______________________________________________ >>edk2-devel mailing list >>edk2-devel@lists.01.org >>https://lists.01.org/mailman/listinfo/edk2-devel