MinGW guide
The Windows user guide is referencing a general link to download MinGW:
http://mingw-w64.org/doku.php/download
For those who want to install MinGW on Windows, I thing it is simpler to give this more direct link:
http://mingw-w64.org/doku.php/download/mingw-builds
It avoids hesitating between different bundles (Cygwin, Msys2, Win-Builds, etc).
Then when installing mingw-w64-install.exe, a choice must be done between threads POSIX or Win32.
If I understand well, POSIX must be chosen?
If it is important, it should be documented in my opinion.
Quoted 6 lines · On Sat, 13 Jun 2020 10:55:14 +0200 Thomas Monjalon <[email protected]> wrote:
The Windows user guide is referencing a general link to download MinGW:
http://mingw-w64.org/doku.php/downloadFor those who want to install MinGW on Windows, I thing it is simpler to give this more direct link:
http://mingw-w64.org/doku.php/download/mingw-builds
It avoids hesitating between different bundles (Cygwin, Msys2, Win-Builds, etc).
Agreed, at least while no package manager is used. I believe the most direct link would be this one:
https://sourceforge.net/projects/mingw-w64/files/
Quoted 3 lines
Then when installing mingw-w64-install.exe, a choice must be done between threads POSIX or Win32.
If I understand well, POSIX must be chosen?
Yes. DPDK config/meson.build now links with pthread if linker is not link.exe.
Note that maybe this can be relaxed (test needed!), i. e. link with pthread if it is found, otherwise use shim. Benefit, if this works: no runtime dependency on "libwinpthread-1.dll" for Windows.
Signature · 1 line
Dmitry Kozlyuk
Quoted 4 lines
Subject: Re: MinGW guide
On Sat, 13 Jun 2020 10:55:14 +0200
Thomas Monjalon <[email protected]> wrote:
[snip]
Quoted 6 lines
Quoted 3 lines
Then when installing mingw-w64-install.exe, a choice must be done between threads POSIX or Win32.
If I understand well, POSIX must be chosen?Yes. DPDK config/meson.build now links with pthread if linker is not link.exe.
Where do we actually use pthread in Windows?
Quoted 3 lines
Note that maybe this can be relaxed (test needed!), i. e. link with pthread if it is found, otherwise use shim. Benefit, if this works: no runtime dependency on "libwinpthread-1.dll" for Windows.
I was sure, since we create the threads with Win32 API (CreateThread), the correct option is Win32. My mingw-w64 is installed with that option and I didn't see issues with it.
Quoted 3 lines
--
Dmitry Kozlyuk
Quoted 7 lines · On Mon, 15 Jun 2020 09:25:07 +0000 Tal Shnaiderman <[email protected]> wrote:
Quoted 4 lines
Subject: Re: MinGW guide
On Sat, 13 Jun 2020 10:55:14 +0200
Thomas Monjalon <[email protected]> wrote:[snip]
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Then when installing mingw-w64-install.exe, a choice must be done between threads POSIX or Win32.
If I understand well, POSIX must be chosen?Yes. DPDK config/meson.build now links with pthread if linker is not link.exe.
Where do we actually use pthread in Windows?
Nowhere indeed. Probably it was my mistake to link with it when adding MinGW support. Shim is always used anyway.
Quoted 7 lines
Quoted 4 lines
Note that maybe this can be relaxed (test needed!), i. e. link with pthread if it is found, otherwise use shim. Benefit, if this works: no runtime dependency on "libwinpthread-1.dll" for Windows.
I was sure, since we create the threads with Win32 API (CreateThread), the correct option is Win32. My mingw-w64 is installed with that option and I didn't see issues with it.
Then I'm totally wrong. Your way MinGW-w64 produces an executable without dependencies (apart from system libraries), so this should be preferred. I tried and it works for me.
Signature · 1 line
Dmitry Kozlyuk