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.
Clone XMRig using git
# git clone https://github.com/xmrig/xmrig
# cd xmrig
Download and apply patch to support OpenBSD
# curl -O https://w4tchguard.neocities.org/files/openbsd-xmrig-support-patch.txt
# patch -b -p0 < openbsd-xmrig-support-patch.txt
Configure build using CMake
# cmake . -DWITH_ASM=OFF -DWITH_HWLOC=OFF -DWITH_HTTP=OFF
Compile XMRig
# make
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)))
OR
# ulimit -d unlimited
Use the config wizard to create cli options and add --no-color
to fix the missing text in stdout
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
.