[PD-dev] pdlibbuilder and static linking pthread by default on Windows.

IOhannes m zmoelnig zmoelnig at iem.at
Tue Feb 6 16:43:24 CET 2018


On 2018-02-06 16:13, Lucas Cordiviola wrote:
> Also people from linux & osx are not really 
> aware that on Windows/MinGW pthread is an specific file.

i think most are aware that there is a libpthread.so library.
the difference is, that on practically each and any OSX and Linux
system, this file will already be installed, because these systems are
(virtually) POSIX compliant ("pthread" is the POSIX thread implementation).

> This in turn will let the [external] survive when Pd, in some future, 
> will start using a future MinGW pthread implementation.

to put some numbers to the problem:

in Pd-extended, there are 10 out of 112 (different) libraries usable on
Windows in the entire deken repositories that have the libpthread
library included, presumably because they actually need this library.

of these 10 libraries, the following 6 come from the big Pd-extended
import, and have not been updated since (and are presumably unmaintained):
- hidin
- iemxmlrpc
- mrpeach (+ net)
- pdogg
- unauthorized

these two have been re-uploaded since (fwiw, both have been uploaded by
me), but miss the libpthread*.dll.
- bsaylor
- iemnet

and finally these two have been re-uploaded and include a libthread*.dll
- maxlib
- cyclone

> We discussed this but IOhannes & Dan see static linking as something 
> horrible.
> I see that there's no difference in shipping the file or statically 
> include it in the [external].
> I also tested that [externals] that don't use pthread are immune to the 
> -static flag.
> 
> Is there something I'm missing?
> Why not putting a "lifebuoy" by default ?

the more we add to a build system by default, the more fragile it becomes.

https://www.cartoonstock.com/cartoonview.asp?catref=jcen121


> If a dev does not want -static he/she can override it.

the alternative suggestion would have been an "opt-in" to allow those
people who do want static linking of pthread (or whatever) to set that.

> I ask this because I care about Windows Pd and [externals].

it's not like I don't care about Pd and externals to run on Windows.
but I also care about maintainable and clean code (e.g. in the common
parts of the build system).



gfmdasrt
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180206/8a85b2f9/attachment.sig>


More information about the Pd-dev mailing list