[ofw] [Fwd: Re: [openib-general] [Fwd: Re: win related[was:Re:[PATCH 1/2] opensm: sigusr1: syslog() fixes]]]
ftillier at windows.microsoft.com
Tue Feb 20 13:56:11 PST 2007
From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Hal Rosenstock
Sent: Tuesday, February 20, 2007 1:43 PM
On Tue, 2007-02-20 at 16:08, Fab Tillier wrote:
> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Tuesday, February 20, 2007 10:57 AM
> On Tue, 2007-02-20 at 13:56, Fab Tillier wrote:
> [ftillier] This isn't just an install issue - it's a build issue.
> Anyone that wants to build OpenSM will need to find/download/install
> pthreads library so that the build will succeed. If linking
> the resulting executable will not require any special installation.
> It's only an install issue if you link dynamically to pitheads.
OK; then build and install. How big an issue is this ?
I thought DLLs were dynamically linked but I'm a Windows plebe.
[ftillier] When you build, the linker needs the import library for
pthreads so that the functions get resolved as being imported from the
pthreads DLL. The dependency on the pthreads DLL is then created and
the DLL will be loaded dynamically, assuming it can be found in the
So for the build process, you need to have the pthreads library
available to the build tool (path to the lib). This requires installing
the pthreads developer package or however it's done.
If you statically link the pthreads lib, rather than dynamically link,
then all the pthreads goodies go directly into the executable and you
remove the dependency on an external DLL. The build process
requirements are no different than for the dynamically linked case.
There is also the possibility to remove the link-time dependency by
calling GetProcAddress to explicitly resolve the pthreads entrypoints.
This method still requires having the DLL loaded on the user's systems.
Pesonally, I would rather see static linkage to the pthreads library so
that only the builds are affected (something only 'experts' will be
doing), while not affecting the common user.
More information about the ofw