Compile XMRig on OpenBSD

XMRig is a popular miner for Monero however there is no official OpenBSD support. This guide will take you though getting XMRig compiled and running on an OpenBSD system.


Build XMRig

  1. Clone XMRig using git

    # git clone
    # cd xmrig
  2. Download and apply patch to support OpenBSD

    # curl -O
    # patch -b -p0 < openbsd-xmrig-support-patch.txt
  3. Configure build using CMake

  4. Compile XMRig

    # make

Run XMRig

  1. Depending on the amount RAM your system has you will have to set your data seg size higher then XMRig requests or you can set it to umlimited

    # ulimit -d $(((${MEMORY_IN_GB}*1024*1024)))
    # ulimit -d unlimited
  2. Use the config wizard to create cli options and add --no-color to fix the missing text in stdout

  3. Run XMRig

    # ./xmrig --no-color ${XMRIG_OPTIONS}


Most of this patch came from this PR and I figured out what was causing the Segmentation fault.