From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DCE34A0350; Mon, 29 Jun 2020 08:23:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5847D1B5E1; Mon, 29 Jun 2020 08:23:17 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CBCEF2C2B for ; Mon, 29 Jun 2020 08:23:15 +0200 (CEST) IronPort-SDR: UxYN0JSiTKhgeFmVqc4U5bjL/WwYU9VSWGMer3G5RzTIy1tv8RP/hvrvLVEWS3320Xxa/JW3sO QNIhDaPNPvsA== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="134232688" X-IronPort-AV: E=Sophos;i="5.75,294,1589266800"; d="scan'208";a="134232688" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2020 23:23:14 -0700 IronPort-SDR: VB9QvMiHHeV3YB8nc7caExJm64BF65mEUPFo6Q8U5vmi+/UUVdvKNLfa3qADf6+LUhgTH9U0gX GZc0X9NwmHpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,294,1589266800"; d="scan'208";a="320551425" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2020 23:23:14 -0700 Received: from [10.166.30.253] (10.166.30.253) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 28 Jun 2020 23:23:14 -0700 To: Fady Bader , Dmitry Kozlyuk , "dev@dpdk.org" CC: Dmitry Malloy , Narcisa Ana Maria Vasile , Tal Shnaiderman , Thomas Monjalon , Olivier Matz References: <20200620210511.13134-1-dmitry.kozliuk@gmail.com> <20200620210511.13134-7-dmitry.kozliuk@gmail.com> From: Ranjit Menon Message-ID: <8b908479-d64c-495d-3a69-de561f2608e8@intel.com> Date: Sun, 28 Jun 2020 23:23:11 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.166.30.253] Subject: Re: [dpdk-dev] [PATCH 6/7] cmdline: support Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/28/2020 7:20 AM, Fady Bader wrote: > Hi Dmitry, > I'm trying to run test-pmd on Windows and I ran into this error with cmdline. > > The error log message is : > In file included from ../app/test-pmd/cmdline_flow.c:23: > ..\lib\librte_cmdline/cmdline_parse_num.h:24:2: error: 'INT64' redeclared as different kind of symbol > INT64 > > In file included from C:/mingw-w64/x86_64/mingw64/x86_64-w64-mingw32/include/winnt.h:150, > from C:/mingw-w64/x86_64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163, > from C:/mingw-w64/x86_64/mingw64/x86_64-w64-mingw32/include/windef.h:8, > from C:/mingw-w64/x86_64/mingw64/x86_64-w64-mingw32/include/windows.h:69, > from ..\lib/librte_eal/windows/include/rte_windows.h:22, > from ..\lib/librte_eal/windows/include/pthread.h:20, > from ..\lib/librte_eal/include/rte_per_lcore.h:25, > from ..\lib/librte_eal/include/rte_errno.h:18, > from ..\lib\librte_ethdev/rte_ethdev.h:156, > from ../app/test-pmd/cmdline_flow.c:18: > C:/mingw-w64/x86_64/mingw64/x86_64-w64-mingw32/include/basetsd.h:32:44: note: previous declaration of 'INT64' was here > __MINGW_EXTENSION typedef signed __int64 INT64,*PINT64; > > The same error is for the other types defined in cmdline_numtype. > > This problem with windows.h is popping in many places and some of them are > cmdline and test-pmd and librte_net. > We should find a way to exclude windows.h from the unneeded places, is there any > suggestions on how it can be done ? We ran into this same issue when working with the code that is on the draft repo. The issue is that UINT8, UINT16, INT32, INT64 etc. are reserved types in Windows headers for integer types. We found that it is easier to change the enum in cmdline_parse_num.h than try to play with the include order of headers. AFAIK, the enums were only used to determine the type in a series of switch() statements in librte_cmdline, so we simply renamed the enums. Not sure, if that will be acceptable here. ranjit m.