From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0695CA0548; Tue, 20 Apr 2021 13:01:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8155441756; Tue, 20 Apr 2021 13:01:21 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2083.outbound.protection.outlook.com [40.107.92.83]) by mails.dpdk.org (Postfix) with ESMTP id 21C9341357; Tue, 20 Apr 2021 13:01:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WW1WlT2TLct3c3YuWc3uQ3VQ37HZjNO0EXDZDucatzJGdpks0jAczUzz3Tn0/pezEiuy1cwlomAsr9xhvvNfnny2XC7B96OdUWZaoBDaXGPS/TCFFLeeWN73vC5vcADiRiLEbd6x/oArCLtaOgDLaLupCiQBzx54r5UpjyuoAV7g+4+uWVtkD+O44sdxMt6hluxxrkfNj9civX0YzQm6jvu3zoi7U4uw2WlDq/YfoBKQyikSmtOt4wFCjLS2K5sBsg5Vgt0k5e2phK8QK1F1utHDVzqMBDQzQDphe2EIJHEfPXkCVWg8tGHDMenLPpZZdMDD/Mw4JlUgp5P85yribw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I53rKSdwgzMuHypBbEH3tYObO/v9av3uYtNJURSs4+Q=; b=HpofgonQqlXTy5OF2L+aZkWB7HosTccW+KnxLLo7n67LWGxfo2uzeAZDQMk+aS2zBQ83xgfF2syfUYy/rQ14fL7/WI7UfuuXEeGi4xTnEU33ARtF4/UafO1mZj5qnJ83K/zDKDJWd6lNrwwVshxn1e5GOWFpy7alTLg42rcyuGOo/qfgVQkmz9t7j0gVAqN4d0a2O0R1bvmWtcARB0yrwV90FfsdorDE2o1lF+jd2tIBwJS9Qr3yOYROsjvmFr6R2BOyR+papcBAylNtskJBEnBzmegtBnr9/whGmmFN/raEiV2Bbq0ssv2DCDE5jqvNMoUw6Wd20QBYU8LNn4X7LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I53rKSdwgzMuHypBbEH3tYObO/v9av3uYtNJURSs4+Q=; b=sbV9u+LbfmLdoTqNiHjEWnujOfG96v9Y1uPJqrIaiRSEBEJXNUXODomH10WOrJLFOnSIRk32T3KVJTBQXyujb1cPdYB0pmpuy9OCjpf7cz8MNfwLTK3c5Lkyo05f5VNdRs3wLYMngmNqyvUk3/5DhSiHrudFu5JWooo7g7sxb/osmMMC0StWPRVKBYapLSJs5FvmgpNJzrRp1iLjNyAjvfb+/x9qe6dOURpWLm5YnRmFURdzLt5QDc1ffTCMq+3jdr/g5p6ibhHcRfC+lbEsLge2gA/Z8+NPUOQCQLemT4aHzqtOuxVYf3Yt2hkcqw21ZG5eYDUgD4qOLGzjOyJRYQ== Received: from DM6PR12MB3945.namprd12.prod.outlook.com (2603:10b6:5:1c2::27) by DM6PR12MB4986.namprd12.prod.outlook.com (2603:10b6:5:16f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.21; Tue, 20 Apr 2021 11:01:17 +0000 Received: from DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d]) by DM6PR12MB3945.namprd12.prod.outlook.com ([fe80::9d62:2f16:264b:285d%5]) with mapi id 15.20.4065.020; Tue, 20 Apr 2021 11:01:17 +0000 From: Tal Shnaiderman To: Dmitry Kozlyuk , Aaron Conole CC: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , "ci@dpdk.org" Thread-Topic: [dpdk-ci] [PATCH] eal/windows: fix build warnings in MinGW Thread-Index: AQHXNH6ZwWznH+guDkSl6v4FBquUUaq6mXjggAAe7wCAAKyvEIAAvW5AgAAEhICAABSoAYAACykAgAD2EoA= Date: Tue, 20 Apr 2021 11:01:17 +0000 Message-ID: References: <20210418170803.15684-1-talshn@nvidia.com> <3259972.HMeeyuY8TW@thomas> <20210419230936.04e2f95c@sovereign> In-Reply-To: <20210419230936.04e2f95c@sovereign> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f5ba9251-8431-435e-50f8-08d903eb9f6c x-ms-traffictypediagnostic: DM6PR12MB4986: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OiAwNRjhTwmszzUFPLW234bmQxhwtHDqivkAN5ig7i9S9lnSYMFfJwzhJPgbtkUM0nDmkTrWLZ4U0Bi6esZVAvrZN3SdLN72NQlXBauPZgHQeGr278YmQMBGtD4TdrsY5RKUFpYK569X9wBZqgriueVZcmbquHBDFWzKFwHQ8NURNtNIWBcMQpWIukaRx8roqXGRRGc+TgyFxga1PURNzpT/XeiYpR2J3KEKr5TEsdth2imFyUDuWxQqnTLRSr/bIa9aGKn1F98Yqfds83K89k4BLaG7IAjz9pxZwRvYldydSgegPw8Sbu0OofHZ0fWc6zqoU34KckYM0Eq8zNQRrgubYTtSCoZf+ybeO4X9fRY7/9xmLcc/PDbw8jLcJwVUhPgaq0+O3wx6ZCw0Jx0Yp7SmZMYTjT4HgdYiAI5AbTn8PyBPNyqi9m+TBWX/AqXKh40IOo2SnujpGfIR2Xmb/DQhbohPE3XCxeopxg4NhcnR20aSB6bUFK/ltsTYXO6KndFMhsdGc6Y37CsC9rVuaUOPcwGOYYtjdBrFW4/HmcRxJVUt9FVDNQjAGWa7Kf6SHWCxdVB7bC+2AMT6WMinhHv6eDCuluDcCD2rHOoMS+M= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB3945.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(396003)(39850400004)(366004)(346002)(7696005)(122000001)(55016002)(9686003)(110136005)(66446008)(66946007)(38100700002)(66556008)(64756008)(71200400001)(66476007)(86362001)(5660300002)(54906003)(478600001)(83380400001)(6506007)(8936002)(2906002)(316002)(76116006)(4326008)(26005)(33656002)(8676002)(52536014)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?lxjSPwLRmyJ4xYMv2UrD6S68cbyHoKSPKeZMyRMwEGO4/Xj/g1iFWidK2rpc?= =?us-ascii?Q?F/mMcTvuVyHq9BIM/e8sy6CaKXQ0fnQ3GgSJk3IKvQAxbyuaC2jdVPkoLm/o?= =?us-ascii?Q?6Xl9aV+33CH6J07GDt5dyLxBwBA8S3mQJYzlIxx6fIzYqrFTSm91qjttsHTM?= =?us-ascii?Q?HU9vUB9VGiba63ns4DnNFBe8kcn9eIhAaEww5C8v4b/d+ERh+mGp2mt0aJYt?= =?us-ascii?Q?7SGbAaanb70TaPjOidy0o1bsraHu+XvTn+AMf1cEuxJSFjXHYI4zNPjwxyBd?= =?us-ascii?Q?HGCQS18D20OX239jmP0r1zb5sTpQ12qr3qElsT65Y+cNx4R9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Hc4uoppHXsfnxZLt9PFG6y1GEm1KVPuO35xuIM?= =?us-ascii?Q?suyO/0eqGfm1mpa42OJWeF7T6cDMbYnTGmni2jr+SSCHVd6dvqso8ukeJ4hb?= =?us-ascii?Q?AvLGJHPiboCmNK9WArYILksk?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3945.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5ba9251-8431-435e-50f8-08d903eb9f6c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 11:01:17.5240 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Xf7o+fommpCTAYStLYJWpfuNqQhRIgCEi++wFrTHcf8DwqFKEz2RL37k5nFxheXeuhcuLjQBTAIuvrs7EdvqaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4986 Subject: Re: [dpdk-dev] [dpdk-ci] [PATCH] eal/windows: fix build warnings in MinGW X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > Subject: Re: [dpdk-ci] [PATCH] eal/windows: fix build warnings in MinGW >=20 > External email: Use caution opening links or attachments >=20 >=20 > 2021-04-19 15:29 (UTC-0400), Aaron Conole: > > Thomas Monjalon writes: > > > > > 19/04/2021 20:06, Tal Shnaiderman: > > >> > > 2021-04-18 19:04 (UTC+0000), Tal Shnaiderman: > > >> > > > > 18/04/2021 19:08, Tal Shnaiderman: > > >> > > > > > the strncasecmp marco defined in rte_os_shim.h is already > > >> > > > > > defined in MinGW-w64, as a result the compiler prints out > > >> > > > > > the warning below on function redefinition whenever > > >> > > > > > compiling a file including the > > >> > > header. > > >> > > > > > > > >> > > > > > ..\lib/librte_eal/windows/include/rte_os_shim.h:21: > > >> > > > > > warning: "strncasecmp" redefined #define strncasecmp(s1, > > >> > > > > > s2, > > >> > > > > > count) _strnicmp(s1, s2, count) > > >> > > > > > > >> > > > > Why the tests are passing? Are we allowing warnings in build > test? > > >> > > > > > >> > > > It's a good question, I see CI is passing without warnings, > > >> > > > Dmitry can you > > >> > > reproduce it? > > >> > > > > > >> > > > On my side the collision is with the following file: > > >> > > > > > >> > > > C:/mingw-w64/x86_64/mingw64/x86_64-w64- > > >> > > mingw32/include/string.h:119: > > >> > > > note: this is the location of the previous definition > > >> > > > #define strncasecmp _strnicmp > > >> > > > > > >> > > > I'm using: > > >> > > > -gcc (x86_64-win32-seh-rev0, Built by MinGW-W64 project) > > >> > > > 8.1.0 -meson > > >> > > > 0.53.2 > > >> > > > > >> > > I can't reproduce it using the same versions. > > >> > > Do you invoke meson with other options than "-Dexamples=3D..."? > > >> > > > >> > This is the meson line I'm using: > > >> > > > >> > meson "-Dexamples=3Dhelloworld" build --wipe > > >> > --default-library=3Dstatic -- buildtype debug > > >> > > > >> > The problem however is that MinGW's string.h defines the macro in > > >> > line 119, for some reason my build includes it and the rest doesn'= t. > > >> > > >> Hi Dmitry, > > >> > > >> I also noticed warnings in clang on my setup that are related to > rte_os_shim.h: > > >> > > >> [185/314] Compiling C object > drivers/a715181@@tmp_rte_common_mlx5@sta/common_mlx5_mlx5_co > mmon_mp.c.obj. > > >> In file included from ../drivers/common/mlx5/mlx5_common_mp.c:13: > > >> In file included from ..\drivers\common/mlx5/mlx5_common_utils.h:8: > > >> In file included from ..\drivers\common/mlx5/mlx5_common.h:17: > > >> ..\lib/librte_eal/windows/include\rte_os_shim.h:22:51: warning: > > >> token pasting of ',' and __VA_ARGS__ is a GNU extension > > >> [-Wgnu-zero-variadic-macro-arguments] > > >> #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__) > > >> ^ However don't > > >> see it in CI, I'm using clang version 9.0.1 > > > > > > It seems we should improve our CI. > > > Please open suggestions in the CI bugzilla. > > > > Please do. > > > > Will this only be caught by mingw64 on windows? Will we get the same > > issues with a linux mingw install? I'm guessing yes, but don't know > > mingw very well. We may be able to install the mingw package under > > our github actions pipeline. >=20 > Yes, Linux MinGW-w64 produces the same warning (about strncasecmp). > __VA_ARGS__ warning won't show up with GNU compiler, obviously. > It may with ICC, but I don't have it to check. >=20 > I figured out it's not --default-library=3Dstatic, but --buildtype=3Ddebu= g that > caues the arning to appear, my mistake in previous message. Right, using --buildtype=3Drelease doesn't reproduce the error. BTW, how does release build passes if I excluded the definition from RTE_TO= OLCHAIN_GCC?