Page MenuHome GnuPG

Gpg4win: Switch to pthreads (mingw-posix) as the default compiler variant
Closed, ResolvedPublic

Description

Hi Werner,

with the gpg4win-4.2.0 release I had trouble again because of different thread implementations used which apparently caused some kind of c++ ABI break when the okular pdf "plugin" was loaded. With std::async in c++11 its a bit of a mess with the different implementations.

Since ~6 months all my development builds of Gpg4win use the equivalent of debians i686-w64-mingw32-gcc-posix the only disadvantage I saw was that the 64bit binaries from us also have a dependency on libwinpthreads.dll but otherwise we already ship it for x86 since some of our parts require it explicitly (even GPGME afaik)

This is only for Gpg4win, so not for the critical parts like gcrypt / gnupg / npth etc.

I just wanted to note this down as a ticket so that its not forgotten before the next release.

Event Timeline

aheinecke created this task.

Need to do this for the docker image and this way document how to do that with update alternatives. For our build setup it made most sense to manually link it only for the Gpg4win build user and not a system wide change.

After a lot of struggle, since it was not enough to just link g++ but also needed others like gcc and ar etc. I was able to use our release build system to build a working installer that can open PDF files with the latest okular / poppler work branches.

So this works for me now. The user where we build gpg4win has local diversions in ~/bin so as to not affect the GnuPG builds in any way and in the dockerfile we use update-alternatives to select the posix flavor.

This creates working builds with the async changes in poppler etc.