Update Readme.md with linux instructions
This commit is contained in:
parent
ecc809ef30
commit
5b4026a300
69
Readme.md
69
Readme.md
|
@ -6,6 +6,8 @@ The next generation OONI Probe Command Line Interface.
|
||||||
|
|
||||||
## Development setup
|
## Development setup
|
||||||
|
|
||||||
|
Be sure you have golang >= 1.8.
|
||||||
|
|
||||||
This project uses [`dep`](https://golang.github.io/dep/) with the `vendor/` dir
|
This project uses [`dep`](https://golang.github.io/dep/) with the `vendor/` dir
|
||||||
in `.gitignore`.
|
in `.gitignore`.
|
||||||
|
|
||||||
|
@ -16,20 +18,71 @@ dep ensure
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, you'll need a recent version of [Measurement Kit](http://github.com/measurement-kit).
|
Next, you'll need a recent version of [Measurement Kit](http://github.com/measurement-kit).
|
||||||
As this is a work in progress, you'll likely need to build a version of the
|
|
||||||
library from source.
|
|
||||||
|
|
||||||
You should then be able to build a ooni binary by running:
|
Building a ooni binary for windows and macOS is currently only supported on a
|
||||||
|
macOS system.
|
||||||
|
|
||||||
|
For building a linux ooni binary, you will need a linux system and follow the
|
||||||
|
intruction in the linux section.
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
On macOS you can build a windows and macOS ooni binary.
|
||||||
|
|
||||||
|
This can be done by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
make update-mk-libs
|
||||||
|
```
|
||||||
|
|
||||||
|
This will download the prebuilt measurement-kit binaries.
|
||||||
|
|
||||||
|
Then you can build a macOS build by running:
|
||||||
|
|
||||||
```
|
```
|
||||||
make build
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
And a windows build by running:
|
||||||
If you want to build gooni against a development version of MK without
|
|
||||||
installing it to your system, you can explicitly specify the path where MK
|
|
||||||
was built as
|
|
||||||
|
|
||||||
```
|
```
|
||||||
CGO_LDFLAGS="-L/path/to/measurement-kit/.libs/" CGO_CFLAGS="-I/path/to/measurement-kit/include" make build
|
make build-windows
|
||||||
|
```
|
||||||
|
|
||||||
|
### linux
|
||||||
|
|
||||||
|
On linux you will have to make your own build of measurement-kit and the
|
||||||
|
required dependencies.
|
||||||
|
|
||||||
|
The following instructions have been tested on debian stretch, but should work
|
||||||
|
on any other modern debian equivalent with minor tweaks.
|
||||||
|
|
||||||
|
Install the required depedencies:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt-get install git build-essential cmake autoconf libtool golang libc++-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: be sure you have golang at >= 1.8 (debian stretch means using backports).
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/measurement-kit/script-build-unix.git
|
||||||
|
cd script-build-unix
|
||||||
|
```
|
||||||
|
|
||||||
|
Then build measurement-kit as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
./build-linux geoip-api-c
|
||||||
|
./build-linux libressl
|
||||||
|
./build-linux libevent
|
||||||
|
./build-linux measurement-kit
|
||||||
|
```
|
||||||
|
|
||||||
|
You should now have a set of compiled libraries inside of `MK_DIST`. Take this and copy it into `vendor/github.com/measurement-kit/go-measurement-kit/libs/linux`.
|
||||||
|
|
||||||
|
It should now be possible to build ooni by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
make build
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user