macOS

You can use official binary downloads for this OS, with macos-x64 suffix.

Preparation

You need to install Homebrew if it is not installed already.

Basic build

Basic build is good for local machine, because it is easy, but if you need to run the miner on other machines please take a look at advanced build.

1. brew install cmake libuv openssl hwloc
2. git clone https://github.com/xmrig/xmrig.git
3. mkdir xmrig/build && cd xmrig/build
4. cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
5. make -j$(sysctl -n hw.logicalcpu)

Advanced build

We use build.hwloc.sh script to build recent version of hwloc as static library.

1. brew install cmake wget automake libtool autoconf
2. git clone https://github.com/xmrig/xmrig.git
3. mkdir xmrig/build && cd xmrig/scripts
4. ./build.hwloc.sh && cd ../build
5. cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DHWLOC_INCLUDE_DIR=../scripts/deps/include -DHWLOC_LIBRARY=../scripts/deps/lib/libhwloc.a
6. make -j$(sysctl -n hw.logicalcpu)

Use command otool -L xmrig to verify binary dependencies.