Building HPX on the Raspberry running Raspberian
Increase the swap
Generate the swap.imp in some folder where you have sufficient hard disk space.
dd if=/dev/zero of=swap.img bs=1M count=4096
mkswap swap.img
chmod 0600 swap.img
sudo chown root:root swap.img
swapon swap.imgInstall requirements
sudo apt-get install libboost-devel cmake autoconfCompile requirements
Gcc
cd ~
wget https://ftpmirror.gnu.org/gcc/gcc-8.1.0/gcc-8.1.0.tar.gz
tar xf gcc-8.1.0.tar.gz
cd gcc-8.1.0
contrib/download_prerequisites
cd ~
2 mkdir build && cd build
3 ../configure -v --enable-languages=c,c++ --prefix=/usr/local/gcc-8.1.0 --program-suffix=-8.1.0 --with-arch=armv7 --with-fpu=vfp --with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihfBoost
wget 'http://downloads.sourceforge.net/project/boost/boost/1.68.0/boost_1_68_0.tar.bz2'
tar xf boost_1_68_0.tar.bz2
cd boost_1_68_0
./bootstrap.sh --prefix=/home/pi/data/opt/boost
./b2 -j2 install --with-atomic --with-filesystem --with-program_options --with-regex --with-system --with-chrono --with-date_time --with-threadgperftools
git clone https://github.com/gperftools/gperftools.git
cd gperftools
./autogen.sh
mkdir build && cd build
../configure --enable-minimal --prefix=/home/pi/data/opt/gpfer/
make
make installCompile hpx
https://github.com/STEllAR-GROUP/hpx.git
cd hpx
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/hpx -DBOOST_ROOT=/home/pi/data/opt/boost \
-DTCMALLOC_INCLUDE_DIR=/home/pi/data/opt/gpfer/include/ \
-DTCMALLOC_LIBRARY=/home/pi/data/opt/gpfer/lib/libtcmalloc_minimal.so \
-DHPX_WITH_GENERIC_CONTEXT_COROUTINES=ON \
..
makeNote, that the compilation of hpx consums plenty of memory and therfore you should use only one core.