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.43, mailfrom: liming.gao@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Fri, 05 Jul 2019 00:53:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 00:53:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,454,1557212400"; d="scan'208,217";a="363534385" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 05 Jul 2019 00:53:30 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) 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:53:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 5 Jul 2019 00:53:30 -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:53:28 +0800 From: "Liming Gao" To: "Chen, Farrah" , "devel@edk2.groups.io" 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/wOHzdwABMX9QAABJBoAAALMt4A== Date: Fri, 5 Jul 2019 07:53:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2CDB@SHSMSX104.ccr.corp.intel.com> References: <1B925CC0CD9F3341B32D442251E7E1DC3E2E31ED@SHSMSX104.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2C83@SHSMSX104.ccr.corp.intel.com> <1B925CC0CD9F3341B32D442251E7E1DC3E2E323B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <1B925CC0CD9F3341B32D442251E7E1DC3E2E323B@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_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2CDBSHSMSX104ccrcor_" --_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2CDBSHSMSX104ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I just send the patch to fix this issue. Can you help verify it? From: Chen, Farrah Sent: Friday, July 05, 2019 3:35 PM To: Gao, Liming ; devel@edk2.groups.io Cc: Hao, Xudong ; Wei, Danmei Subject: RE: Make edk2 fail on Red Hat 8.0 I am using the default GCC of RHEL8.0: [root@localhost edk2]$ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=3Dc,c+= +,fortran,lto --prefix=3D/usr --mandir=3D/usr/share/man --infodir=3D/usr/sh= are/info --with-bugurl=3Dhttp://bugzilla.redhat.com/bugzilla --enable-share= d --enable-threads=3Dposix --enable-checking=3Drelease --enable-multilib --= with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --ena= ble-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-onl= y --with-linker-hash-style=3Dgnu --enable-plugin --enable-initfini-array --= with-isl --disable-libmpx --enable-offload-targets=3Dnvptx-none --without-c= uda-driver --enable-gnu-indirect-function --enable-cet --with-tune=3Dgeneri= c --with-arch_32=3Dx86-64 --build=3Dx86_64-redhat-linux Thread model: posix gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC) Thanks, Fan From: Gao, Liming Sent: Friday, July 5, 2019 3:25 PM To: devel@edk2.groups.io; Chen, Farrah > Cc: Hao, Xudong >; Wei, = Danmei > Subject: RE: Make edk2 fail on Red Hat 8.0 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_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2CDBSHSMSX104ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I just send the patch= to fix this issue. Can you help verify it?

 

From: Chen, Farrah
Sent: Friday, July 05, 2019 3:35 PM
To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io<= br> Cc: Hao, Xudong <xudong.hao@intel.com>; Wei, Danmei <danme= i.wei@intel.com>
Subject: RE: Make edk2 fail on Red Hat 8.0

 

I am using the defaul= t GCC of RHEL8.0:

 

[root@localhost edk2]= $ gcc -v

Using built-in specs.=

COLLECT_GCC=3Dgcc

COLLECT_LTO_WRAPPER= =3D/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper

OFFLOAD_TARGET_NAMES= =3Dnvptx-none

OFFLOAD_TARGET_DEFAUL= T=3D1

Target: x86_64-redhat= -linux

Configured with: ../c= onfigure --enable-bootstrap --enable-languages=3Dc,c++,fortran,lto = --prefix=3D/usr --mandir=3D/usr/share/man --infodir=3D/usr/share/info --wit= h-bugurl=3Dhttp://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=3Dposix --enable-checking=3Drelease --enable-multilib --= with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --ena= ble-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-onl= y --with-linker-hash-style=3Dgnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targ= ets=3Dnvptx-none --without-cuda-driver --enable-gnu-indirect-function --ena= ble-cet --with-tune=3Dgeneric --with-arch_32=3Dx86-64 --build=3Dx86_64-redh= at-linux

Thread model: posix

gcc version 8.2.1 201= 80905 (Red Hat 8.2.1-3) (GCC)

 

 

Thanks,

Fan

 

 

 

From: Ga= o, Liming
Sent: Friday, July 5, 2019 3:25 PM
To: devel@edk2.groups.io; Chen, Farrah <farrah.chen@in= tel.com>
Cc: Hao, Xudong <xudong.= hao@intel.com>; Wei, Danmei <danmei.wei@intel.com>
Subject: RE: Make edk2 fail on Red Hat 8.0

 

Can you let me know y= our 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 <
xudong.= hao@intel.com>; Wei, Danmei <danmei.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_4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2CDBSHSMSX104ccrcor_--