- Build System
- Generic Build Options
- CPU Build Options
- AMD Build Options
- NVIDIA Build Options
- Compile on Windows
- Compile on Linux
- Compile on FreeBSD
The build system is CMake, if you are not familiar with CMake you can learn more here.
By default the miner will be build with all dependencies. Each optional dependency can be disabled (this will reduce the miner features).
There are two easy ways to set variables for cmake to configure xmr-stak
- use the ncurses GUI
ccmake ..- edit your options
- end the GUI by pressing the key
c(create) and thang(generate)
- set Options on the command line
- enable a option:
cmake .. -DNAME_OF_THE_OPTION=ON - disable a option
cmake .. -DNAME_OF_THE_OPTION=OFF - set a value
cmake .. -DNAME_OF_THE_OPTION=value
- enable a option:
After the configuration you need to compile the miner, follow the guide for your platform:
CMAKE_INSTALL_PREFIXinstall miner to the home foldercmake .. -DCMAKE_INSTALL_PREFIX=$HOME/xmr-stak-cpu- you can find the binary and the
config.txtfile aftermake installin$HOME/xmr-stak-cpu/bin
CMAKE_LINK_STATIClink libgcc and libstdc++ libraries static (default OFF)- disable with
cmake .. -DCMAKE_LINK_STATIC=ON - if you use static compile to run the miner on another system set
-DXMR-STAK_COMPILE=generic
- disable with
CMAKE_BUILD_TYPEset the build type- valid options:
ReleaseorDebug - you should always keep
Releasefor your productive miners
- valid options:
MICROHTTPD_ENABLEallow to disable/enable the dependency microhttpd- there is no http interface available if option is disabled:
cmake .. -DMICROHTTPD_ENABLE=OFF
- there is no http interface available if option is disabled:
OpenSSL_ENABLEallow to disable/enable the dependency OpenSSL- it is not possible to connect to a https secured pool if option is disabled:
cmake .. -DOpenSSL_ENABLE=OFF
- it is not possible to connect to a https secured pool if option is disabled:
XMR-STAK_CURRENCY- compile for Monero(XMR) or Aeon(AEON) usage only e.g.cmake .. -DXMR-STAK_CURRENCY=moneroXMR-STAK_COMPILEselect the CPU compute architecture (default: native)- native means the miner binary can be used only on the system where it is compiled but will archive the highest hash rate
- use
cmake .. -DXMR-STAK_COMPILE=genericto run the miner on all CPU's with sse2
WIN_UACwill enable or disable the "Run As Administrator" prompt on Windows.- UAC confirmation is needed to use large pages on Windows 7.
- On Windows 10 it is only needed once to set up the account to use them.
CPU_ENABLEallow to disable/enable the CPU backend of the minerHWLOC_ENABLEallow to disable/enable the dependency hwloc- the config suggestion is not optimal if option is disabled:
cmake . -DHWLOC_ENABLE=OFF - disabling can be reduce the miner performance
- the config suggestion is not optimal if option is disabled:
OpenCL_ENABLEallow to disable/enable the AMD backend of the miner
CUDA_ENABLEallow to disable/enable the NVIDIA backend of the minerCUDA_ARCHbuild for a certain compute architecture- this option needs a semicolon separated list
cmake .. -DCUDA_ARCH=61orcmake .. -DCUDA_ARCH=20;61- list with NVIDIA compute architectures
- by default the miner is created for all currently available compute architectures
CUDA_COMPILERselect the compiler for the device code- valid options:
nvccorclangif clang 3.9+ is installed
- valid options:
# compile host and device code with clang
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake .. -DCUDA_COMPILER=clang
XMR-STAK_LARGEGRIDuse32or64bit integer for on device indices- default is enabled
- on old GPUs it can increase the hash rate if disabled:
cmake .. -DXMR-STAK_LARGEGRID=OFF - if disabled it is not allowed to use more than
1000threads on the device
XMR-STAK_THREADSgive the compiler information which value forthreadsis used at runtime- default is
0(compile time optimization) - if the miner is compiled and used at runtime with the some value it can increase the hash rate:
cmake .. -DXMR-STAK_THREADS=32
- default is