DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] build failure with MinGW GCC 10.2
@ 2020-12-01 13:18 Thomas Monjalon
  2020-12-01 13:52 ` Dmitry Kozlyuk
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2020-12-01 13:18 UTC (permalink / raw)
  To: dmitry.kozliuk
  Cc: nick.connolly, navasile, dmitrym, pallavi.kadam, talshn, dev

Hi,

I'm hitting an issue with x86_64-w64-mingw32-gcc (GCC) 10.2.0:
	lib/librte_eal/windows/eal_memory.c:30:14: error:
	redeclaration of ‘enum MEM_EXTENDED_PARAMETER_TYPE’
and others:
	redeclaration of enumerator ‘MemExtendedParameterInvalidType’
	redeclaration of enumerator ‘MemExtendedParameterAddressRequirements’
	redeclaration of enumerator ‘MemExtendedParameterNumaNode’
	redeclaration of enumerator ‘MemExtendedParameterPartitionHandle’
	redeclaration of enumerator ‘MemExtendedParameterUserPhysicalHandle’
	redeclaration of enumerator ‘MemExtendedParameterAttributeFlags’
	redeclaration of enumerator ‘MemExtendedParameterMax’
	redefinition of ‘struct MEM_EXTENDED_PARAMETER’
	"MEM_EXTENDED_PARAMETER_TYPE_BITS" redefined

I see in the code it should be avoided:

/* MinGW-w64 headers lack VirtualAlloc2() in some distributions.
 * Provide a copy of definitions and code to load it dynamically.
 * Note: definitions are copied verbatim from Microsoft documentation
 * and don't follow DPDK code style.
 *
 * MEM_RESERVE_PLACEHOLDER being defined means VirtualAlloc2() is present too.
 */
#ifndef MEM_PRESERVE_PLACEHOLDER

Does it mean using this flag is not true anymore in recent MinGW?



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

* Re: [dpdk-dev] build failure with MinGW GCC 10.2
  2020-12-01 13:18 [dpdk-dev] build failure with MinGW GCC 10.2 Thomas Monjalon
@ 2020-12-01 13:52 ` Dmitry Kozlyuk
  2020-12-01 14:05   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Kozlyuk @ 2020-12-01 13:52 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: nick.connolly, navasile, dmitrym, pallavi.kadam, talshn, dev

On Tue, 01 Dec 2020 14:18:53 +0100, Thomas Monjalon wrote:
> Hi,
> 
> I'm hitting an issue with x86_64-w64-mingw32-gcc (GCC) 10.2.0:
> 	lib/librte_eal/windows/eal_memory.c:30:14: error:
> 	redeclaration of ‘enum MEM_EXTENDED_PARAMETER_TYPE’
> and others:
> 	redeclaration of enumerator ‘MemExtendedParameterInvalidType’
> 	redeclaration of enumerator ‘MemExtendedParameterAddressRequirements’
> 	redeclaration of enumerator ‘MemExtendedParameterNumaNode’
> 	redeclaration of enumerator ‘MemExtendedParameterPartitionHandle’
> 	redeclaration of enumerator ‘MemExtendedParameterUserPhysicalHandle’
> 	redeclaration of enumerator ‘MemExtendedParameterAttributeFlags’
> 	redeclaration of enumerator ‘MemExtendedParameterMax’
> 	redefinition of ‘struct MEM_EXTENDED_PARAMETER’
> 	"MEM_EXTENDED_PARAMETER_TYPE_BITS" redefined
> 
> I see in the code it should be avoided:
> 
> /* MinGW-w64 headers lack VirtualAlloc2() in some distributions.
>  * Provide a copy of definitions and code to load it dynamically.
>  * Note: definitions are copied verbatim from Microsoft documentation
>  * and don't follow DPDK code style.
>  *
>  * MEM_RESERVE_PLACEHOLDER being defined means VirtualAlloc2() is present too.
>  */
> #ifndef MEM_PRESERVE_PLACEHOLDER
> 
> Does it mean using this flag is not true anymore in recent MinGW?

I think the #ifndef test is incorrect, maybe MEM_PRESERVE_PLACEHOLDER is not
a macro in MinGW headers as it is in Windows SDK.

What's your environment?

I can't reproduce this with the latest MinGW-w64 8.0.0 for Windows from
https://sourceforge.net/projects/mingw-w64/files/, x86_64-win32-seh flavour
(GCC 8.1.0), and neither with MinGW-w64 6.0.0 (9.3.0) on NixOS.

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

* Re: [dpdk-dev] build failure with MinGW GCC 10.2
  2020-12-01 13:52 ` Dmitry Kozlyuk
@ 2020-12-01 14:05   ` Thomas Monjalon
  2020-12-01 14:37     ` Dmitry Kozlyuk
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2020-12-01 14:05 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: nick.connolly, navasile, dmitrym, pallavi.kadam, talshn, dev

01/12/2020 14:52, Dmitry Kozlyuk:
> On Tue, 01 Dec 2020 14:18:53 +0100, Thomas Monjalon wrote:
> > Hi,
> > 
> > I'm hitting an issue with x86_64-w64-mingw32-gcc (GCC) 10.2.0:
> > 	lib/librte_eal/windows/eal_memory.c:30:14: error:
> > 	redeclaration of ‘enum MEM_EXTENDED_PARAMETER_TYPE’
> > and others:
> > 	redeclaration of enumerator ‘MemExtendedParameterInvalidType’
> > 	redeclaration of enumerator ‘MemExtendedParameterAddressRequirements’
> > 	redeclaration of enumerator ‘MemExtendedParameterNumaNode’
> > 	redeclaration of enumerator ‘MemExtendedParameterPartitionHandle’
> > 	redeclaration of enumerator ‘MemExtendedParameterUserPhysicalHandle’
> > 	redeclaration of enumerator ‘MemExtendedParameterAttributeFlags’
> > 	redeclaration of enumerator ‘MemExtendedParameterMax’
> > 	redefinition of ‘struct MEM_EXTENDED_PARAMETER’
> > 	"MEM_EXTENDED_PARAMETER_TYPE_BITS" redefined
> > 
> > I see in the code it should be avoided:
> > 
> > /* MinGW-w64 headers lack VirtualAlloc2() in some distributions.
> >  * Provide a copy of definitions and code to load it dynamically.
> >  * Note: definitions are copied verbatim from Microsoft documentation
> >  * and don't follow DPDK code style.
> >  *
> >  * MEM_RESERVE_PLACEHOLDER being defined means VirtualAlloc2() is present too.
> >  */
> > #ifndef MEM_PRESERVE_PLACEHOLDER
> > 
> > Does it mean using this flag is not true anymore in recent MinGW?
> 
> I think the #ifndef test is incorrect, maybe MEM_PRESERVE_PLACEHOLDER is not
> a macro in MinGW headers as it is in Windows SDK.
> 
> What's your environment?
> 
> I can't reproduce this with the latest MinGW-w64 8.0.0 for Windows from
> https://sourceforge.net/projects/mingw-w64/files/, x86_64-win32-seh flavour
> (GCC 8.1.0), and neither with MinGW-w64 6.0.0 (9.3.0) on NixOS.

I am using ArchLinux:
	mingw-w64-gcc 10.2.0-2
	mingw-w64-headers 8.0.0-1
	mingw-w64-crt 8.0.0-1




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

* Re: [dpdk-dev] build failure with MinGW GCC 10.2
  2020-12-01 14:05   ` Thomas Monjalon
@ 2020-12-01 14:37     ` Dmitry Kozlyuk
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kozlyuk @ 2020-12-01 14:37 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: nick.connolly, navasile, dmitrym, pallavi.kadam, talshn, dev

On Tue, 01 Dec 2020 15:05:33 +0100, Thomas Monjalon wrote:
> I am using ArchLinux:
> 	mingw-w64-gcc 10.2.0-2
> 	mingw-w64-headers 8.0.0-1
> 	mingw-w64-crt 8.0.0-1

Reproduced, working on the patch, thanks.

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

end of thread, other threads:[~2020-12-01 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 13:18 [dpdk-dev] build failure with MinGW GCC 10.2 Thomas Monjalon
2020-12-01 13:52 ` Dmitry Kozlyuk
2020-12-01 14:05   ` Thomas Monjalon
2020-12-01 14:37     ` Dmitry Kozlyuk

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).