build2 | Installation FAQ

Why no binaries?
Are the install scripts secure?
Which compilers are supported?
Why am I getting strange errors on Windows?

Why no binaries?

Several reasons:

  1. The build2 toolchain has to be compiled with exactly the same compiler as what's available on your machine since it may need to build and dynamically load additional components later.
  2. After the initial installation the toolchain is normally upgraded from the package repository which requires compiling from source.
  3. If we cannot reliably and reasonably easily build from source on all the major platforms, then we probably shouldn't be making build tools.

Are the install scripts secure?

The automated install scripts download everything over HTTPS. They also contain embedded SHA256 checksums which they use to verify every downloaded package. So if you have verified the SHA256 checksum for the script itself, then everything should be reasonably secure.

Which compilers are supported?

GCC 4.9, Clang 3.4, and MSVC 14 (2015) Update 3 or any later versions of these compilers.

The build2-install.sh script allows specifying an alternative C++ compiler with the --cxx option, for example:

$ sh build2-install-X.Y.Z.sh --cxx g++-8

Note also that the compiler you use to build the build2 toolchain and those that you will be using to build your projects don't have to be the same. For example, you can build build2 with MinGW GCC and then use it to build your own projects with MSVC.

Why am I getting strange errors on Windows?

Sometimes you may encounter strange errors when running the install scripts on Windows. These include the inability to create/copy/move/delete files or directories (usually due to "Access Denied") or certain programs crashing with the cryptic "cygheap base mismatch detected" message. Oftentimes, if you try to perform the same action manually, it succeeds.

While the exact reasons are usually difficult to pinpoint, generally this is believed to be caused by other programs interfering with the files and/or programs we are trying to use. The two well-known offenders are Windows Defender and Windows Search Indexer but third-party anti-virus and anti-spyware programs are also known to cause this.

One possible solution to this problem is to disable all such programs either entirely or for the directories used by build2 (for example, the build directory and the installation directory). If this is not possible/desirable (or does not help), the only other alternative is to keep retrying the installation process, perhaps using different installation and/or build directories.