[build2] Freezing with MSYS2

Boris Kolpackov boris at codesynthesis.com
Tue Oct 8 12:06:08 UTC 2019

David Cohoe <sudgylacmoe at gmail.com> writes:

> Anyway, I went back to trying to get the .sh version working, and
> realized the issue is that MSYS2 provides its own gcc that is not the
> gcc that you install as a package.  I installed that package, and
> while the .sh script still gives an undefined reference (it got
> further than before), this new gcc works with the old build2 that I
> had built earlier with build2's gcc.  So, my problem has been
> resolved, but if you want to try to figure out more, I can still try
> to help.

I am happy to leave it at that seeing that things are working for
you (plus my head spins a bit from all the GCC's you have flying
around ;-)).

More generally, this is how you do things on Windows:

1. You would only use the build2-install batch files if you are using
   one of the "default" configurations (i.e., either MSVC or MinGW with
   GCC provided by build2-mingw package).

   Specifically, you would never use the build2-install.sh script on

2. Otherwise, you would use one of the more manual procedures as
   described in the Installation and Upgrade manual[1]. Specifically:

   2.1 You would use the "UNIX way" of building things (i.e., the
       build.sh script from build2-toolchain or the equivalent manual
       steps) only if you have UNIX emulation with proper shell, etc.,
       such as MSYS2, Cygwin, or WSL. Note that in this case you should
       probably also use the corresponding compiler as well (i.e., MSYS2
       GCC and not MinGW GCC).

       Having said that, we ourselves don't test these configurations
       and there could be issues, unsurprisingly, I must add, since
       at least the first two (MSYS2 and Cygwin) are just hacks. But
       we are prepared to work with the community to resolve these
       issues, provided the fixes/workarounds are reasonable.

   2.2 You should be able to use your own MinGW GCC (either with
       build-mingw.bat or the equivalent manual steps) provided it
       is functional enough (threading model, etc). Specifically,
       GCC that comes in the build2-mingw package is stock MSYS2
       MinGW GCC so you should be able to use any reasonably recent

[1] https://build2.org/build2-toolchain/doc/build2-toolchain-install.xhtml

More information about the users mailing list