From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: liming.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Fri, 05 Jul 2019 00:25:21 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 00:25:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,454,1557212400"; d="scan'208,217";a="185123161" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 05 Jul 2019 00:25:21 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 5 Jul 2019 00:25:21 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 5 Jul 2019 00:25:20 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.109]) with mapi id 14.03.0439.000; Fri, 5 Jul 2019 15:25:19 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Chen, Farrah" CC: "Hao, Xudong" , "Wei, Danmei" Subject: Re: Make edk2 fail on Red Hat 8.0 Thread-Topic: Make edk2 fail on Red Hat 8.0 Thread-Index: AdUy/foPd3/thalCQDW9+wH/wOHzdwABMX9Q Date: Fri, 5 Jul 2019 07:25:18 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83@SHSMSX104.ccr.corp.intel.com> References: <1B925CC0CD9F3341B32D442251E7E1DC3E2E31ED@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <1B925CC0CD9F3341B32D442251E7E1DC3E2E31ED@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83SHSMSX104ccrcor_" --_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83SHSMSX104ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Can you let me know your GCC compiler version? From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Chen= , Farrah Sent: Friday, July 05, 2019 3:10 PM To: devel@edk2.groups.io Cc: Hao, Xudong ; Wei, Danmei Subject: [edk2-devel] Make edk2 fail on Red Hat 8.0 Hi, I tried to make ovmf with the latest commit: 0a487ef96bd6d2e0ac23323adab86= f9949068ed6 on Red Hat 8.0, it failed, while it succeed on Red Hat 7.6. With commit 4b04d9d73604080a42daf737c39b98d4e1245a51 I used several days a= go, it works well on both RHEL8.0 and RHEL7.6. Steps: git clone https://github.com/tianocore/edk2.git cd edk2 git submodule init git submodule update -recursive OvmfPkg/build.sh -a X64 -n 40 ............... make -C FMMT make[2]: Entering directory '/home/build/fan/edk2/BaseTools/Source/C/FMMT' gcc -c -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryS= tandard -I ../Common/ -I .. -I . -I ../Include/X64/ -MD -fshort-wchar -fno= -strict-aliasing -fwrapv -fno-delete-null-pointer-checks -Wall -Werror -Wno= -deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused= -result -nostdlib -g -O2 FmmtLib.c -o FmmtLib.o FmmtLib.c: In function 'LibInitializeFvStruct': FmmtLib.c:158:5: error: 'memset' used with length equal to number of eleme= nts without multiplication by element size [-Werror=3Dmemset-elt-size] memset (Fv->FfsAttuibutes[Index].UiName, '\0', _MAX_PATH); ^~~~~~ FmmtLib.c: In function 'LibFvHeaderAttributeToStr': FmmtLib.c:2521:47: error: argument to 'sizeof' in 'strncat' call is the sa= me expression as the source; did you mean to use the size of the destinatio= n? [-Werror=3Dsizeof-pointer-memaccess] strncat (LocalStr, "[attributes] \n", sizeof("[attributes] \n")); ^ FmmtLib.c:2524:66: error: argument to 'sizeof' in 'strncat' call is the sa= me expression as the source; did you mean to use the size of the destinatio= n? [-Werror=3Dsizeof-pointer-memaccess] strncat (LocalStr, "EFI_READ_DISABLED_CAP =3D TRUE \n", sizeof ("EFI_= READ_DISABLED_CAP =3D TRUE \n")); ..................... And detailed log attached. Could anyone provide some advice? Thanks, Fan --_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83SHSMSX104ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Can you let me know y= our GCC compiler version?

 

From: devel@edk2.groups.io [mailto:devel@edk= 2.groups.io] On Behalf Of Chen, Farrah
Sent: Friday, July 05, 2019 3:10 PM
To: devel@edk2.groups.io
Cc: Hao, Xudong <xudong.hao@intel.com>; Wei, Danmei <danme= i.wei@intel.com>
Subject: [edk2-devel] Make edk2 fail on Red Hat 8.0

 

Hi,

 

I tried to make ovmf with the latest commit: 0a487e= f96bd6d2e0ac23323adab86f9949068ed6 on Red Hat 8.0, it failed, while it succ= eed on Red Hat 7.6.

With commit 4b04d9d7360= 4080a42daf737c39b98d4e1245a51 I used several days ago, it works well on bot= h RHEL8.0 and RHEL7.6.

 

Steps:

git clone https://github.com/tianocore/edk2.git

cd edk2

git submodule init

git submodule update –recursive

OvmfPkg/build.sh -a X64 -n 40

……………

make -C FMMT

make[2]: Entering directory '/home/build/fan/edk2/B= aseTools/Source/C/FMMT'

gcc  -c  -I .. -I ../Include/Common -I ..= /Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Inc= lude/X64/  -MD -fshort-wchar -fno-strict-aliasing -fwrapv -fno-delete-= null-pointer-checks -Wall -Werror -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused-result -nostdlib -g -O= 2  FmmtLib.c -o FmmtLib.o

FmmtLib.c: In function ‘LibInitializeFvStruct= ’:

FmmtLib.c:158:5: error: ‘memset’ used w= ith length equal to number of elements without multiplication by element si= ze [-Werror=3Dmemset-elt-size]

     memset (Fv->FfsAttuibut= es[Index].UiName, '\0', _MAX_PATH);

     ^~~~~~

FmmtLib.c: In function ‘LibFvHeaderAttributeT= oStr’:

FmmtLib.c:2521:47: error: argument to ‘sizeof= ’ in ‘strncat’ call is the same expression as the source;= did you mean to use the size of the destination? [-Werror=3Dsizeof-pointer= -memaccess]

  strncat (LocalStr, "[attributes] \= n", sizeof("[attributes] \n"));

        &nb= sp;            =             &nb= sp;            = ^

FmmtLib.c:2524:66: error: argument to ‘sizeof= ’ in ‘strncat’ call is the same expression as the source;= did you mean to use the size of the destination? [-Werror=3Dsizeof-pointer= -memaccess]

     strncat (LocalStr, "E= FI_READ_DISABLED_CAP =3D TRUE \n", sizeof ("EFI_READ_DISABLED_CAP= =3D TRUE \n"));

…………………

 

And detailed log attached.

Could anyone provide some advice?

 

 

Thanks,

Fan

 

--_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83SHSMSX104ccrcor_--