Mac Full Node

From Mochimo Wiki
Jump to: navigation, search

This guide provides instructions on how to run a full node on macOS.

Setting Up Mochimo 2.0 on macOS

Disclaimer:

This tutorial was written for and tested on macOS 10.13.6 (High Sierra) but it should work on any macOS version up to 10.13.6. that supports both the Nvidia Web Drivers and the CUDA Toolkit. At the time of writing, macOS 10.14. (Mojave) is not supported properly as Nvidia has not yet released the compatible Web Drivers and the corresponding CUDA Toolkit.

Prerequisites:

In order to successfully setup Mochimo 2.0 on macOS you will need to download and install the specific versions of:
Xcode
Command Line Tools for Xcode
Nvidia Web Drivers
Nvidia CUDA Drivers

Installing Xcode and Command Line Tools for Xcode:

To install you first need to determine the specific versions of Xcode and Command Line Tools for Xcode needed to correctly run and install the CUDA Toolkit version compatible with your macOS version. You can determine this by visiting the CUDA Toolkit Archive Documentation website and reading the documentation for the CUDA Toolkit version compatible with your macOS version (or the one you plan to install).
Please note that you need to install the exact versions specified in the document. At the time of writing the latest compatible CUDA Toolkit version was 10.0 which requires Xcode 9.4 and Command Line Tools for Xcode 9.4.
It is likely that the versions of both Xcode and Command Line Tools for Xcode required to run the selected CUDA Toolkit will be outdated and that your currently installed versions of both of them will not be compatible with the selected CUDA Toolkit. In the case that the required and currently installed versions are the same you can skip the remainder of this section. In the case that they are not we will need to install compatible versions alongside the existing versions.

Installation Procedure

Download the required versions from the Apple Developer website (you will need to sign in with your Apple ID).
After downloading, extract Xcode from the downloaded package, rename it from Xcode to Xcode9.4 (or similar for your downloaded version) and move it to the /Applications folder.
Run and install the downloaded Command Line Tools for Xcode.
Run Xcode9.4 from the /Applications folder and wait for it to finish setting up. After that, go to Xcode -> Preferences -> Locations and under Command Line Tools select Xcode 9.4.
Check that everything is working correctly by running xcode-select -p in Terminal. The output should be something like /Applications/Xcode9.4.app/Contents/Developer.
You are done setting up Xcode and Command Line Tools for Xcode.

Installing Nvidia Web Drivers and CUDA Toolkit

To install the Nvidia Web Drivers and the CUDA Toolkit first download the latest compatible Web Drivers (download from a mirror on tonymacx86.com) and the latest compatible CUDA Toolkit (download from Nvidia’s website) for your version of macOS.

Installation Procedure

Run the the Web Driver installer and complete the installation.
Run the CUDA Toolkit installer and complete the installation.
Set the correct environment variables in your .bash_profile. Open Terminal and run sudo nano .bash_profile and add the following two lines to the end (note that you will need to change these depending on the installed CUDA Toolkit version):
export PATH=/Developer/NVIDIA/CUDA-10.0/bin${PATH:+:${PATH}} export \ DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-10.0/lib\${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Hit CTRL+X, enter Y to overwrite the file and press return to confirm. Then quit and open Terminal again.
To check that everything is working correctly run nvcc --version in Terminal. The output should be something like:
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:56_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
If you need more help you can read the official CUDA Installation Guide for macOS from Nvidia.

Configuring Mochimo 2.0

Now that we have the requirements working we need to download or clone the latest Mochimo version from Github and modify the makeunx file found it the /src folder.
After downloading, open the makeunx file in your favourite text editor. We will need to edit the line export set CC="cc -DUNIXLIKE -DLONG64 -I/usr/lib -L/usr/local/cuda-9.2/lib64 $2 $3 $4 $5 $6 $7 $8 $9" found right at the top.
We need to modify this line to point to the correct lib path of our CUDA Toolkit installation. Additionally, we will need to use the -rpath flag and point it to the aforementioned path as well. For CUDA Toolkit 10.0 the default lib path is /usr/local/cuda/lib.
After determining the correct path, change the line to something like:

export set CC="cc -DUNIXLIKE -DLONG64 -I/usr/lib -rpath /usr/local/cuda/lib -L/usr/local/cuda/lib $2 $3 $4 $5 $6 $7 $8 $9" and save.

You can now follow the README found in the root Mochimo folder to create your wallet and start mining!

Troubleshooting & FAQ

For frequently encountered issues and troubleshooting, see our Troubleshooting_FAQ.