Warning: Constant ABSPATH already defined in /home/kcupit/spaceman.ca/blog/wp-config.php on line 28
On Orbit » Blog Archive » Installing CGMiner 3.1.0 on Mac OS X 10.8

Installing CGMiner 3.1.0 on Mac OS X 10.8

Updated July 15, 2013:
There are now much better options for running cgminer on a Mac than compiling it yourself. Take a look at Asteroid, an easy-to-use front-end to cgminer and super Mac-friendly. Or if you still like the command line, I’ve also released universal binaries precompiled and ready to run at spaceman.ca/cgminer.

The information below is now out of date.

One of the latest and greatest BitCoin miners out there these days is CGMiner. It is an advanced and adaptive GPU, FPGA and ASIC miner incorporating all the major BitCoin mining kernels out there (diablo, poclbm, phatk and diakgcn) and has key features such as long-polling, multiple pools, etc.

CGMiner in Mac OS X 10.8.3 Terminal

CGMiner in Mac OS X 10.8.3 Terminal

There are a few options to get this running on a Mac. Until recently, your only option was to download the source code and compile it via Terminal, which I’ve detailed below. In the last couple of days, a few additional options have sprung up. Nate Woolls has built a Homebrew installation that is very simple once you have homebrew installed, but isn’t (yet) part of the official homebrew packages yet. And BitBacco is working on a Mac installer package called MacMiner currently in beta, and he’s looking for testers. And if you want to get set up mining now with as little hassle as possible (but at a slower hash rate), check out BitMinter.

Still want to build it yourself from the latest source code? Here’s what you need to do. I promise it’s not too tough.

  1. Install Apple’s XCode
    This is the IDE for programming on the Mac. Don’t worry, we just need some of the tools that it installs, you won’t actually be working in Xcode. Next:
    • Launch XCode
    • Go to “Preferences…” under the “Xcode” menu
    • Click on the “Downloads” page
    • Click the “Install” button beside “Command Line Tools
       
  2. Download cgminer
    Download the latest version with “tar.bz2” as the file suffix (not x86_64). Unzip this file wherever you like, and remember the location for when we compile cgminer later on.
     
  3. Install Homebrew
    Homebrew provides access to lots of little utilities used by command-line apps. We’ll only install the ones we absolutely need for CGMiner.

    If you followed my previous guide and you have MacPorts installed, you can remove MacPorts by following the quick instructions here.
     

  4. Open Terminal
    Enter the following to install the Homebrew packages we’ll need for compiling CGMiner (otherwise known as cgminer’s dependencies):
    • brew doctor
      Checks to see that Homebrew is ready to work and there are no issues. If it returns some warnings, read the text and do what it says to fix it.
    • brew install coreutils autoconf automake jansson libgcrypt libgpg-error libtool libusb pkg-config yasm curl
      Paste all on one line. This downloads, compiles and installs each of the dependencies needed for cgminer in one fell swoop.
  5. Compile and install CGminer
    Enter the following into your terminal, and customize it if you’d like. Each command should be entered on a single line.
    • cd (drag and drop the cgminer folder onto the Terminal window)
    • ./configure --enable-scrypt PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig CFLAGS="-g -O2 -Wall"
    • sudo make install
       
  6. Finished! You should now be able to type “cgminer” into your Terminal to run it. For a list of command-line options to include (including attaching to a mining pool), see the original documentation for CGMiner. For example, use cgminer -o http://pool:port -u username -p password with your own values to attach to a pool

Update (2013.04.08): ADL is not supported on the Mac, and is unlikely to be anytime soon in a form that the developers of cgminer would be likely interested in developing for. Therefore, you can live life without ADL (GPU overclocking, temp/fan management, etc) or try downloading a windows version and running it via Boot Camp.

Update (2013.04.09): Changed some formatting in the post for easier copy/paste.

Update (2013.04.25): Switched from MacPorts to Homebrew, and updated guide for cgminer 3.0.1 (previously 2.11.4).

Update (2013.04.29): Updated for cgminer 3.1.0. Added links to other good projects to bring cgminer and bfgminer to mac.

1NjVM9Ua57FTDXr3PfJSVwguhLPmQHAAdQ

Happy mining!

Explore posts in the same categories: BitCoin, Technology