Skip to content

Installing

The development version of the Birch compiler, the Birch standard library and the Birch examples are available from GitHub. There are no stable releases available as yet.

To clone the repositories, use:

git clone https://github.com/lawmurray/Birch.git
git clone https://github.com/lawmurray/Birch.Standard.git
git clone https://github.com/lawmurray/Birch.Example.git

Install dependencies

Birch requires:

  • GNU autoconf, automake and libtool,
  • the Flex lexer,
  • the Bison parser generator,
  • the Boost libraries, and
  • the Eigen 3 linear algebra library.

These are all widely available through package managers. See the guides for Ubuntu Linux, macOS and Windows 10.

Install the compiler

Run the following commands from within the Birch directory:

./autogen.sh
./configure
make
make install

Tip

You may need to use sudo make install for the last line to elevate to root permissions, if you are installing from a user account that does not have permissions for a system-wide install.

Tip

To speed up the build, you can use make -j 8 on the third line, replacing 8 with a number of threads to run in parallel.

Install the standard library

Run the following from within the Birch.Standard directory:

birch build
birch install

Tip

Similarly again, you may need to use sudo birch install for the last line.

Tip

You can also run birch test afterwards to confirm that the standard library is working correctly.

Install the examples (optional)

Run the following from within the Birch.Example directory:

birch build
birch install

Tip

Similarly again, you may need to use sudo birch install for the last line.