<div dir="ltr"><div class="gmail_default" style="font-size:small">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?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Cheers,<br>Lincoln</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 19, 2021 at 4:09 PM Dmitry Kozlyuk <<a href="mailto:dmitry.kozliuk@gmail.com">dmitry.kozliuk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2021-04-19 15:29 (UTC-0400), Aaron Conole:<br>
> Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>> writes:<br>
> <br>
> > 19/04/2021 20:06, Tal Shnaiderman: <br>
> >> > > 2021-04-18 19:04 (UTC+0000), Tal Shnaiderman: <br>
> >> > > > > 18/04/2021 19:08, Tal Shnaiderman: <br>
> >> > > > > > the strncasecmp marco defined in rte_os_shim.h is already<br>
> >> > > > > > defined in MinGW-w64, as a result the compiler prints out the<br>
> >> > > > > > warning below on function redefinition whenever compiling a file<br>
> >> > > > > > including the <br>
> >> > > header. <br>
> >> > > > > ><br>
> >> > > > > > ..\lib/librte_eal/windows/include/rte_os_shim.h:21:<br>
> >> > > > > > warning: "strncasecmp" redefined #define strncasecmp(s1, s2,<br>
> >> > > > > > count) _strnicmp(s1, s2, count) <br>
> >> > > > ><br>
> >> > > > > Why the tests are passing? Are we allowing warnings in build test? <br>
> >> > > ><br>
> >> > > > It's a good question, I see CI is passing without warnings, Dmitry<br>
> >> > > > can you <br>
> >> > > reproduce it? <br>
> >> > > ><br>
> >> > > > On my side the collision is with the following file:<br>
> >> > > ><br>
> >> > > > C:/mingw-w64/x86_64/mingw64/x86_64-w64- <br>
> >> > > mingw32/include/string.h:119: <br>
> >> > > > note: this is the location of the previous definition #define<br>
> >> > > > strncasecmp _strnicmp<br>
> >> > > ><br>
> >> > > > I'm using:<br>
> >> > > > -gcc (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 8.1.0<br>
> >> > > > -meson<br>
> >> > > > 0.53.2 <br>
> >> > ><br>
> >> > > I can't reproduce it using the same versions.<br>
> >> > > Do you invoke meson with other options than "-Dexamples=..."? <br>
> >> > <br>
> >> > This is the meson line I'm using:<br>
> >> > <br>
> >> > meson "-Dexamples=helloworld" build --wipe --default-library=static --<br>
> >> > buildtype debug<br>
> >> > <br>
> >> > The problem however is that MinGW's string.h defines the macro in line 119,<br>
> >> > for some reason my build includes it and the rest doesn't. <br>
> >> <br>
> >> Hi Dmitry,<br>
> >> <br>
> >> I also noticed warnings in clang on my setup that are related to rte_os_shim.h:<br>
> >> <br>
> >> [185/314] Compiling C object drivers/a715181@@tmp_rte_common_mlx5@sta/common_mlx5_mlx5_common_mp.c.obj.<br>
> >> In file included from ../drivers/common/mlx5/mlx5_common_mp.c:13:<br>
> >> In file included from ..\drivers\common/mlx5/mlx5_common_utils.h:8:<br>
> >> In file included from ..\drivers\common/mlx5/mlx5_common.h:17:<br>
> >> ..\lib/librte_eal/windows/include\rte_os_shim.h:22:51: warning:<br>
> >> token pasting of ',' and __VA_ARGS__ is a GNU extension<br>
> >> [-Wgnu-zero-variadic-macro-arguments]<br>
> >> #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)<br>
> >> ^<br>
> >> However don't see it in CI, I'm using clang version 9.0.1 <br>
> ><br>
> > It seems we should improve our CI.<br>
> > Please open suggestions in the CI bugzilla. <br>
> <br>
> Please do.<br>
> <br>
> Will this only be caught by mingw64 on windows? Will we get the same<br>
> issues with a linux mingw install? I'm guessing yes, but don't know<br>
> mingw very well. We may be able to install the mingw package under our<br>
> github actions pipeline.<br>
<br>
Yes, Linux MinGW-w64 produces the same warning (about strncasecmp).<br>
__VA_ARGS__ warning won't show up with GNU compiler, obviously.<br>
It may with ICC, but I don't have it to check.<br>
<br>
I figured out it's not --default-library=static, but --buildtype=debug that<br>
caues the arning to appear, my mistake in previous message.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b>Lincoln Lavoie</b><br></div><div>Principal Engineer, Broadband Technologies</div><div>21 Madbury Rd., Ste. 100, Durham, NH 03824</div><div><a href="mailto:lylavoie@iol.unh.edu" target="_blank">lylavoie@iol.unh.edu</a></div><div><a href="https://www.iol.unh.edu" target="_blank">https://www.iol.unh.edu</a></div><div>+1-603-674-2755 (m)</div><div><a href="https://www.iol.unh.edu" target="_blank"><img src="https://docs.google.com/uc?export=download&id=1j_iI6anwrnbQWNpTyuvukMLSNJJ8_8QU&revid=0B_0ujwABDnFZTmJiR3EzK0d1VjFKTjQvMENBWVM0QnA4ajhjPQ" width="200" height="43"></a><br></div></div></div></div></div></div></div></div></div></div></div>