Private
Public Access
2
0

building.md: Update building docs

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-08-30 15:53:39 +01:00
parent 1591b92605
commit 8a93351f0e

View File

@@ -11,13 +11,14 @@ what you'll need:
* [SWIG](http://swig.org) 3.0.5+ * [SWIG](http://swig.org) 3.0.5+
* [git](http://git-scm.com) * [git](http://git-scm.com)
* [python](http://python.org) 2.7 or 3.4+ (you'll need not just the interpreter but python-dev) * [python](http://python.org) 2.7 or 3.4+ (you'll need not just the interpreter but python-dev)
* [node.js](http://nodejs.org) 0.10.x or 0.12.x (you'll need not just the interpreter but nodejs-dev) * [node.js](http://nodejs.org) 4.x recommended (you'll need not just the interpreter but nodejs-dev)
* [CMake](http://cmake.org) 2.8.8+ (3.1+ is recommended for node.js version 2+) * [CMake](http://cmake.org) 2.8.8+ (3.1+ is recommended for node.js version 2+)
* [json-c](https://github.com/json-c/json-c) 0.12+ (0.10+ probably works in reality)
For Debian-like distros the below command installs the basic set: For Debian-like distros the below command installs the basic set:
```bash ```bash
sudo apt-get install git build-essential swig3.0 python-dev nodejs-dev cmake sudo apt-get install git build-essential swig3.0 python-dev nodejs-dev cmake libjson-c-dev
``` ```
To build the documentation you'll also need: To build the documentation you'll also need:
@@ -52,8 +53,9 @@ Currently our install logic puts Python bindings into standard paths, which
do not work on Debian due to their do not work on Debian due to their
[policy](http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html#s-paths). [policy](http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html#s-paths).
We are working on a permanent solution, in the meanwhile please use this command We are working on a permanent solution, in the meantime please use this command
after `make install` to link installed modules where Debian's Python expects them: after `make install` to link installed modules where Debian's Python expects
them:
```bash ```bash
sudo ln -s <your install prefix, e.g. /usr>/lib/python2.7/site-packages/* /usr/lib/python2.7/dist-packages sudo ln -s <your install prefix, e.g. /usr>/lib/python2.7/site-packages/* /usr/lib/python2.7/dist-packages
@@ -91,6 +93,10 @@ Disabling Python module building:
Building doc, this will require [SPHINX](http://sphinx-doc.org) & Building doc, this will require [SPHINX](http://sphinx-doc.org) &
[Doxygen](http://doxygen.org): [Doxygen](http://doxygen.org):
`-DBUILDDOC=ON` `-DBUILDDOC=ON`
You will also require clone git submodules from your existing checkout:
`git submodule update --init --recursive`
The from doxygen2jsdoc dir:
`npm install mkdirp commander lodash bluebird pegjs`
Override build architecture (this is useful because on x86 ARM code is not Override build architecture (this is useful because on x86 ARM code is not
compiled so use this flag to force the target arch) compiled so use this flag to force the target arch)
@@ -102,19 +108,13 @@ You'll need at least SWIG version 3.0.2 and we recommend 3.0.5 to build the
JavaScript & Python modules. If your version of SWIG is older than this then JavaScript & Python modules. If your version of SWIG is older than this then
please see above for disabling `SWIGNODE`. Otherwise you will get a weird build please see above for disabling `SWIGNODE`. Otherwise you will get a weird build
failure when building the JavaScript module. The Python module builds with SWIG failure when building the JavaScript module. The Python module builds with SWIG
2.x. 2.x but we don't test it.
During the build, we'll assume you're building from git, note that if you During the build, we'll assume you're building from git, note that if you
compile with `git` installed your version of mraa will be tagged `-dirty`. This compile with `git` installed your version of mraa will be versioned with `git
simply means `git` wasn't installed or that you where building from a tarball. desribe --tag` to make it easy for intentification. You can easily modify
You can modify `build/src/version.c` before running `make` if this is incorrect. version.c in build/src. If you don't build from a git tree then you will simply
The instructions listed here all assume that `build/` is an empty dir that lives have a version which matches the latest released version of mraa.
inside the cloned repository of mraa.
If you have multiple versions of Python then mraa can get confused, we
recommend using virtualenv to select which version of Python you want. We test
2.7 the most but SWIG will generate valid 3.x Python code but we do not
generally support building both at once.
## Using a Yocto/OE toolchain ## Using a Yocto/OE toolchain
@@ -131,7 +131,6 @@ make
## Using Coverity ## Using Coverity
Static analysis is routinely performed using Coverity on libmraa's codebase.
This is the procedure to submit a build to Coverity. You'll need to install This is the procedure to submit a build to Coverity. You'll need to install
`coverity-submit` for your OS. `coverity-submit` for your OS.