From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id ADCDDA04DB;
	Tue,  1 Dec 2020 14:52:43 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id F30EAC982;
	Tue,  1 Dec 2020 14:52:41 +0100 (CET)
Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com
 [209.85.167.54]) by dpdk.org (Postfix) with ESMTP id CCC56C956
 for <dev@dpdk.org>; Tue,  1 Dec 2020 14:52:40 +0100 (CET)
Received: by mail-lf1-f54.google.com with SMTP id j205so4270737lfj.6
 for <dev@dpdk.org>; Tue, 01 Dec 2020 05:52:40 -0800 (PST)
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=zCSCl9E25lwg2yWuR48dZHc/kDk9iDivOMy2/iJzT9M=;
 b=EHGll4U/2v9rpOgp0U365MZhqBVxxLBJnlbfL8Lqztxdj/NNaUtqBB/25Ab3tEyVAE
 odyDHnFvC7w66TPvCdJY/w838DKJFF3BvHtDZwN3LzDSWgTw7HFdo/usycGZ0xpVxmcV
 xKllVmL8loFMQItSu19hh2HGzJkICESX9cUK49RAclZKN9g5jX5ctrYJaHZdsA0IQERX
 cTIY5nRvNxSa6JFhitbBb8cZ5X/+66yoH2w+Yewd3iWumO3R2jHgz30hqzMvZoqMFwaK
 VuB/28UYqRtIVROSM/waf3TC3dU/4sBAjhUF9wLfNA5+na3GfZNPVm8nBu3hX8o0vQqO
 JM3w==
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=zCSCl9E25lwg2yWuR48dZHc/kDk9iDivOMy2/iJzT9M=;
 b=QD9/IAnvJK9YX5SqKyAcAfBH82gRDne/nO5AHmDm1Zwkr7+wJcbvGz5oXN/hHizokT
 +8eeog45ca5KpDpuQifRUCVQkBD1LhrRrEtUEkSIigFTh2YtSj3KicsoSQLwnA+HFZ8v
 pntESuAmf0P29DMwkt8OaXK0yszcS7FM2MnK61oruGN9deVfEJx0b9F8KCD/ORIKzE3P
 3A2LDh+Ny5Gzfn0SMepa3td3bOxWiMuNxIfKQGChdn3lKsvlws3pCs5KgXCjDP1ITrjY
 f8lh3PJ4ltAQPaehwKT0dOMeoBKkXJHTiCgJbZmp5GOtUfOoP6Pca7TkGFCrHlFHPKdJ
 xFdg==
X-Gm-Message-State: AOAM530ERRr/Xk3qJDgr5PMZ5qIOEQ9BHE5JDv0Bs1bnmW4UkJGTcVuM
 HI0zqCeKqHQAFEo+awS8VXk=
X-Google-Smtp-Source: ABdhPJz7Hoih5rf3xR4y+VPsS6J8+ycbMqhfGscTLu5SOsScAFFQCmu2dwMxnQJsC8AG5dLnGefMAQ==
X-Received: by 2002:a19:5015:: with SMTP id e21mr1148406lfb.566.1606830759358; 
 Tue, 01 Dec 2020 05:52:39 -0800 (PST)
Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id j22sm210231lfr.6.2020.12.01.05.52.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 01 Dec 2020 05:52:38 -0800 (PST)
Date: Tue, 1 Dec 2020 16:52:36 +0300
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: nick.connolly@mayadata.io, navasile@linux.microsoft.com,
 dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@nvidia.com,
 dev@dpdk.org
Message-ID: <20201201165236.64b6f97e@sovereign>
In-Reply-To: <8094293.VoMytXdBYE@thomas>
References: <8094293.VoMytXdBYE@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=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [dpdk-dev] build failure with MinGW GCC 10.2
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Tue, 01 Dec 2020 14:18:53 +0100, Thomas Monjalon wrote:
> Hi,
>=20
> 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 =E2=80=98enum MEM_EXTENDED_PARAMETER_TYPE=E2=80=99
> and others:
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterInvalidType=E2=
=80=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterAddressRequirem=
ents=E2=80=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterNumaNode=E2=80=
=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterPartitionHandle=
=E2=80=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterUserPhysicalHan=
dle=E2=80=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterAttributeFlags=
=E2=80=99
> 	redeclaration of enumerator =E2=80=98MemExtendedParameterMax=E2=80=99
> 	redefinition of =E2=80=98struct MEM_EXTENDED_PARAMETER=E2=80=99
> 	"MEM_EXTENDED_PARAMETER_TYPE_BITS" redefined
>=20
> I see in the code it should be avoided:
>=20
> /* 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
>=20
> 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.