Cross-compiling to aarch64

Some info about cross-compiling libsodium and safe_vault from x64 (ubuntu 16.04 64 bit) to aarch64 (pine64 soc running debian 64 bit)

Install dependencies #

$ sudo apt-get install gcc-aarch64-linux-gnu

Compile libsodium (v1.0.9) #

No longer required since commit #56fca57. Also see the forum post about this.

$ cd ~/Downloads
$ wget
$ tar xfz libsodium-1.0.9.tar.gz
$ rm libsodium-1.0.9.tar.gz
$ cd libsodium-1.0.9
$ export CFLAGS='-Os'
$ CC=aarch64-linux-gnu-gcc ./configure --enable-shared=no --host=aarch64-unknown-linux-gnu
$ make clean
$ make
$ sudo make install

Configure rust for aarch64 #

ensure ~/.cargo/config has these two lines

linker = "aarch64-linux-gnu-gcc"

Then run these commands to install the aarch64 environment for rust (must use rustup)

$ source ~/.cargo/env
$ rustup target add aarch64-unknown-linux-gnu

Build the vault #

$ cd /path/to/safe_vault
$ export SODIUM_LIB_DIR=/usr/local/lib
$ cargo build --release --target=aarch64-unknown-linux-gnu

The aarch64 vault binary is available in the following location

$ cd /path/to/safe_vault/aarch64-unknown-linux-gnu/release

Further reading #


Now read this

JavaEE Setup on Ubuntu 14.04

Guide for n00bs, which I am when it comes to JavaEE. Assuming a fresh and up-to-date installation of Ubuntu 14.04 Install Java - this is the runtime environment so your java application can be executed. I tried using openjdk from the... Continue →