OS X Guide
The instructions in Gridcoin's code base for installing on OS X are rather old. For building Gridcoin on any OS X operating system, you must have Xcode tools installed. You can install them from the App Store application. After Xcode has been installed, open it and accept the license agreement (better to do this now than later)
- 1 With Homebrew (recommended)
- 2 Yosemite (OS X 10.10)
- 3 Download and Install command line tools
- 4 Download and Install Homebrew
With Homebrew (recommended)
The easiest way to install Gridcoin on OSX is to use the community supported Homebrew tap Git-Jiro/jiro.
Be sure to have Xcode installed first if you don't already have before trying install grid coin. Also in your Xcode's Preferences -> Locations -> Command Line Tools be sure that an SDK is selected or you will encounter a "Project ERROR: Could not resolve SDK Path for 'macosx'" error on install.
If you don't have homebrew installed you can get it from here: brew.sh
Steps to install:
1. Tap the Git-Jiro/jiro repository
brew tap git-jiro/jiro
2. Install gridcoin
brew install gridcoin
The current homebrew formula depends on a prior version of QT4 which conflicts with any other QT installation. To install Gridcoin with homebrew, all other versions of QT need to be uninstalled.
Yosemite (OS X 10.10)
Open the Terminal application from the Applications folder, or by pressing Command+Space and then typing in "terminal", followed by hitting the ENTER key. Type in these following commands into the Terminal window.
Note: If you have trouble compiling the application on Yosemite you can try this solution as well.
Download and Install command line tools
xcode-select --install // This will open a pop up window saying to install select you must install command line tools. Do this, takes a few minutes to download //
Download and Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew update brew doctor
Download and Install prerequisites for Gridcoin
brew install boost berkeley-db4 openssl miniupnpc qrencode libzip sudo mkdir -p /opt/local/include cd /opt/local/include sudo ln -s /usr/local/Cellar/berkeley-db4/4.8.30/include db48 sudo ln -s /usr/local/Cellar/miniupnpc/2.0/include/miniupnpc/* . // Replace 2.0 with whatever version is installed by brew. At this time 2.0 was current. sudo ln -s /usr/local/Cellar/boost/1.60.0_2/include/boost boost // Replace 1.60.0_2 with whatever version was installed by brew. You can check this by typing cd /usr/local/Cellar/boost ENTER then type ls ENTER whatever the folder is numbered is what you would replace 1.60.0_2 with // sudo ln -s /usr/local/Cellar/openssl/1.0.2d_1/include/* . sudo ln -s /usr/local/Cellar/libzip/1.1.2/include/*.* . sudo ln -s /usr/local/Cellar/libzip/1.1.2/lib/libzip/include/zipconf.h // Replace 1.1.2 with whatever version was installed by brew. You can check this by typing cd /usr/local/Cellar/libzip ENTER then type ls ENTER whatever the folder is numbered is what you would replace 1.1.2 with // cd /usr/local/include sudo ln -s ../opt/openssl/include/openssl . cd .. sudo mkdir lib cd lib sudo ln -s /usr/local/Cellar/berkeley-db4/4.8.30/lib db48 sudo ln -s /usr/local/Cellar/miniupnpc/1.9.20141027/lib/libminiupnpc.* . sudo ln -s /usr/local/Cellar/boost/1.57.0/lib/lib*.* . // Possibly not needed will return to this // sudo ln -s /usr/local/Cellar/openssl/1.0.2/lib/lib*.* . // Possibly not needed will return to this //
Build and Install Gridcoin daemon
We will put the source files into a "development" folder in your home directory:
cd mkdir development cd development git clone https://github.com/gridcoin/Gridcoin-Research.git cd Gridcoin-Research/src mkdir -p obj/zerocoin chmod +x leveldb/build_detect_platform make -f makefile.osx strip gridcoinresearchd sudo install -m 755 gridcoinresearchd /usr/bin/gridcoinresearchd
Setup Gridcoin configuration
When you first run the Gridcoin research daemon, you will receive an error. This is fine; we only want to run the command so that the application creates a template directory for OS X. Once that is done, let's create our first configuration file. Note: you will want to set your own values in the items that are in square brackets.
From command line:
cd ~/Library/Application\ Support/GridcoinResearch nano gridcoinresearch.conf
Copy and paste the following into the file. Once you are done, press Control+O to write the file, ENTER to confirm, and then Control+X to exit the editor.
server=1 daemon=1 rpcport=9332 rpcallowip=127.0.0.1 rpcuser=[username] rpcpassword=[yourpassword] rpcallowip=[some external IP] addnode=node.gridcoin.us addnode=typh00n.net rpcssl=1 email=[your boinc account email]
Build and Install Gridcoin QT UI application
Assuming you used these instructions to build the QT application, go to the development folder for Gridcoin where you cloned the repository. First, open the "Terminal" application, then type in the command:
cd development/Gridcoin-Research brew install qt nano gridcoinstake.pro
The nano command brings you to an editor where you will edit the gridcoinstake.pro file. Line 9 and 21 includes the word "qaxcontainer". You will comment both of these lines beginning with the pound character (#). After you edit these lines, they will both look something like this:
#QT += qaxcontainer . . . . #CONFIG += qaxcontainer
To save the file and exit the editor going back to the terminal command line, press Command+O, ENTER, and then Command+X. Back at the editor, type in these commands:
qmake "USE_UPNP=-" make
Finally, open Finder and navigate to your home directory > development > GridcoinResearch. From there you will see the "gridcoinresearch" application. It will have a "Blackcoin" icon for some reason... o.O that is perfectly normal. Drag the application to your Applications folder and you're done!