mxe/mxe

What to do with libraries which require GCC built with posix threads?

tehnick opened this issue · 4 comments

More and more C++ based projects currently begin to use treads implementation from C++11 (<thread>, <mutex>, <future>, etc.). This applies to both end-user programs and libraries.

Applications are out of scope from MXE project: their maintainers may build libraries with any preferable options. MXE already provides all required for this.

As for widely used libraries, the recent examples are: protobuf, qtwebkit (see #2070) and boost (probably optional, I have not tested). New versions of these (and maybe other libraries in not far perspective) will require GCC built with posix threads option, but by default MXE comes with GCC built with win32 and in documentation it is marked as officially supported (vs. experimental support of posix threads).

The question is: what to do with these libraries?

Should we stuck with their current versions forever? Or should update them? But how to do this properly?

I saw few interesting projects like mingw-std-threads, but these program layers are not suitable for building discussed libraries without modifications.

I think we should switch the default over to the posix enabled build, it's really an additional gcc feature and doesn't need a separate toolchain target. Things like exception handling and arch aren't features per se, more like variants that do need separate targets.

There are some packages with disabled non-posix builds (llvm & qtifw) and updates pending for glib and friends. Last time I checked (a few weeks ago), there was only one package broken with the posix build, freeimage shared.

Freeimage is now fixed and I'll start on a PR to switch the default over and update the docs.

I think we should switch the default over to the posix enabled build, it's really an additional gcc feature and doesn't need a separate toolchain target.

Great! This simplifies things a lot.