Compiling DUNE directly on the Raspberry Pi is possible, but soon becomes tedious, as it takes a while. Luckily there is an alternative, cross-compiling. The Raspberry Pi has an available toolchain at GitHub, but it uses a too old version of the gcc compiler, and therefore it will not compile DUNE. The solution to this, is to use the cross-compiler environment that is made for LSTS Glued.
sudo apt-get install docker.io
git clone https://github.com/LSTS/glued.git
cd glued/docker && sudo make && sudo make shell
./mkconfig.bash mariner-01
./mksystem.bash lctr-rpi/mariner-01.bash
./pktoolchain.bash lctr-rpi/mariner-01.bash
exit
mkdir dunebuildrpi && cd dunebuildrpi
[wherisit]
with path to the glued folder just created and [dune_source]
with dune foldercmake -DCROSS=[wherisit]/glued/lctr-rpi/toolchain/bin/armv7-lsts-linux-gnueabihf-gcc [dune_source]
make -j4