DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] MinGW guide
@ 2020-06-13  8:55 Thomas Monjalon
  2020-06-15  0:48 ` Dmitry Kozlyuk
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2020-06-13  8:55 UTC (permalink / raw)
  To: dmitry.kozliuk; +Cc: harini.ramakrishnan, talshn, dev

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.



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

* Re: [dpdk-dev] MinGW guide
  2020-06-13  8:55 [dpdk-dev] MinGW guide Thomas Monjalon
@ 2020-06-15  0:48 ` Dmitry Kozlyuk
  2020-06-15  9:25   ` Tal Shnaiderman
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-15  0:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: harini.ramakrishnan, talshn, dev

On Sat, 13 Jun 2020 10:55:14 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

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

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/

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

-- 
Dmitry Kozlyuk

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

* Re: [dpdk-dev] MinGW guide
  2020-06-15  0:48 ` Dmitry Kozlyuk
@ 2020-06-15  9:25   ` Tal Shnaiderman
  2020-06-16 21:34     ` Dmitry Kozlyuk
  0 siblings, 1 reply; 4+ messages in thread
From: Tal Shnaiderman @ 2020-06-15  9:25 UTC (permalink / raw)
  To: Dmitry Kozlyuk, Thomas Monjalon; +Cc: harini.ramakrishnan, dev

> Subject: Re: MinGW guide
> 
> On Sat, 13 Jun 2020 10:55:14 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:

[snip]

> > 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? 

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

> 
> --
> Dmitry Kozlyuk

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

* Re: [dpdk-dev] MinGW guide
  2020-06-15  9:25   ` Tal Shnaiderman
@ 2020-06-16 21:34     ` Dmitry Kozlyuk
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kozlyuk @ 2020-06-16 21:34 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Thomas Monjalon, harini.ramakrishnan, dev

On Mon, 15 Jun 2020 09:25:07 +0000
Tal Shnaiderman <talshn@mellanox.com> wrote:

> > Subject: Re: MinGW guide
> > 
> > On Sat, 13 Jun 2020 10:55:14 +0200
> > Thomas Monjalon <thomas@monjalon.net> wrote:  
> 
> [snip]
> 
> > > 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.

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

-- 
Dmitry Kozlyuk

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

end of thread, other threads:[~2020-06-16 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13  8:55 [dpdk-dev] MinGW guide Thomas Monjalon
2020-06-15  0:48 ` Dmitry Kozlyuk
2020-06-15  9:25   ` Tal Shnaiderman
2020-06-16 21:34     ` 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).