Bitcoin Forum
November 12, 2024, 11:58:16 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
Author Topic: Mac OS X Resources & Howtos for Mining (Homebrew/DIY/Bin/Xcode Debugging)  (Read 64256 times)
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
April 24, 2013, 09:12:45 PM
Last edit: January 14, 2018, 04:52:01 AM by nwoolls
 #1

I've put together a couple of packages (formulas) for Homebrew that make it easier to install BFGMiner, CGMiner, SGMiner, Vertminer and other *GMiner forks on Mac OS X. I've tested these on macOS High Sierra and they seem to work well, plus I've had positive reports from others.



Once you have Xcode Command Line Tools and Homebrew installed, you can run the following commands to install bfgminer:

Code:
brew tap nwoolls/xgminer && brew install bfgminer

In addition you can find source code and instructions for these Homebrew formulas here:

https://github.com/nwoolls/homebrew-xgminer

If you'd like to download precompiled binaries for OS X, or would prefer to compile the binaries yourself without installing Homebrew, there are both shell here:

https://github.com/nwoolls/xgminer-osx

and binaries here:

https://github.com/nwoolls/xgminer-osx/releases

Articles


Hopefully this helps folks get up-and-going with BFGMiner a little more easily on OS X.

Developers

If you are an OS X user or developer and interested in contributing to BFGMiner, I've put together a repository with an Xcode project and scripts that allow you to compile and debug bfgminer in Xcode. You can view the instructions and get started here:

https://github.com/nwoolls/xgminer-osx-dev


MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
furax
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
April 24, 2013, 09:52:07 PM
 #2

Whoops:

Code:
dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib
  Referenced from: /usr/local/bin/bfgminer
  Reason: Incompatible library version: bfgminer requires version 8.0.0 or later, but libcurl.4.dylib provides version 7.0.0
Trace/BPT trap: 5
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
April 25, 2013, 12:13:48 AM
 #3

Whoops:

Code:
dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib
  Referenced from: /usr/local/bin/bfgminer
  Reason: Incompatible library version: bfgminer requires version 8.0.0 or later, but libcurl.4.dylib provides version 7.0.0
Trace/BPT trap: 5
Thanks for the feedback. I'll look into this some more tomorrow. There are reports of similar errors with other packages and Homebrew here:

https://github.com/josegonzalez/homebrew-php/issues/419
https://github.com/josegonzalez/homebrew-php/issues/428

There are some potential suggestions and fixes in there. If there's anything that helps please let me know. For instance, you could try downloading the .rb file yourself, modifying the curl requirement as shown below, and then trying again:

Code:
depends_on 'curl' unless MacOS.version >= :lion

Any information and details you can give the better.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
JonSnow
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
April 25, 2013, 02:57:47 AM
 #4

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?
furax
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
April 25, 2013, 09:13:57 AM
 #5

Hi, thank you for your reply.

I had another install of curl that got in the way, so I removed it which leaves me with both the system and the homebrew version.

However, I could start the miner by exporting

Code:
DYLD_LIBRARY_PATH="/usr/local/Cellar/curl/7.29.0/lib"

All is fine now, thanks a lot for your help  Grin
Anonymailer
aka BitBacco
Hero Member
*****
Offline Offline

Activity: 662
Merit: 500



View Profile WWW
April 25, 2013, 11:45:43 AM
 #6

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer

MacMiner - The first, best and easiest to use native Mac coin mining app: https://bitcointalk.org/index.php?topic=197110.0

BTC: 12vZf8mjaXvHorXWVWfv7nZspHa8L8kfoG LTC: LLRqwo3YcLqoRyfZRVmUevtd2Y35Vvnt4w
JonSnow
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
April 25, 2013, 09:11:18 PM
 #7

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer

There doesn't seem to be much of an option to tell it to install with --enable-modminer  ... using homebrew, it all seems pretty automated and whereas in Linux I'd type "./configure --enable-modminer" it doesn't recognize the command in mac.
Anonymailer
aka BitBacco
Hero Member
*****
Offline Offline

Activity: 662
Merit: 500



View Profile WWW
April 25, 2013, 11:34:13 PM
 #8

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer

There doesn't seem to be much of an option to tell it to install with --enable-modminer  ... using homebrew, it all seems pretty automated and whereas in Linux I'd type "./configure --enable-modminer" it doesn't recognize the command in mac.

you need to download the cgminer.rb file - right click this link and choose download

https://dl.dropboxusercontent.com/s/qq8t51otgry14p3/cgminer.rb

- that's where it has the enable option. change it as above
if you're familiar with the options on the command line you can see the autogen, make and install are in there too so you can set it up how you like.

then (if it's on your desktop):

brew install ~/Desktop/cgminer.rb

I'm looking at distributing binaries for both with MacMiner soon though, so if you prefer not to have to keep track of homebrew etc. you can always cross your fingers I'll get that done this weekend Wink

MacMiner - The first, best and easiest to use native Mac coin mining app: https://bitcointalk.org/index.php?topic=197110.0

BTC: 12vZf8mjaXvHorXWVWfv7nZspHa8L8kfoG LTC: LLRqwo3YcLqoRyfZRVmUevtd2Y35Vvnt4w
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
April 26, 2013, 12:53:33 AM
 #9

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer
Is there any drawback if I include all of the optional support parameters, enabling bitforce, icarus, etc? If not I'll update both .rb packages to compile these in along with scrypt support.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
April 26, 2013, 12:55:15 AM
 #10

I'm looking at distributing binaries for both with MacMiner soon though, so if you prefer not to have to keep track of homebrew etc.
How are you doing this? I'm very curious. I wanted to go this route but my knowledge of the *nix toolchain kept me from going very far. Getting all of the libraries and binaries statically linked seemed tricky.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
JonSnow
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
April 26, 2013, 12:59:44 AM
 #11

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer

There doesn't seem to be much of an option to tell it to install with --enable-modminer  ... using homebrew, it all seems pretty automated and whereas in Linux I'd type "./configure --enable-modminer" it doesn't recognize the command in mac.

you need to download the cgminer.rb file - right click this link and choose download

https://dl.dropboxusercontent.com/s/qq8t51otgry14p3/cgminer.rb

- that's where it has the enable option. change it as above
if you're familiar with the options on the command line you can see the autogen, make and install are in there too so you can set it up how you like.

then (if it's on your desktop):

brew install ~/Desktop/cgminer.rb

I'm looking at distributing binaries for both with MacMiner soon though, so if you prefer not to have to keep track of homebrew etc. you can always cross your fingers I'll get that done this weekend Wink

awesome!  when i brew install though, it fails to find libusb-1.0 even.  so then i brew install libusb, and it tells me libusb-1.0.9 is already installed.  still can't get it to "see" that libusb is already installed when i attempt to brew cgminer.

any ideas?
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
April 26, 2013, 01:15:36 AM
 #12

awesome!  when i brew install though, it fails to find libusb-1.0 even.  so then i brew install libusb, and it tells me libusb-1.0.9 is already installed.  still can't get it to "see" that libusb is already installed when i attempt to brew cgminer.

Try running "brew doctor" and seeing if there are any errors or warnings. Fix any you can. Also, make sure that "/usr/local/sbin" is on your PATH. I had to add the following to ~/.bash_profile:

Code:
export PATH="$PATH:/usr/local/sbin"

I just tested and I am able to build with --enable-modminer using the libusb installed by Homebrew (1.0.9).

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
JonSnow
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
April 26, 2013, 03:07:16 AM
 #13

I've added that to PATH, but it's still telling me that I don't have libusb.  Undecided
furax
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
April 26, 2013, 06:05:26 AM
 #14

I've had luck getting it running on my MacBook Pro ... but does anyone know how I would go about getting it to use my modminer fpga cards, instead of the gpu or cpu?

When installing replace --enable-scrypt with --enable-modminer

There doesn't seem to be much of an option to tell it to install with --enable-modminer  ... using homebrew, it all seems pretty automated and whereas in Linux I'd type "./configure --enable-modminer" it doesn't recognize the command in mac.

you need to download the cgminer.rb file - right click this link and choose download

https://dl.dropboxusercontent.com/s/qq8t51otgry14p3/cgminer.rb

- that's where it has the enable option. change it as above
if you're familiar with the options on the command line you can see the autogen, make and install are in there too so you can set it up how you like.

then (if it's on your desktop):

brew install ~/Desktop/cgminer.rb

I'm looking at distributing binaries for both with MacMiner soon though, so if you prefer not to have to keep track of homebrew etc. you can always cross your fingers I'll get that done this weekend Wink

Note that you can also do

Code:
brew edit cgminer

That will open the .rb file in a text editor  Grin
Anonymailer
aka BitBacco
Hero Member
*****
Offline Offline

Activity: 662
Merit: 500



View Profile WWW
April 28, 2013, 07:49:13 PM
 #15

Hi everyone, I've worked bfgminer in to MacMiner now, although it's required me to use an installer to get around the missing libusb/jansson problems people are having. Check out the announcement thread (and read the instructions!)

https://bitcointalk.org/index.php?topic=189947.0

MacMiner - The first, best and easiest to use native Mac coin mining app: https://bitcointalk.org/index.php?topic=197110.0

BTC: 12vZf8mjaXvHorXWVWfv7nZspHa8L8kfoG LTC: LLRqwo3YcLqoRyfZRVmUevtd2Y35Vvnt4w
CobaltBlueD
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
August 21, 2013, 11:36:09 PM
 #16

Interestingly, I put a few erupters on a 10.7 mac mini with MacMiner.  Slow rates.  Spent an absurd amount of time.  Found that the Mac USB libraries involved in cgminer were the problem.  It took some digging. 

When I did a clean install of bfgminer, I had to install the Silicon driver.  It cleaned up my little USB driver mess probably by simply cutting them out of the equation.  Now it's rock solid.  Something to consider.  Picked up more than 20% on the units/min. I did use bfgminer 3.3.4 withnn -G -S erupter:all

I've noticed my new mac air with 10.8.4 doesn't have openCL but they are saying it is in 10.9.  We shall see.
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
August 21, 2013, 11:41:39 PM
 #17

Since this thread got bumped I'll update the information. The instructions and Homebrew formulas for both cgminer and bfgminer are now found here:

https://github.com/nwoolls/homebrew-cryptocoin

In addition, if you'd like to either download precompiled binaries or compile them yourself without Homebrew, this repository has both shell scripts and binaries:

https://github.com/nwoolls/xgminer-osx

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
August 31, 2013, 07:31:47 PM
 #18

Homebrew formulas, Shell scripts, and precompiled binaries have all been updated with bfgminer 3.2.0.

Unfortunately cgminer 3.3.4 remains the last compatible release for OS X. Neither 3.4.0 or 3.4.1 build on OS X.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
September 13, 2013, 01:04:42 PM
 #19

Homebrew formulas, Shell scripts, and precompiled binaries have all been updated with cgminer 3.4.3.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
nwoolls (OP)
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1002


View Profile WWW
September 19, 2013, 12:54:40 PM
 #20

Homebrew formulas, Shell scripts, and precompiled binaries have all been updated with bfgminer 3.2.1.

MultiMiner: Any Miner, Any Where, on Any Device |  Xgminer: Mine with popular miners on Mac OS X
btc: 1BmXY4ZZQh1iHSVre658gM1gPAEtDnq8rv  |  ltc: LP1SsHZTDexndkvRKsqAkXNsienPHwaMb5  |  hardware: nwoolls at gmail dot com
Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!