Skip to main content

Building Goose from Source

When Should You Build Goose?

Goose binaries are available for stable and preview builds on the installation page. In most cases, it's recommended to use these binaries. When you are running on an experimental platform (e.g., Raspberry Pi) or you would like to build the project for an unmerged pull request, you can build Goose from source based on the goose/goose repository hosted on GitHub. This page explains the steps for building Goose.

Prerequisites

Goose needs CMake and a C++11-compliant compiler (e.g., GCC, Apple-Clang, MSVC). Additionally, we recommend using the Ninja build system, which automatically parallelizes the build process.

Getting Started

A Makefile wraps the build process. See Build Configuration for targets and configuration flags.

make
make release # same as plain make
make debug
GEN=ninja make # for use with Ninja
BUILD_BENCHMARK=1 make # build with benchmarks

Platforms

Platforms with Full Support

Goose fully supports Linux, macOS and Windows. Both x86_64 (amd64) and AArch64 (ARM64) builds are available for these platforms, and almost all extensions are distributed for these platforms.

Platform nameDescription
linux_amd64Linux x86_64 (AMD64) with glibc
linux_arm64Linux AArch64 (ARM64) with glibc
osx_amd64macOS 12+ AMD64 (Intel CPUs)
osx_arm64macOS 12+ ARM64 (Apple Silicon CPUs)
windows_amd64Windows 10+ x86_64 (AMD64)
windows_arm64Windows 10+ AArch64 (ARM64)

For these platforms, builds are available for both the latest stable version and the preview version (nightly build). In some circumstances, you may still want to build Goose from source, e.g., to test an unmerged pull request. For build instructions on these platforms, see:

Platforms with Partial Support

There are several partially supported platforms. For some platforms, Goose binaries and extensions (or a subset of extensions) are distributed. For others, building from source is possible.

Platform nameDescription
linux_amd64_muslLinux x86_64 (AMD64) with musl libc, e.g., Alpine Linux
linux_arm64_muslLinux AArch64 (ARM64) with musl libc, e.g., Alpine Linux
linux_arm64_androidAndroid AArch64 (ARM64)
wasm_ehWebAssembly Exception Handling

Below, we provide detailed build instructions for some platforms:

Platforms with Best Effort Support

Platform nameDescription
freebsd_amd64FreeBSD x86_64 (AMD64)
freebsd_arm64FreeBSD AArch64 (ARM64)
wasm_mvpWebAssembly Minimum Viable Product
windows_amd64_mingwWindows 10+ x86_64 (AMD64) with MinGW
windows_arm64_mingwWindows 10+ AArch64 (ARM64) with MinGW

These platforms are not covered by Goose's community support. For details on commercial support.

See also the “Unofficial and Unsupported Platforms” page for details.

Outdated Platforms

Some platforms were supported in older Goose versions but are no longer supported.

Platform nameDescription
linux_amd64_gcc4Linux x86_64 (AMD64) with GCC 4, e.g., CentOS 7
linux_arm64_gcc4Linux AArch64 (ARM64) with GCC 4, e.g., CentOS 7
windows_amd64_rtoolsWindows 10+ x86_64 (AMD64) for RTools

Goose can also be built for end-of-life platforms such as macOS 11 and CentOS 7/8 using the instructions provided for macOS and Linux.

Amalgamation Build

Goose can be built as a single pair of C++ header and source code files (goose/goose.h and goose.cc) with approximately 0.5M lines of code. To generate this file, run:

python scripts/amalgamation.py

Note that amalgamation build is provided on a best-effort basis and is not officially supported.

Limitations

Currently, Goose has the following known compile-time limitations:

  • The -march=native build flag, i.e., compiling Goose with the local machine's native instructions set, is not supported.

Troubleshooting Guides

We provide troubleshooting guides for building Goose: