Skip to content

Instantly share code, notes, and snippets.

@lvaylet
Created April 18, 2018 13:37
Show Gist options
  • Save lvaylet/3712a4fc599ce49989976f03d7eaba28 to your computer and use it in GitHub Desktop.
Save lvaylet/3712a4fc599ce49989976f03d7eaba28 to your computer and use it in GitHub Desktop.

Compile Apache MiNiFi 0.4.0 C++ for alpine-based image on Raspberry Pi 3.

# ----- Instantiate an immutable Debian container for compilation ----- #
# Bind mount a shared volume to store the binary once it is built.
docker run -it --rm -v `pwd`:/build resin/raspberrypi3-debian /bin/bash

# ----- Inside the Debian container ----- #
apt update && apt install git build-essential
git clone https://github.com/apache/nifi-minifi-cpp
cd nifi-minifi-cpp/
# Bootstrap with provided script
# -n to force yes to all prompts (including the package installation prompts)
# -b to automatically run `make` once the `cmake` process is complete
# -p to automatically run `make package`.
./bootstrap.sh -n -b -p
# Press `F` to enable Kafka Support, `L` to enable MQTT Support and finally `P` to continue
cp build/nifi-minifi-cpp-0.4.0-bin.tar.gz /build
exit

The newly built MiNiFi binary should show up in the current directory. It can then be uploaded to the remote PCM3 for testing, for example with http://transfer.sh

# On build machine:
curl --upload-file nifi-minifi-cpp-0.4.0-bin.tar.gz https://transfer.sh/nifi-minifi-cpp-0.4.0-bin.tar.gz
# On Resin device:
curl https://transfer.sh/Uhmc4/nifi-minifi-cpp-0.4.0-bin.tar.gz -o nifi-minifi-cpp-0.4.0-bin.tar.gz

Notes

This error shows up at the beginning, before the actual build:

E: Unable to locate package libssl1.0-dev
E: Couldn't find any package by regex 'libssl1.0-dev'

apt install libssl-dev does not fix it. However, the build process still succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment