The mingw64 cross compiler lacks support at least for "std:future" feature in C++ (https://sourceforge.net/p/mingw-w64/bugs/959/). Debian offers a "posix" variant which implements it.
https://sourceforge.net/p/mingw-w64/bugs/959/ describes the problem.
https://salsa.debian.org/mingw-w64-team/gcc-mingw-w64/-/blob/master/debian/g... explains that there is also a "-posix" variant of the cross compiler toolchain which *has* support for the relevant features.
It turned it we can use the "-posix" variant quite easily and so compilation of Scintilla works again. We need to use the C++ runtime library from the compiler toolchain to be included in the installer which we need to change in the Geany CI build script. Everything else seems to work out of the box.
An alternative approach could be to use https://github.com/meganz/mingw-std-threads which, AFAIU, will implement the missing features for the "-win32" variant of the cross compiler toolchain. Though I couldn't get Scintilla compile against these headers. Either it doesn't work or I did it wrong. You can view, comment on, or merge this pull request online at:
https://github.com/geany/infrastructure/pull/11
-- Commit Summary --
* Builders: Use "posix" variant of the mingw64 cross compiler
-- File Changes --
M builders/Dockerfile.mingw64 (8)
-- Patch Links --
https://github.com/geany/infrastructure/pull/11.patch https://github.com/geany/infrastructure/pull/11.diff
Following the meta-criticism on https://github.com/geany/geany/pull/3568, why can't we make such a change on Geany?
@kugel- approved this pull request.
We could make these changes on the Geany side, I put it here explicitly to ensure we use the same compiler variant for Geany *and* G-P.
Alternatively, we could end up in compiling Geany with the -posix variant and G-P with the -win32 variant which may work or may not. Or we had to duplicate the changes in the G-P build script as well.
But as the G-P binaries loaded directly into Geany, I think we should ensure they are build the same way, at least as far as we can.
Yes they should be built with the same toolchain, whilst most C compiler writers bend over backwards to keep the ABI stable sometimes mismatch happens. And of course there is the `sizeof long` problem.
Aside, I am somewhat surprised that we don't have more problems with Geany being C++ and G-P being C.
Merged #11 into master.
github-comments@lists.geany.org