Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 1.58 KB

ubuntu.md

File metadata and controls

78 lines (56 loc) · 1.58 KB
title section
Ubuntu Setup
setup

Setting up Base9 on Ubuntu

Depending on your user privileges, you may have to precede some of the commands in the steps below with sudo.

1. Requirements

To get started with b9 using the Ninja build system, you'll need the following:

  • git
  • build-essential
  • nodejs (Minimum version 4.5.0)
  • npm
  • cmake (Minimum version 3.2.0)
  • ninja

You can install the packages above using the following command:

apt-get update && apt-get install git build-essential nodejs npm cmake

2. Clone the repository and get the submodules

git clone --recursive https://github.com/b9org/b9.git

3. Upgrading node.js

If you are running Ubuntu 16.04 and older, your nodejs may be older than version 4.5, in which case you will need to upgrade it. You can install newer nodejs binaries from NodeSource's PPA using:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
&& sudo apt-get install -y nodejs

Check out this guide for more information on obtaining node.js packages.

You may run nodejs -v to verify that your nodejs version is 4.5.0 or above.

4. Install Esprima

cd b9 \
&& npm install esprima

4. Build b9

mkdir build \
&& cd build \
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. \
&& ninja

5. Run Hello World!

Ensure you're in the build directory and run:

./b9run/b9run ./test/hello.b9mod

6. Test b9

You can run the full b9 test suite with:

ninja test