BUILD SYSTEMS AND PACKAGE MANAGERS

Buck

Article by:
Date Published:
Last Modified:

Installation

Ubuntu

This was tested on Ubuntu 16.04.

Install aptitude managed dependencies:

1
$ sudo apt install -y ant openjdk-8-jdk python2.7

Install Watchman:

1
2
3
4
5
6
$ git clone https://github.com/facebook/watchman.git
$ cd watchman/
$ sudo apt-get install -y autoconf automake build-essential python-dev
$ ./autogen.sh 
$ ./configure 
$ sudo make install

Clone/build/install Buck:

1
2
3
4
$ git clone https://github.com/facebook/buck.git
$ cd buck
$ ant
$ .\bin\buck build --show-output buck
NOTE

As of Buck v2018.02.16.01, python 2.7 is required. If you try a build will python v3.x, you will get the following error when running the ant command:

1
2
3
gen-buck-info:
    ...
    [exec] TypeError: Object of type 'bytes' is not JSON serializable

If the above command completes successfully, you will have the buck executable located at ./bin/buck. This build system does not install it into system folders on your machine, so you will probably want to add ./bin/buck to your path so you can just type buck at the command line.

Basic Example

The most basic Buck-based project example requires two Buck specific files: .buckconfig and a BUCK file.

Example Project

An example C++ project built using Buck can be found on GitHub at https://github.com/njlr/buck-cpp-example.


Authors

Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Tags

    comments powered by Disqus