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 94218A0579; Mon, 19 Apr 2021 22:09:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 783A841477; Mon, 19 Apr 2021 22:09:41 +0200 (CEST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id 9A1D841448; Mon, 19 Apr 2021 22:09:40 +0200 (CEST) Received: by mail-lj1-f170.google.com with SMTP id u25so2536062ljg.7; Mon, 19 Apr 2021 13:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eSJUtFZa51Z5MqleZBfhwGkC1W7G3L8uoPLoXlEUSuo=; b=lwQckK5inVAIDKkneYoFAotxH23W2c4bHbLgth4cWDAH0zMrX4OrqVxKXNvsIK7LkC gTuj5a9Kfa3EGQEUEhATPGpPr6TqXNukvqtiwU3pw2Nb/339EZMNQxpCL3vfoL7lJOUD pjuUeXfTefsLCPfSOM+oKEkIUcfABmgrCSvO62ji+9SK1AK3iYe5XaCmS4yZ/uFOtoHi 7oVfzCeTsWbCY78fIFv76lqdhgVf7DPkyO33zP6CQopN5PikkVpDON5qTlLySNCnAcPZ VTCehRpQXFRxLxbgP9oLkZXMiq+RJrSmwsyrj5pbcEtfqbIFIX05rnKE9FY9xG9g1ijm sHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eSJUtFZa51Z5MqleZBfhwGkC1W7G3L8uoPLoXlEUSuo=; b=fO1lGI9EzmaxLjR6IZxqg4IE2heflaDncIcKdshk9GaOQNKjpRokU5uvaE1myv4oAN dodCvlkHCjZZuox7SRbVblHzJF1fFbYHCOKZLpW8UcZceXGUoHclJjy6SqL4901dHD8H zkPR015PTu7GrFtdyqEnM+Xgp63EceCvyfugtB1jgZK8YpMf7y2vzIW+0ACtkqPYQaqh pz7/qBYeJ55eBgnFy46CPHNHOslWCH0UGhCGswsxKXPg7EOt62is65ISuyHllcH8ovxM E/uGxWhpHmm0GnXpwlFjxBLS8qGWOo/2HsFfQnnMjCncES7zPVX2kY7Va+V2M3wqC4gB 2qLw== X-Gm-Message-State: AOAM533iAKZLxsjdKgH24ighzHswk0pfqQB25lFjRffIUs4+6HzmHW5w EYdhShiQVG75onmG1T2KVPI= X-Google-Smtp-Source: ABdhPJwA4jD6+yJE/fqIxLOp5gPeM/DUS3YlUyOyR8ecgmhjv/f1tEdoEbaklCRuN7NcBlK/lHmtYQ== X-Received: by 2002:a2e:9a51:: with SMTP id k17mr12758074ljj.41.1618862980150; Mon, 19 Apr 2021 13:09:40 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id p22sm337287lfo.179.2021.04.19.13.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 13:09:39 -0700 (PDT) Date: Mon, 19 Apr 2021 23:09:36 +0300 From: Dmitry Kozlyuk To: Aaron Conole Cc: Thomas Monjalon , Tal Shnaiderman , "dev\@dpdk.org" , "pallavi.kadam\@intel.com" , "navasile\@linux.microsoft.com" , "dmitrym\@microsoft.com" , ci@dpdk.org Message-ID: <20210419230936.04e2f95c@sovereign> In-Reply-To: References: <20210418170803.15684-1-talshn@nvidia.com> <3259972.HMeeyuY8TW@thomas> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" 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=..."? > >> > > >> > This is the meson line I'm using: > >> > > >> > meson "-Dexamples=helloworld" build --wipe --default-library=static -- > >> > 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_common_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. 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. I figured out it's not --default-library=static, but --buildtype=debug that caues the arning to appear, my mistake in previous message.