From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80085.outbound.protection.outlook.com [40.107.8.85]) by dpdk.org (Postfix) with ESMTP id ACA0E1EA8E for ; Tue, 12 Jun 2018 14:06:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aNTmNOZ11151/txRpSUWr6p5mKV6bYjtIcP0zd3onx8=; b=RFwPVN00UOeJqaLagvqgMrAUnTC4eVFvORz7E0wF4LiEQ0BeO0swQcU23oeQFTnlNh4FkKHvwYFQbKPUbGe56Ao3ixcL/FjDZ86OZu/8+rFLJHiXh5vnOtO1pPtMdhbtMJSh8UQlaXtWu+ZyzHNTv4K+/VPQCkwof6CVHuEEM20= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB2782.eurprd08.prod.outlook.com (10.170.236.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.13; Tue, 12 Jun 2018 12:06:15 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::bccc:7b61:9039:89a0]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::bccc:7b61:9039:89a0%4]) with mapi id 15.20.0841.019; Tue, 12 Jun 2018 12:06:15 +0000 From: Gavin Hu To: Jerin Jacob CC: Bruce Richardson , Thomas Monjalon , "dev@dpdk.org" , nd Thread-Topic: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for cross compiling from x86 Thread-Index: AQHT9zntX/Wb/v3qYU2eFDmL5XrIPaRIrE6AgAbzOyCAAHdKgIALww4ggADA5GA= Date: Tue, 12 Jun 2018 12:06:15 +0000 Message-ID: References: <1527578508-27297-1-git-send-email-gavin.hu@arm.com> <1527590616-28299-1-git-send-email-gavin.hu@arm.com> <1527590616-28299-3-git-send-email-gavin.hu@arm.com> <20180530193534.GA1336@jerin> <20180604125037.GA25835@jerin> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB2782; 7:sPXOt89DGNeMWUjmZpX6wjHF1Hh07xROLEgBEwS7IbJpAbf6BGwnNNb28fU5Y3lPASnCR+Y5Jq9oKa43T6P2By4YhzpkJ/uq++FY/U8ZR434v/XNBuNmAtwo8Ta/DK3mkeIbvRW4DZ2f+hV7XOlRQOtL0/aXNU+K+l9pdtpX+UddYbvdIiNw1NIHWTn/V6x5bGu6TWbQ6/WU1hxFMzZZaSD99P2mSXSDt0SJDVk8lEwXPjB6233kJrKkFln/8LOp x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB2782; x-ms-traffictypediagnostic: VI1PR08MB2782: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:VI1PR08MB2782; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB2782; x-forefront-prvs: 07013D7479 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(13464003)(189003)(199004)(478600001)(72206003)(6506007)(99286004)(966005)(53546011)(8936002)(81166006)(81156014)(6306002)(5660300001)(476003)(19273905006)(33656002)(305945005)(74316002)(446003)(11346002)(316002)(3846002)(6116002)(76176011)(93886005)(8676002)(5250100002)(54906003)(7736002)(26005)(14454004)(186003)(55236004)(59450400001)(102836004)(25786009)(2900100001)(53376002)(6916009)(66066001)(4326008)(3280700002)(229853002)(7696005)(53936002)(6436002)(2940100002)(9686003)(55016002)(6246003)(97736004)(106356001)(3660700001)(86362001)(68736007)(486006)(105586002)(2906002)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2782; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 8xoxZINO5hXXi1rNsungXucu0Ylt4KRlU39dc3xeHh3HTNxOcUORLXy/qoeyNVVy58MhxR2GkWBZ4utCkX7GiiI7PMvO11ixxn0i8yzOi+70a/ZKqMT/hlgtEPfE1BGnblrlHzaE8fWRMCOK6MlsFaNODamHKAqKZsUeI7SkkA6xiAxHTTzFksOZ9zBRJhka spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: c6c16d4a-dddf-4f95-3e9c-08d5d05ce621 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6c16d4a-dddf-4f95-3e9c-08d5d05ce621 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2018 12:06:15.7689 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2782 Subject: Re: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for cross compiling from x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 12:06:17 -0000 Hi Jerin, Bruce and Thomas, To fix the meson cross build issue(host clang + cross gcc), we have to deco= uple clang options from gcc ones. Currently the options for gcc and clang tightly coupled as they share a sin= gle meson project and both added to the project arguments, this is the root= cause. I have a patch to remove the specific options from the project arguments an= d add it individually to C_FLAGS. It basically work, but it changed a lot o= f meson.build files. Any comments are welcome. Best Regards, Gavin > -----Original Message----- > From: Gavin Hu > Sent: Tuesday, June 12, 2018 9:28 AM > To: 'Jerin Jacob' > Cc: Bruce Richardson ; Thomas Monjalon > ; dev@dpdk.org; nd > Subject: RE: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for cross > compiling from x86 >=20 >=20 >=20 > > -----Original Message----- > > From: Jerin Jacob > > Sent: Monday, June 4, 2018 8:51 PM > > To: Gavin Hu > > Cc: Bruce Richardson ; Thomas Monjalon > > ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for cross > > compiling from x86 > > > > -----Original Message----- > > > Date: Mon, 4 Jun 2018 06:03:34 +0000 > > > From: Gavin Hu > > > To: Jerin Jacob , Bruce Richardson > > > , Thomas Monjalon > > > > CC: "dev@dpdk.org" > > > Subject: RE: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for > > > cross compiling from x86 > > > > > > See my inline comments: > > > > > > > -----Original Message----- > > > > From: Jerin Jacob > > > > Sent: Thursday, May 31, 2018 3:36 AM > > > > To: Gavin Hu > > > > Cc: dev@dpdk.org > > > > Subject: Re: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for > > > > cross compiling from x86 > > > > > > > > -----Original Message----- > > > > > Date: Tue, 29 May 2018 18:43:36 +0800 > > > > > From: Gavin Hu > > > > > To: dev@dpdk.org > > > > > CC: gavin.hu@arm.com > > > > > Subject: [dpdk-dev] [PATCH v5 2/2] doc: add a guide doc for > > > > > cross compiling from x86 > > > > > X-Mailer: git-send-email 2.1.4 > > > > > > > > > > + 1. EXTRA_CFLAGS and EXTRA_LDFLAGS should be added to include > > > > > + the > > > > NUMA headers and link the library respectively, > > > > > + if the step > > > > > + :ref:`argment_the_cross_toolcain_with_numa_support` was > > > > skipped therefore the toolchain was not > > > > > + argmented with NUMA support. > > > > > + > > > > > + 2. RTE_DEVEL_BUILD has to be disabled, otherwise the numa.h > > > > > + file gets > > > > > > > > If the warnings are from numa.h then please use -isystem > > > install dir> instead of disabling RTE_DEVEL_BUILD. > > > > > > > [Gavin Hu] This is a good advice, I verified it okay and can upload > > > a new > > patch. > > > > > > > > + a lot of compiling errors of Werror=3Dcast-qual, > > > > > + Werror=3Dstrict-prototypes > > > > and Werror=3Dold-style-definition. > > > > > + An example is given below: > > > > > + > > > > > + .. code-block:: console > > > > > + > > > > > + make -j CROSS=3Daarch64-linux-gnu- CONFIG_RTE_KNI_KMOD=3Dn > > > > CONFIG_RTE_EAL_IGB_UIO=3Dn > > > > > + RTE_DEVEL_BUILD=3Dn EXTRA_CFLAGS=3D"- > > I/include" > > > > EXTRA_LDFLAGS=3D > > > > > + "-L/lib -lnuma" > > > > > + > > > > > > > > As discussed earlier, meson cross build instruction is missing. > > > > > > > [Gavin Hu] I reproduced the meson build issue Bruce reported, as > > > shown > > below. > > > It was not introduced by gcc, nor clang, it was actually introduced > > > by meson.build, see line #65 of > > > http://www.dpdk.org/browse/dpdk/tree/config/meson.build > > > Even worse, "has_argument" is not reliable(refer here: > > http://mesonbuild.com/Compiler-properties.html#has-argument) for > some > > compilers. > > > This is the case of gcc and clang, which caused the 4 warning > > > options were > > included in the whole project, either the compiler is gcc or clang, > > cross or native. > > > This finally caused the unrecognized warning options. > > > > > > I tried to disable the warning options, then the compiling got lots > > > of noisy > > warnings and errors. > > > > > > To fix this issue, we need to create a meson subproject for > > > pmdinfogen, > > the change is not little and I am not familiar with this. > > > > > > Any comments are welcome! > > > > > > If I am not wrong, This is specific to host compiler issue with specifi= c > version. > > Right? The build steps will remain same, so as far as this patch > > concerned, you can add the meson build step in this patch. > > > [Gavin Hu] Hi Jerin, > Sorry for late response, but I am still keeping working on that(some more > patches are in process of internal review). > The host compiler issue with specific version was fixed by one of my patc= h. >=20 > With all my patches applied: > For GNU Makefile, > 1. Host clang + cross gcc works > 2. Host gcc + cross gcc works >=20 > For Meson/Ninja: > 3. Host gcc + cross gcc works > 4. Host clang + cross gcc does NOT work >=20 > The root cause of number 4 is clear, it is a meson build project issue. > Both gcc and clang take all the 4 project arguments, but can NOT recogniz= e > this one: warning option '-Wno-format-truncation' > For more details , please have a look at line #56~#67 of this file: > http://www.dpdk.org/browse/dpdk/tree/config/meson.build > http://mesonbuild.com/Compiler-properties.html#has-argument >=20 > The compiling error: > clang -Ibuildtools/pmdinfogen/pmdinfogen@exe -Ibuildtools/pmdinfogen - > I../buildtools/pmdinfogen -Iconfig -I../config -I. -I../ - > Ilib/librte_eal/common/include/arch/arm - > I../lib/librte_eal/common/include/arch/arm -Ilib/librte_eal/common/includ= e > -I../lib/librte_eal/common/include -Ilib/librte_eal/common - > I../lib/librte_eal/common -Ilib/librte_eal/linuxapp/eal/../../../librte_c= ompat - > I../lib/librte_eal/linuxapp/eal/../../../librte_compat - > I../lib/librte_eal/linuxapp/eal/include - > Ibuildtools/pmdinfogen/../../lib/librte_pci - > I../buildtools/pmdinfogen/../../lib/librte_pci -Xclang -fcolor-diagnostic= s -pipe > -D_FILE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Werror -O3 -include > rte_config.h -Wsign-compare -Wcast-qual -Wno-address-of-packed-member > -Wno-format-truncation -MD -MQ > 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o' -MF > 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o.d' -o > 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o' - > c ../buildtools/pmdinfogen/pmdinfogen.c > error: unknown warning option '-Wno-format-truncation' [-Werror,- > Wunknown-warning-option] > [265/1011] Compiling C object > 'lib/rte_pipeline@sta/librte_pipeline_rte_table_action.c.o'. >=20 > Best Regards, > Gavin >=20 >=20 >=20 >=20 >=20 > > > > > > [265/893] Compiling C object > > 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'. > > > warning: unknown warning option '-Wno-format-truncation' > > > [-Wunknown-warning-option] > > > 1 warning generated. > > > > > > > > > > > > diff --git a/doc/guides/linux_gsg/index.rst > > > > > b/doc/guides/linux_gsg/index.rst index 2a7bdfe..077f930 100644 > > > > > --- a/doc/guides/linux_gsg/index.rst > > > > > +++ b/doc/guides/linux_gsg/index.rst > > > > > @@ -13,6 +13,7 @@ Getting Started Guide for Linux > > > > > intro > > > > > sys_reqs > > > > > build_dpdk > > > > > + cross_build_dpdk_for_arm64 > > > > > linux_drivers > > > > > build_sample_apps > > > > > enable_func > > > > > -- > > > > > 2.1.4 > > > > >