DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Build error with mingw in debug mode
@ 2020-11-27  9:53 David Marchand
  2020-11-27 10:05 ` Nick Connolly
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2020-11-27  9:53 UTC (permalink / raw)
  To: Pallavi Kadam, Bruce Richardson
  Cc: dev, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
	Dmitry Malloy (MESHCHANINOV),
	Nick Connolly

This is introduced by e8428a9d89f1 ("eal/windows: add some basic
functions and macros").
So sending to you guys:

Caught while compiling all my envs with --buildtype=debug rather than
debugoptimized:

ninja: Entering directory `/home/dmarchan/builds/build-x86-mingw'
...
Build targets in project: 70
Option buildtype is: debug [default: release]
Found ninja-1.9.0 at /usr/bin/ninja
[1/149] Compiling C object
'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'.
FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj
x86_64-w64-mingw32-gcc -Ilib/76b5a35@@rte_eal@sta -Ilib
-I../../dpdk/lib -I. -I../../dpdk/ -Iconfig -I../../dpdk/config
-Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include
-Ilib/librte_eal/windows/include
-I../../dpdk/lib/librte_eal/windows/include
-Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include
-Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common
-Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
-I../../dpdk/lib/librte_kvargs -fdiagnostics-color=always -pipe -Wall
-Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual
-Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wold-style-definition -Wpointer-arith -Wsign-compare
-Wstrict-prototypes -Wundef -Wwrite-strings
-Wno-address-of-packed-member -Wno-packed-not-aligned
-Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00
-D__USE_MINGW_ANSI_STDIO -march=native -DALLOW_EXPERIMENTAL_API
-DALLOW_INTERNAL_API -Wno-format-truncation '-DABI_VERSION="21.0"' -MD
-MQ 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
-MF 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj.d'
-o 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
-c ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c
In file included from ../../dpdk/lib/librte_eal/include/rte_common.h:28,
                 from ../../dpdk/lib/librte_eal/include/rte_string_fns.h:21,
                 from ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
../../dpdk/lib/librte_eal/windows/include/rte_os.h:40: error:
"strncasecmp" redefined [-Werror]
   40 | #define strncasecmp(s1, s2, count)        _strnicmp(s1, s2, count)
      |
In file included from ../../dpdk/lib/librte_eal/include/rte_string_fns.h:19,
                 from ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:119: note:
this is the location of the previous definition
  119 | #define strncasecmp _strnicmp
      |
cc1: all warnings being treated as errors


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] Build error with mingw in debug mode
  2020-11-27  9:53 [dpdk-dev] Build error with mingw in debug mode David Marchand
@ 2020-11-27 10:05 ` Nick Connolly
  2020-11-27 10:07   ` Nick Connolly
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Connolly @ 2020-11-27 10:05 UTC (permalink / raw)
  To: David Marchand, Pallavi Kadam, Bruce Richardson
  Cc: dev, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
	Dmitry Malloy (MESHCHANINOV)

The root cause here is that rte_windows.h shouldn't be injecting 
'missing' POSIX functionality
into the environment.  The header is included indirectly in application 
code via rte_os.h, but
deciding how to implement the 'missing' functionality should be the 
applications responsibility.

There are a number of definitions that fall in this category, so there 
will need to be some work
done to resolve the issues.

In the meantime, I'll prepare a patch that works around the specific 
issue you've encountered.

Regards,
Nick

On 27/11/2020 09:53, David Marchand wrote:
> This is introduced by e8428a9d89f1 ("eal/windows: add some basic
> functions and macros").
> So sending to you guys:
>
> Caught while compiling all my envs with --buildtype=debug rather than
> debugoptimized:
>
> ninja: Entering directory `/home/dmarchan/builds/build-x86-mingw'
> ...
> Build targets in project: 70
> Option buildtype is: debug [default: release]
> Found ninja-1.9.0 at /usr/bin/ninja
> [1/149] Compiling C object
> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'.
> FAILED: lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj
> x86_64-w64-mingw32-gcc -Ilib/76b5a35@@rte_eal@sta -Ilib
> -I../../dpdk/lib -I. -I../../dpdk/ -Iconfig -I../../dpdk/config
> -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include
> -Ilib/librte_eal/windows/include
> -I../../dpdk/lib/librte_eal/windows/include
> -Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include
> -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common
> -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
> -I../../dpdk/lib/librte_kvargs -fdiagnostics-color=always -pipe -Wall
> -Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual
> -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
> -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
> -Wold-style-definition -Wpointer-arith -Wsign-compare
> -Wstrict-prototypes -Wundef -Wwrite-strings
> -Wno-address-of-packed-member -Wno-packed-not-aligned
> -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00
> -D__USE_MINGW_ANSI_STDIO -march=native -DALLOW_EXPERIMENTAL_API
> -DALLOW_INTERNAL_API -Wno-format-truncation '-DABI_VERSION="21.0"' -MD
> -MQ 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
> -MF 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj.d'
> -o 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
> -c ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c
> In file included from ../../dpdk/lib/librte_eal/include/rte_common.h:28,
>                   from ../../dpdk/lib/librte_eal/include/rte_string_fns.h:21,
>                   from ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
> ../../dpdk/lib/librte_eal/windows/include/rte_os.h:40: error:
> "strncasecmp" redefined [-Werror]
>     40 | #define strncasecmp(s1, s2, count)        _strnicmp(s1, s2, count)
>        |
> In file included from ../../dpdk/lib/librte_eal/include/rte_string_fns.h:19,
>                   from ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
> /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:119: note:
> this is the location of the previous definition
>    119 | #define strncasecmp _strnicmp
>        |
> cc1: all warnings being treated as errors
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] Build error with mingw in debug mode
  2020-11-27 10:05 ` Nick Connolly
@ 2020-11-27 10:07   ` Nick Connolly
  2020-11-27 12:09     ` Nick Connolly
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Connolly @ 2020-11-27 10:07 UTC (permalink / raw)
  To: David Marchand, Pallavi Kadam, Bruce Richardson
  Cc: dev, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
	Dmitry Malloy (MESHCHANINOV)

Errata: the definition is in rte_os.h rather than rte_windows.h

On 27/11/2020 10:05, Nick Connolly wrote:
> The root cause here is that rte_windows.h shouldn't be injecting 
> 'missing' POSIX functionality
> into the environment.  The header is included indirectly in 
> application code via rte_os.h, but
> deciding how to implement the 'missing' functionality should be the 
> applications responsibility.
>
> There are a number of definitions that fall in this category, so there 
> will need to be some work
> done to resolve the issues.
>
> In the meantime, I'll prepare a patch that works around the specific 
> issue you've encountered.
>
> Regards,
> Nick
>
> On 27/11/2020 09:53, David Marchand wrote:
>> This is introduced by e8428a9d89f1 ("eal/windows: add some basic
>> functions and macros").
>> So sending to you guys:
>>
>> Caught while compiling all my envs with --buildtype=debug rather than
>> debugoptimized:
>>
>> ninja: Entering directory `/home/dmarchan/builds/build-x86-mingw'
>> ...
>> Build targets in project: 70
>> Option buildtype is: debug [default: release]
>> Found ninja-1.9.0 at /usr/bin/ninja
>> [1/149] Compiling C object
>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'.
>> FAILED: 
>> lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj
>> x86_64-w64-mingw32-gcc -Ilib/76b5a35@@rte_eal@sta -Ilib
>> -I../../dpdk/lib -I. -I../../dpdk/ -Iconfig -I../../dpdk/config
>> -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include
>> -Ilib/librte_eal/windows/include
>> -I../../dpdk/lib/librte_eal/windows/include
>> -Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include
>> -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common
>> -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
>> -I../../dpdk/lib/librte_kvargs -fdiagnostics-color=always -pipe -Wall
>> -Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual
>> -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
>> -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
>> -Wold-style-definition -Wpointer-arith -Wsign-compare
>> -Wstrict-prototypes -Wundef -Wwrite-strings
>> -Wno-address-of-packed-member -Wno-packed-not-aligned
>> -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00
>> -D__USE_MINGW_ANSI_STDIO -march=native -DALLOW_EXPERIMENTAL_API
>> -DALLOW_INTERNAL_API -Wno-format-truncation '-DABI_VERSION="21.0"' -MD
>> -MQ 
>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
>> -MF 
>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj.d'
>> -o 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
>> -c ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c
>> In file included from ../../dpdk/lib/librte_eal/include/rte_common.h:28,
>>                   from 
>> ../../dpdk/lib/librte_eal/include/rte_string_fns.h:21,
>>                   from 
>> ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
>> ../../dpdk/lib/librte_eal/windows/include/rte_os.h:40: error:
>> "strncasecmp" redefined [-Werror]
>>     40 | #define strncasecmp(s1, s2, count)        _strnicmp(s1, s2, 
>> count)
>>        |
>> In file included from 
>> ../../dpdk/lib/librte_eal/include/rte_string_fns.h:19,
>>                   from 
>> ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
>> /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:119: note:
>> this is the location of the previous definition
>>    119 | #define strncasecmp _strnicmp
>>        |
>> cc1: all warnings being treated as errors
>>
>>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] Build error with mingw in debug mode
  2020-11-27 10:07   ` Nick Connolly
@ 2020-11-27 12:09     ` Nick Connolly
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Connolly @ 2020-11-27 12:09 UTC (permalink / raw)
  To: David Marchand, Pallavi Kadam, Bruce Richardson
  Cc: dev, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
	Dmitry Malloy (MESHCHANINOV)

I've created a patch for this and also for a couple of build warnings 
that showed up doing
a similar test with clang.

On 27/11/2020 10:07, Nick Connolly wrote:
> Errata: the definition is in rte_os.h rather than rte_windows.h
>
> On 27/11/2020 10:05, Nick Connolly wrote:
>> The root cause here is that rte_windows.h shouldn't be injecting 
>> 'missing' POSIX functionality
>> into the environment.  The header is included indirectly in 
>> application code via rte_os.h, but
>> deciding how to implement the 'missing' functionality should be the 
>> applications responsibility.
>>
>> There are a number of definitions that fall in this category, so 
>> there will need to be some work
>> done to resolve the issues.
>>
>> In the meantime, I'll prepare a patch that works around the specific 
>> issue you've encountered.
>>
>> Regards,
>> Nick
>>
>> On 27/11/2020 09:53, David Marchand wrote:
>>> This is introduced by e8428a9d89f1 ("eal/windows: add some basic
>>> functions and macros").
>>> So sending to you guys:
>>>
>>> Caught while compiling all my envs with --buildtype=debug rather than
>>> debugoptimized:
>>>
>>> ninja: Entering directory `/home/dmarchan/builds/build-x86-mingw'
>>> ...
>>> Build targets in project: 70
>>> Option buildtype is: debug [default: release]
>>> Found ninja-1.9.0 at /usr/bin/ninja
>>> [1/149] Compiling C object
>>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'.
>>> FAILED: 
>>> lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj
>>> x86_64-w64-mingw32-gcc -Ilib/76b5a35@@rte_eal@sta -Ilib
>>> -I../../dpdk/lib -I. -I../../dpdk/ -Iconfig -I../../dpdk/config
>>> -Ilib/librte_eal/include -I../../dpdk/lib/librte_eal/include
>>> -Ilib/librte_eal/windows/include
>>> -I../../dpdk/lib/librte_eal/windows/include
>>> -Ilib/librte_eal/x86/include -I../../dpdk/lib/librte_eal/x86/include
>>> -Ilib/librte_eal/common -I../../dpdk/lib/librte_eal/common
>>> -Ilib/librte_eal -I../../dpdk/lib/librte_eal -Ilib/librte_kvargs
>>> -I../../dpdk/lib/librte_kvargs -fdiagnostics-color=always -pipe -Wall
>>> -Winvalid-pch -Werror -g -include rte_config.h -Wextra -Wcast-qual
>>> -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
>>> -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
>>> -Wold-style-definition -Wpointer-arith -Wsign-compare
>>> -Wstrict-prototypes -Wundef -Wwrite-strings
>>> -Wno-address-of-packed-member -Wno-packed-not-aligned
>>> -Wno-missing-field-initializers -D_GNU_SOURCE -D_WIN32_WINNT=0x0A00
>>> -D__USE_MINGW_ANSI_STDIO -march=native -DALLOW_EXPERIMENTAL_API
>>> -DALLOW_INTERNAL_API -Wno-format-truncation '-DABI_VERSION="21.0"' -MD
>>> -MQ 
>>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
>>> -MF 
>>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj.d'
>>> -o 
>>> 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_hexdump.c.obj'
>>> -c ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c
>>> In file included from 
>>> ../../dpdk/lib/librte_eal/include/rte_common.h:28,
>>>                   from 
>>> ../../dpdk/lib/librte_eal/include/rte_string_fns.h:21,
>>>                   from 
>>> ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
>>> ../../dpdk/lib/librte_eal/windows/include/rte_os.h:40: error:
>>> "strncasecmp" redefined [-Werror]
>>>     40 | #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
>>>        |
>>> In file included from 
>>> ../../dpdk/lib/librte_eal/include/rte_string_fns.h:19,
>>>                   from 
>>> ../../dpdk/lib/librte_eal/common/eal_common_hexdump.c:9:
>>> /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:119: note:
>>> this is the location of the previous definition
>>>    119 | #define strncasecmp _strnicmp
>>>        |
>>> cc1: all warnings being treated as errors
>>>
>>>
>>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-27 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27  9:53 [dpdk-dev] Build error with mingw in debug mode David Marchand
2020-11-27 10:05 ` Nick Connolly
2020-11-27 10:07   ` Nick Connolly
2020-11-27 12:09     ` Nick Connolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).