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 1B1ADA0579 for ; Mon, 19 Apr 2021 22:36:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B8A2A4147F; Mon, 19 Apr 2021 22:36:33 +0200 (CEST) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mails.dpdk.org (Postfix) with ESMTP id 5A6BD41471 for ; Mon, 19 Apr 2021 22:36:31 +0200 (CEST) Received: by mail-ej1-f51.google.com with SMTP id w3so54996828ejc.4 for ; Mon, 19 Apr 2021 13:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/23I7viiOHIDleF2QNLcq3rt8+RbbOCvKtPi1MHaisw=; b=JB62LcWiuyIr4xVzrj7/OWNFmcCrwuSjFulyIW2sYLGsQuFkgzR0lB7f12fYbus3h3 unHWQbtK8HOM533N3YB8ZNuj7iW+iLVEgbAQaBJhaD3CY+a+rl03kRweGJ09aBdJpPNy XfDLmdYV/ViYjVQnfsrWVQvqOuyV4PUPuvSrs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/23I7viiOHIDleF2QNLcq3rt8+RbbOCvKtPi1MHaisw=; b=f+nCwdjqqyEnTvksLR2oqTLCuNSAEYQsLDGCVsfO76txvv7CY/rcHC0JCni3tHaxdG YTS8cDv1jwM10cy9l8DKGGcm2wldOB1+JJ+yRUbl1W4h7zkAxwYD7iTxEctUehtnrcRu XcKRgReN+C8CySB6OvmnBKfEF95i79Xhe0sZ58TwMBWQzIOvyETKtoFn6g5ZvZivhFzb YmCQkdg8ioL0ATGAvttsrvL5EptACOn+0RIVrFkt8t9VAWBx48SyMgnjGQRqWYDSJ0oV oFmKI/c3EdiKfFZAbE0aAdhzr4PTNJHbH/befhmgUeA7ee1XR2OnKK6Wpv72RtGj4W2u UZog== X-Gm-Message-State: AOAM531acVGdrToG23Jtvo3tVDjmCvOmXkfZR3boRWOYjklMb/iAfRyY 6bEI3g9rridVernLXxH8QhNMuh43/BuEsCveTbQ4jQ== X-Google-Smtp-Source: ABdhPJzOvtL2dTdbyIizpbtqBsqambD2XHuf7Jbisl4eDZM79ew0qFMWyUJNMAMk34eWK4hdqsrrX6HWbou6gN4/rUY= X-Received: by 2002:a17:906:b156:: with SMTP id bt22mr19959655ejb.181.1618864590958; Mon, 19 Apr 2021 13:36:30 -0700 (PDT) MIME-Version: 1.0 References: <20210418170803.15684-1-talshn@nvidia.com> <3259972.HMeeyuY8TW@thomas> <20210419230936.04e2f95c@sovereign> In-Reply-To: <20210419230936.04e2f95c@sovereign> From: Lincoln Lavoie Date: Mon, 19 Apr 2021 16:33:15 -0400 Message-ID: To: Dmitry Kozlyuk Cc: Aaron Conole , Thomas Monjalon , Tal Shnaiderman , "dev@dpdk.org" , "pallavi.kadam@intel.com" , "navasile@linux.microsoft.com" , "dmitrym@microsoft.com" , ci@dpdk.org Content-Type: multipart/alternative; boundary="000000000000e24b8905c059484f" Subject: Re: [dpdk-ci] [PATCH] eal/windows: fix build warnings in MinGW X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Sender: "ci" --000000000000e24b8905c059484f Content-Type: text/plain; charset="UTF-8" Is that related to a recent patch (I think it was David's, but don't quote me on that) that enabled a debug build mode when it sees git repo info within the build root? Cheers, Lincoln On Mon, Apr 19, 2021 at 4:09 PM Dmitry Kozlyuk wrote: > 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. > -- *Lincoln Lavoie* Principal Engineer, Broadband Technologies 21 Madbury Rd., Ste. 100, Durham, NH 03824 lylavoie@iol.unh.edu https://www.iol.unh.edu +1-603-674-2755 (m) --000000000000e24b8905c059484f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Is = that related to a recent patch (I think it was David's, but don't q= uote me on that) that enabled a debug build mode when it sees git repo info= within=C2=A0the build root?

Cheers,
Lincoln

On Mon, Apr 19, 2021 at 4:09 PM Dmitry Kozlyu= k <dmitry.kozliuk@gmail.com<= /a>> wrote:
2= 021-04-19 15:29 (UTC-0400), Aaron Conole:
> Thomas Monjalon <
thomas@monjalon.net> writes:
>
> > 19/04/2021 20:06, Tal Shnaiderman:=C2=A0
> >> > > 2021-04-18 19:04 (UTC+0000), Tal Shnaiderman:=C2=A0=
> >> > > > > 18/04/2021 19:08, Tal Shnaiderman:=C2=A0 =
> >> > > > > > the strncasecmp marco defined in rte= _os_shim.h is already
> >> > > > > > defined in MinGW-w64, as a result th= e compiler prints out the
> >> > > > > > warning below on function redefiniti= on whenever compiling a file
> >> > > > > > including the=C2=A0
> >> > > header.=C2=A0
> >> > > > > >
> >> > > > > > ..\lib/librte_eal/windows/include/rt= e_os_shim.h:21:
> >> > > > > > warning: "strncasecmp" red= efined #define strncasecmp(s1, s2,
> >> > > > > > count) _strnicmp(s1, s2, count)=C2= =A0
> >> > > > >
> >> > > > > Why the tests are passing? Are we allowin= g warnings in build test?=C2=A0
> >> > > >
> >> > > > It's a good question, I see CI is passing = without warnings, Dmitry
> >> > > > can you=C2=A0
> >> > > reproduce it?=C2=A0
> >> > > >
> >> > > > On my side the collision is with the following= file:
> >> > > >
> >> > > > C:/mingw-w64/x86_64/mingw64/x86_64-w64-=C2=A0 =
> >> > > mingw32/include/string.h:119:=C2=A0
> >> > > > note: this is the location of the previous def= inition=C2=A0 #define
> >> > > > strncasecmp _strnicmp
> >> > > >
> >> > > > I'm using:
> >> > > > -gcc (x86_64-win32-seh-rev0, Built by MinGW-W6= 4 project) 8.1.0
> >> > > > -meson
> >> > > > 0.53.2=C2=A0
> >> > >
> >> > > I can't reproduce it using the same versions. > >> > > Do you invoke meson with other options than "-= Dexamples=3D..."?=C2=A0
> >> >
> >> > 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&= #39;t.=C2=A0
> >>
> >> 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_util= s.h:8:
> >> In file included from ..\drivers\common/mlx5/mlx5_common.h:17= :
> >> ..\lib/librte_eal/windows/include\rte_os_shim.h:22:51: warnin= g:
> >> token pasting of ',' and __VA_ARGS__ is a GNU extensi= on
> >> [-Wgnu-zero-variadic-macro-arguments]
> >> #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS= __)
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
> >> However don't see it in CI, I'm using clang version 9= .0.1=C2=A0
> >
> > It seems we should improve our CI.
> > Please open suggestions in the CI bugzilla.=C2=A0
>
> Please do.
>
> Will this only be caught by mingw64 on windows?=C2=A0 Will we get the = same
> issues with a linux mingw install?=C2=A0 I'm guessing yes, but don= 't know
> mingw very well.=C2=A0 We may be able to install the mingw package und= er 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=3Dstatic, but --buildtype=3Dde= bug that
caues the arning to appear, my mistake in previous message.


--
Lincoln Lavoie
Prin= cipal Engineer, Broadband Technologies
21 Madbury Rd., Ste. 100, = Durham, NH 03824
+1-603-674-= 2755 (m)

--000000000000e24b8905c059484f--