From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80070.outbound.protection.outlook.com [40.107.8.70]) by dpdk.org (Postfix) with ESMTP id B82611DFAD for ; Tue, 12 Jun 2018 03:27:36 +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=IIyTMqewpNnc86Tb00BLcsYX0+B+JyUeIUZ1ETN2SHU=; b=BuldlpuxfiKxFRgXCH6AJuZRLJmvArWddARURdBkGtJT/peyjSBfY3C+h51SEQsCp0f7A1BRPLT12LdDf+fG61lkGRrMME9/oqf3kCXs3VmC6vrOtHZ2PwdfYX6C+k8RPtzBV3pnME6xnfiI47iC0lTTHStLMGHo3bTmLX6s92U= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB0623.eurprd08.prod.outlook.com (10.163.169.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Tue, 12 Jun 2018 01:27:34 +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 01:27:34 +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/v3qYU2eFDmL5XrIPaRIrE6AgAbzOyCAAHdKgIALww4g Date: Tue, 12 Jun 2018 01:27:34 +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: <20180604125037.GA25835@jerin> 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; VI1PR08MB0623; 7:Qx18sjbHImTqs49vkk2j0QsjbU7spxc+vgBJRdHFcQzq0x1ZUWKmvZqy3gWfL9nMdeLE+xl3qmQb9SssYyv+mY42AbzK/Wp4S98OB1OL/lHrLaxhfgIMepA1Ohvu2cjng8l2p/ybaqhxaVZKAoCG8F3JUEPg8szXXMeFLer33UUcSToVQWhj9mUBXwX0DYbQSOB8yBEHZ/XkPAz4aC5acHqWC1gyLOyAYpQaBrBBVPb+TPvN973IBL+ZzrQkcUmd 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:VI1PR08MB0623; x-ms-traffictypediagnostic: VI1PR08MB0623: 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)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR08MB0623; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB0623; x-forefront-prvs: 07013D7479 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39860400002)(39380400002)(346002)(189003)(13464003)(199004)(14454004)(53376002)(25786009)(53936002)(478600001)(9686003)(486006)(476003)(19273905006)(229853002)(54906003)(6306002)(6246003)(86362001)(2906002)(97736004)(3846002)(3660700001)(6116002)(93886005)(55016002)(8676002)(6436002)(2900100001)(316002)(3280700002)(966005)(8936002)(55236004)(33656002)(59450400001)(6506007)(53546011)(5660300001)(66066001)(102836004)(7696005)(74316002)(76176011)(106356001)(6916009)(4326008)(99286004)(81166006)(105586002)(5250100002)(446003)(11346002)(305945005)(26005)(7736002)(186003)(72206003)(81156014)(68736007)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB0623; 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: 2xIrv7BLOOsCthuRxXiLFuBWxtIJqMVOvbo+MjUuGt5qvx6QYFLs1pItgi7PQwvcnsulzQgkzA8EgxW8VWhPfTC213xrB5XoSCnJlQ65sjoK0w9/yd3/9XVDYXVQkrkb4LtcQAb9xUb2yA01KnGhX8ajvssVbTjEIaHfDMypmOP/AD3oPpBNbh5xs67Ty4xt 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: 05b6e6b7-3f94-4a21-f1de-08d5d003acbe X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05b6e6b7-3f94-4a21-f1de-08d5d003acbe X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2018 01:27:34.1655 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0623 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 01:27:36 -0000 > -----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 >=20 > -----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 n= ew > 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 w= ere > 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! >=20 >=20 > If I am not wrong, This is specific to host compiler issue with specific = version. > Right? The build steps will remain same, so as far as this patch concerne= d, > you can add the meson build step in this patch. >=20 [Gavin Hu] Hi Jerin,=20 Sorry for late response, but I am still keeping working on that(some more p= atches are in process of internal review). The host compiler issue with specific version was fixed by one of my patch.= =20 With all my patches applied: For GNU Makefile,=20 1. Host clang + cross gcc works 2. Host gcc + cross gcc works For Meson/Ninja: 3. Host gcc + cross gcc works 4. Host clang + cross gcc does NOT work The root cause of number 4 is clear, it is a meson build project issue.=20 Both gcc and clang take all the 4 project arguments, but can NOT recognize = 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=20 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/commo= n/include/arch/arm -I../lib/librte_eal/common/include/arch/arm -Ilib/librte= _eal/common/include -I../lib/librte_eal/common/include -Ilib/librte_eal/com= mon -I../lib/librte_eal/common -Ilib/librte_eal/linuxapp/eal/../../../librt= e_compat -I../lib/librte_eal/linuxapp/eal/../../../librte_compat -I../lib/l= ibrte_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 r= te_config.h -Wsign-compare -Wcast-qual -Wno-address-of-packed-member -Wno-f= ormat-truncation -MD -MQ 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c= .o' -MF 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o.d' -o 'buildto= ols/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o' -c ../buildtools/pmdinfogen/p= mdinfogen.c error: unknown warning option '-Wno-format-truncation' [-Werror,-Wunknown-w= arning-option] [265/1011] Compiling C object 'lib/rte_pipeline@sta/librte_pipeline_rte_tab= le_action.c.o'. Best Regards, Gavin > > > > [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 > > > >