{"id":489,"date":"2017-06-10T18:00:23","date_gmt":"2017-06-10T16:00:23","guid":{"rendered":"https:\/\/www.anginf.de\/?p=489"},"modified":"2017-09-29T20:52:50","modified_gmt":"2017-09-29T18:52:50","slug":"mining-monero-on-old-ubuntu","status":"publish","type":"post","link":"https:\/\/www.anginf.de\/?p=489","title":{"rendered":"Mining Monero on old Ubuntu"},"content":{"rendered":"<p>Getting the xmr-stak-cpu to work on an ubuntu 14.04:<\/p>\n<p>* Compile gcc from scratch and install to \/home\/user\/inst (script)<\/p>\n<pre lang=\"bash\">\r\n#!\/bin\/bash\r\nVER=7.2.0\r\ncd\r\nWORKDIR=${PWD}\/work\/gcc-${VER}\r\nINSTDIR=${PWD}\/inst\r\nmkdir -p ${WORKDIR}\r\nmkdir -p ${INSTDIR}\r\ncd ${WORKDIR}\r\nif [ ! -e gcc-${VER}.tar.gz ]; then\r\n\twget -O gcc-${VER}.tar.gz ftp:\/\/ftp.gwdg.de\/pub\/misc\/gcc\/releases\/gcc-${VER}\/gcc-${VER}.tar.gz\r\nfi\r\nif [ ! -e gcc-${VER} ]; then\r\n\ttar xvfz gcc-${VER}.tar.gz\r\nfi\r\ncd gcc-${VER}\r\n.\/contrib\/download_prerequisites\r\n# 64bit only\r\n.\/configure --disable-multilib --prefix=${INSTDIR} && make -j $(grep -c ^processor \/proc\/cpuinfo) && make install \r\n<\/pre>\n<p>* Compile cmake from scratch<\/p>\n<pre lang=\"bash\">\r\ncd\r\nINSTDIR=${PWD}\/inst\r\nmkdir -p work\r\ncd work\r\nmkdir -p cmake\r\ncd cmake\r\nwget https:\/\/cmake.org\/files\/v3.9\/cmake-3.9.3.tar.gz\r\ntar xvfz cmake-3.9.3.tar.gz\r\ncd cmake-3.9.3\r\nCC=${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\r\n<\/pre>\n<p>* Download the xmr-stak-cpu files and compile<\/p>\n<pre lang=\"bash\">\r\ncd\r\nINSTDIR=${PWD}\/inst\r\nmkdir -p $HOME\/work\/xmr\r\ncd $HOME\/work\/xmr\r\ngit clone https:\/\/github.com\/fireice-uk\/xmr-stak-cpu\r\ncd xmr-stak-cpu\r\nLD_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\r\n<\/pre>\n<p>This will compile the file with the new gcc and the new cmake. The result will be installed to $HOME\/xmr-stak-cpu, it&#8217;s only the executable file and the config.txt.<\/p>\n<p>To run, you must point your LD_LIBRARY_PATH to the correct directory, otherwise you&#8217;ll get strange errors:<\/p>\n<pre lang=\"bash\">\r\nLD_LIBRARY_PATH=\"$HOME\/inst\/lib64\" .\/xmr-stak-cpu\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/www.anginf.de\/?p=489\" class=\"more-link\"><span class=\"screen-reader-text\">Mining Monero on old Ubuntu<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489"}],"version-history":[{"count":14,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}