From: William Tu <u9012063@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Thomas Monjalon <thomas@monjalon.net>,
Olivier Matz <olivier.matz@6wind.com>,
Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
Omar Cardona <ocardona@microsoft.com>,
Pallavi Kadam <pallavi.kadam@intel.com>,
Ranjit Menon <ranjit.menon@intel.com>,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 0/7] MinGW-w64 support
Date: Thu, 6 Feb 2020 12:22:44 -0800 [thread overview]
Message-ID: <CALDO+SZ7OFRa1yeJHdXoLDaoUczQJ-xg=1WhXe=jGpmP7aEk0Q@mail.gmail.com> (raw)
In-Reply-To: <20200206064426.45697-1-dmitry.kozliuk@gmail.com>
On Wed, Feb 5, 2020 at 10:44 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> This patch series add support for building DPDK using MinGW-w64.
>
> MinGW-w64 provides GNU toolchain and independent platform SDK on
> Windows. It also supports cross-compilation to Windows from POSIX
> systems by providing cross tollchains and libraries [0]. It does NOT
> emulate a full POSIX environment, like Cygwin or MSYS do.
>
> There are advantages in using MinGW-w64 in addition to Clang:
>
> 1. Cross-compilation out-of-the-box. MinGW-w64 is provides a pthread
> implementation, GNU getopt, and Windows platform SDK.
>
> 2. Easier porting of POSIX applications using DPDK to Windows, because
> application code can use the same benefits as mentioned above.
>
> 3. Having both primary compilers enabled on Windows provides more
> diagnostics and generally prevents non-portable code.
>
> [0]: http://mingw-w64.org
>
> v2 Changes:
>
> Add patch to use lowercase system header filenames.
> Move Meson cross-file for x86 to arch directory.
> Change wording in comments.
> Add Meson version warning in documentation.
>
> Dmitry Kozlyuk (7):
> eal: introduce portable format attribute
> eal: use portable format attribute
> cmdline: use portable format attribute
> eal/windows: use lowercase filenames for system headers
> build: MinGW-w64 support for Meson
> build: add cross-file for MinGW-w64
> doc: guide for Windows build using MinGW-w64
>
> config/meson.build | 14 +++++
> config/x86/meson_mingw.txt | 14 +++++
> doc/guides/windows_gsg/build_dpdk.rst | 65 ++++++++++++++++++---
> lib/librte_cmdline/cmdline.h | 4 +-
> lib/librte_eal/common/include/rte_common.h | 17 +++++-
> lib/librte_eal/common/include/rte_debug.h | 2 +-
> lib/librte_eal/common/include/rte_devargs.h | 2 +-
> lib/librte_eal/common/include/rte_log.h | 4 +-
> lib/librte_eal/meson.build | 3 +
> lib/librte_eal/windows/eal/include/rte_os.h | 4 +-
> lib/meson.build | 8 ++-
> 11 files changed, 118 insertions(+), 19 deletions(-)
> create mode 100644 config/x86/meson_mingw.txt
>
> --
> 2.25.0
>
Hi Dmitry,
I applied your v2 patch and I did a native build on windows 10.
Hit an error showing
../lib/librte_eal/windows/eal/eal_lcore.c:54:2: error: 'for' loop
initial declarations are only allowed in C99 mode
for (unsigned int socket = 0; socket <
^
../lib/librte_eal/windows/eal/eal_lcore.c:54:2: note: use option
-std=c99 or -std=gnu99 to compile your code
Then I fixed them by having separate declaration out side for loop.
then
$ ninja -C build
works
However the output looks weird:
C:\dpdk\build\examples>dpdk-helloworld.exe
EAL: Detected 2 lcore(s)
EAL: Detected 1 NUMA nodes
hehello fllo frorom cm core 1
ore 0
Regards,
William
--- more detailed ---
C:\dpdk>meson -v
0.53.999
C:\dpdk>gcc -v
Reading specs from c:/mingw-w64/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/specs
COLLECT_GCC=gcc
C:\dpdk>meson --reconfigure -Dexamples=helloworld build
The Meson build system
Version: 0.53.999
Source dir: C:\dpdk
Build dir: C:\dpdk\build
Build type: native build
Program cat found: NO
Program more found: YES (C:\WINDOWS\system32\more.COM)
Project name: DPDK
Project version: 20.02.0-rc2
C compiler for the host machine: cc (gcc 4.8.3 "cc (GCC) 4.8.3")
C linker for the host machine: cc GNU ld.bfd 2.24
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cat found: NO
Program more found: YES (C:\WINDOWS\system32\more.COM)
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh
C:\dpdk\config\../buildtools/symlink-drivers-so
libs.sh)
Checking for size of "void *" : 8
Library m found: YES
Library numa found: NO
Found pkg-config: C:\mingw-w64\bin\pkg-config.EXE (0.25)
next prev parent reply other threads:[~2020-02-06 20:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 6:44 Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 1/7] eal: introduce portable format attribute Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 2/7] eal: use " Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 3/7] cmdline: " Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 4/7] eal/windows: use lowercase filenames for system headers Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 5/7] build: MinGW-w64 support for Meson Dmitry Kozlyuk
2020-02-06 11:38 ` Bruce Richardson
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 6/7] build: add cross-file for MinGW-w64 Dmitry Kozlyuk
2020-02-06 6:44 ` [dpdk-dev] [PATCH v2 7/7] doc: guide for Windows build using MinGW-w64 Dmitry Kozlyuk
2020-02-06 20:22 ` William Tu [this message]
2020-02-07 10:24 ` [dpdk-dev] [PATCH v2 0/7] MinGW-w64 support Dmitry Kozliuk
2020-02-07 17:47 ` William Tu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALDO+SZ7OFRa1yeJHdXoLDaoUczQJ-xg=1WhXe=jGpmP7aEk0Q@mail.gmail.com' \
--to=u9012063@gmail.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=harini.ramakrishnan@microsoft.com \
--cc=john.mcnamara@intel.com \
--cc=marko.kovacevic@intel.com \
--cc=ocardona@microsoft.com \
--cc=olivier.matz@6wind.com \
--cc=pallavi.kadam@intel.com \
--cc=ranjit.menon@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).