Getting the xmr-stak-cpu to work on an ubuntu 14.04:
* Compile gcc from scratch and install to /home/user/inst (script)
#!/bin/bash VER=7.2.0 cd WORKDIR=${PWD}/work/gcc-${VER} INSTDIR=${PWD}/inst mkdir -p ${WORKDIR} mkdir -p ${INSTDIR} cd ${WORKDIR} if [ ! -e gcc-${VER}.tar.gz ]; then wget -O gcc-${VER}.tar.gz ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-${VER}/gcc-${VER}.tar.gz fi if [ ! -e gcc-${VER} ]; then tar xvfz gcc-${VER}.tar.gz fi cd gcc-${VER} ./contrib/download_prerequisites # 64bit only ./configure --disable-multilib --prefix=${INSTDIR} && make -j $(grep -c ^processor /proc/cpuinfo) && make install
* Compile cmake from scratch
cd INSTDIR=${PWD}/inst mkdir -p work cd work mkdir -p cmake cd cmake wget https://cmake.org/files/v3.9/cmake-3.9.3.tar.gz tar xvfz cmake-3.9.3.tar.gz cd cmake-3.9.3 CC=${INSTDIR}/bin/gcc CXX=${INSTDIR}/bin/g++ PATH=${INSTDIR}/bin:$PATH ./configure --prefix=${INSTDIR} && LD_LIBRARY_PATH="$HOME/inst/lib64" make -j $(grep -c ^processor /proc/cpuinfo) && LD_LIBRARY_PATH="$HOME/inst/lib64" make install
* Download the xmr-stak-cpu files and compile
cd INSTDIR=${PWD}/inst mkdir -p $HOME/work/xmr cd $HOME/work/xmr git clone https://github.com/fireice-uk/xmr-stak-cpu cd xmr-stak-cpu LD_LIBRARY_PATH="$HOME/inst/lib64" CC=${INSTDIR}/bin/gcc CXX=${INSTDIR}/bin/g++ PATH=${INSTDIR}/bin:$PATH cmake . -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak-cpu -DMICROHTTPD_REQUIRED=OFF && LD_LIBRARY_PATH="$HOME/inst/lib64" make && LD_LIBRARY_PATH="$HOME/inst/lib64" make install
This will compile the file with the new gcc and the new cmake. The result will be installed to $HOME/xmr-stak-cpu, it’s only the executable file and the config.txt.
To run, you must point your LD_LIBRARY_PATH to the correct directory, otherwise you’ll get strange errors:
LD_LIBRARY_PATH="$HOME/inst/lib64" ./xmr-stak-cpu