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

62 Comments on “Installing CGMiner 3.1.0 on Mac OS X 10.8”

  1. Alexandre Strube Says:

    Tried with mountain lion. Did exactly what you did. It compiles fine, but dies later: Trace/BPT trap: 5

  2. Kerry Says:

    Hi Alex, what machine are you running on? I’m doing a bit more work over the next few days with it. Feel free to shoot me an email: go to the front page of my site (www.spaceman.ca) and click on Contact Me. Thanks for the feedback.

  3. pete Says:

    hi, i think the line ./configure –enable-scrypt is wrong, i think it should be ./configure –enable-scrypt
    also, i get a segmentation fault when i run the code.
    see this pastie for the fault. the log is beyond my understanding.
    http://pastie.org/7384969

  4. Danny Says:

    Hey Kerry, All the steps worked perfectly except when I try and run the program It just prints out “All devices disabled, cannot mine!”

    Any ideas?

  5. Kerry Says:

    Hey Danny, do you have a dedicated graphics card in your machine? The Intel HD graphics strangely do not support OpenCL, which is the framework that facilitates the actual mining. What kind of Mac do you have? What happens when you type “cgminer -n” (it should print a list of your graphics cards then immediately quit)?

  6. Danny Says:

    Hey Kerry,

    Thats the problem, i’v an intel hd graphics 3000 on my macbook pro.
    Do you know is there any way to mine using gpu’s that don’t support OpenCL?

  7. Kerry Says:

    Hey Danny,

    Good question. A few quick google searches turn up the same thing, that mining on a non OpenCL GPU isn’t doable. I’d love to be proven wrong though, maybe you’d have better luck searching.

    Alternatively you could do some CPU mining, but your mining/hash rate will be about 5% of what a GPU could do. CGminer doesn’t support CPU mining anymore, but I think there are a few that do. I found this link to a CPU miner I used to use myself.

  8. Slopez Says:

    I got it to work on my mountain lion /Radeon 5750… with the help of my brother. I thought I’d get some better hash rate but it it was around 15 k/s… not what I had in mind. I started using CPUminer and it’s been averaging 50 k/s. Does CGminer have low output? I thought it was supposed to be better than mining with the cpu.

  9. Greg Says:

    Hi Danny, thanks for the excellent how-to. I managed to get it running on 10.7.5 with radeon 4670. However as per Slopez, the max hash rate I can get is 3.8k/s. As a comparison, minerd kicks out 8k per thread (2 threads) so I figure something isn’t right.
    I compiled with -enable-scrypt and the ./configure output reported Scrypt = Enabled, no other compile errors.
    I thought as a benchmark I should get more k/s with the GPU than the CPU

    Cheers
    Greg

  10. Kerry Says:

    Hey Slopez and Greg,

    Yes, GPU mining with cgminer should be far faster than CPU mining with minerd or cpuminer. That said, there may be some tweaks you can try depending on intricacies of your graphics card and what others have found.

    Greg, try running with cgminer -v 1 -w 32 and see if that helps.

    Slopez, try running with cgminer -v 1 -w 128.

    And are you mining bitcoins or litecoins (ie, with “cgminer –scrypt”)? If litecoin, check here for a command line tweaking guide for various GPUs. Let me know how you make out and I’ll update the post as needed. Thanks!

  11. Joe Says:

    I could not get this to work using macports version of curl – the script was unable to find the libcurl libraries. To fix this, I just downloaded the regular version of curl directly, compiled and installed that and then ti worked perfectly.

  12. Rob Juurlink Says:

    Could not get this to work using HomeBrew version of curl, unable to find the libcurl libraries. To fix this: ./configure –enable-scrypt PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig

  13. ff10 Says:

    Thanks for the tutorial. I use CGMiner in connection with Litecoin.
    Hashrate is quite impressive compared to the CPUMiner.
    Unfortunately, I frequently get the message:
    Stratum from pool 0 requested work restart
    What does that mean? Any ideas how to fix this?

  14. Kerry Says:

    @ff10 That’s normal. Stratum is the name of the protocol used to distribute blocks to miners to work on. If a solution is found while you’re partway through a block, the stratum protocol notifies your miner that it doesn’t need to waste any more time in that block and can start in a new one, thus making your miner more effective. So yeah, it’s normal, everyone sees them and its a good thing :)

  15. ff10 Says:

    @Kerry,

    Thanks for making that clear! But it is still weird, since I only get those messages. Looking at my pool account stats, after about 10-20 min, nothing has happened.
    When I utilize the CPUMiner, it starts mining right away and the according stats show right up in my account.

  16. glassfet Says:

    Hi. Thanks for this.

    Couldn’t get it working in Mountain Lion, but works in Lion. With the following settings I get 50Kh/s on each 5770 GPU mining Litecoin

    –thread-concurrency 3200 -I 13 –shaders 800 -v 2 -w 128

  17. Kerry Says:

    Awesome, thanks Glassfet for writing back with what worked for you :)

  18. LAWJISTIK Says:

    @kerry

    -Hey I ran into this problem “All devices disabled, cannot mine!” “intel hd graphics 3000″ Im guessing the same for intel 4000.

    -also xcode was giving me this “No valid Xcode installation is properly selected.” during sudo port install coreutils…do i have to run something from xcode or can i just do everything in terminal.

  19. Kerry Says:

    Hey Lawjistik,

    Yeah, none of the Intel HD Graphics cards (3000 and 4000) support OpenCL, and thus can’t be used by CGminer for GPU mining. You’re only bet then, if you really want to try mining, is to look at CPU mining either for BitCoin or LiteCoin. You’ll get slower speeds but you’ll still be mining. You’ll also need to find a different miner, as cgminer only does GPU mining (you need CPU mining).

    Regarding your Xcode error, did you install the Command Line Tools from the XCode Preferences (see the “Install Apple’s Xcode” step above)?

  20. LAWJISTIK Says:

    here’s a SS of xcode & terminal

    https://docs.google.com/file/d/0ByYM8N6O2Tc6YWhCT0JvckpuSDg/edit?usp=sharing

  21. LAWJISTIK Says:

    Don’t worry bout it. I’m going to have to build rig for this deal.

  22. John M Says:

    Heyyyyy
    SO I managed to get cgminer running on Lion. But I have the same problem as some other people. I have a 5770, but I’m stick at about 3kh/sec. I should be getting about 60x that. I tried playing with the suggestions you gave the other guys, and I was able to get it up to 4.5kh/sec. But thats it, and that’s terrible.

    This is with litecoins btw. Using bitcoins, I get a normal ~165mh/s

    Any ideas why I’m super slow for no apparent reason?

  23. Raymond Barlow Says:

    Hi,

    I’m getting the same error as Alexandre (Trace/BPT trap: 5). When I look in the crash reports, I find :
    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000

    Application Specific Information:
    *** CFRetain() called with NULL ***

    I’m running dual 5770’s, on Mountain Lion.

    Nice article BTW!

    /Raymond

  24. BluePress Says:

    hi Kerry

    I keep getting the error where cgminer says after i fill in the host/username/password details (which are correct) that pool setup fails. I am very new to this and i do not know what i’m doing (and am thankful i got cgminer installed thanks to this manual)

    BluePress

  25. BluePress Says:

    I am sorry but I have resolved it myself, it was in fact a problem with the username, i used the username for the pool, but i had to use the worker name instead of the account name…. xD sorry for the silly question

  26. Kerry Says:

    I suggest everyone who has been having problems to retry with the latest version of CGminer (now at 3.0.1), as it has a few specific fixes for Mac users.

  27. Bob Says:

    There’s no ./configure when you clone from git. The README indicates to run ./autogen.sh, but that fails with other errors. Any insights? Running on 10.8

  28. Nate Says:

    Bob, you’ll need to first install coreutils using Homebrew (brew install coreutils) and then edit the autogen.sh file and change the “readlink” to “greadlink”. Afterwards run ./autogen.sh with the same parameters as indicated for ./configure.

    FWIW I’ve also done up a Homebrew “formula” for cgminer, so you can also try this at the command line: “brew install https://dl.dropboxusercontent.com/s/qq8t51otgry14p3/cgminer.rb

  29. Daniel Says:

    Hi,

    First of all, this is the best guide by far! Everything is working perfect, though I’ve tried to figure out a way to do Solo mining with this setup.

    Is there anyway to alter this setup so it can do Solo mining?
    Could you please help me with an explenation in order to make that work?

    /Daniel

  30. Gary Says:

    I don’t quite understand why someone can’t just put a installer online. Am I missing something? Or why didn’t the person who wrote this tutorial just not give us a link to download the installer he explained above?

  31. Antlers Says:

    I have excatly the same issue as 3 other users in here. Mining at 2Kh/s when I mine bitcoin at 60Mh/s using BitMinter.

    And I second Gary’s comment above. For as good at the tutorial may be, if we want this to go main stream, a binary would go a long way to same lots of non-programmers a lot of pain.

  32. Gary Says:

    The line ./configure –enable-scrypt PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig CFLAGS=”-g -O2 -Wall”

    gives me an error of: No such file or directory

    Can someone help me out with this?

  33. Gary Says:

    @kerry It is really weird I find a bunch of tutorials about how to compile it everywhere, including this one, but no one is placing the end result so others can download.

    Can you place the compiled installer here for us to just download and run. Will also save you time solving issues.

  34. Gary Says:

    @Kerry hy didn’t you just put the installer here for us to download?

  35. Antlers Says:

    Two binaries, one for 10.7 and another for 10.8 would pretty much cover Litecoin mining for all Mac users. The first to post a working cgminer 3.0.1 binary with scrypt support for OSX 10.7 (along with their BTC address) will receive a small donation of my part.

  36. Gary Says:

    @Antlers, I dont know if this count as being able to be rewarded, but I found this link, that I used after doing everything Kerry said and getting stuck at ./configure –enable-scrypt PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig CFLAGS=”-g -O2 -Wall”

    By doing this link I got CGminer to start working https://bitcointalk.org/index.php?topic=186794.0

    Just incase you feel like passing that reward, here is my BTC address 1Fkr3qJ3WsGHw7pi5z4YSnMV6MV76sTyro

    I have been at it for 21 hour straight before I got it working, but now I have extremely low hash rates 5 Kh/s

    this is my script file. It is important to add this : “scrypt” : true,
    This allows Cgminer to go into that mode for litecoins. It uses the Scrypt algorithm. Hope this helps, and I am still trying to solve the extremely low hashrate.

    “intensity” : “4”,
    “vectors” : “2”,
    “worksize” : “256”,
    “gpu-engine” : “0-1100″,
    “kernel” : “scrypt”,
    “lookup-gap” : “2”,
    “thread-concurrency” : “4000”,
    “shaders” : “800”,
    “api-port” : “4028”,
    “expiry” : “120”,
    “gpu-dyninterval” : “7”,
    “gpu-platform” : “0”,
    “gpu-threads” : “2”,
    “log” : “5”,
    “no-pool-disable” : true,
    “queue” : “1”,
    “scan-time” : “60”,
    “shares” : “0”,
    “scrypt” : true,
    “kernel-path” : “/usr/local/Cellar/cgminer/3.0.1/bin”
    }

  37. Kerry Says:

    @Gary and @Antlers

    I wish I had the knowledge and expertise to put together an installer and GUI for this package, but I don’t. I do have some kung fu skills on the terminal though, hence my guide for building it from source (which would give you the greatest control over various options).

    You may be interested in a new project called MacMiner though, it’s installer based with a graphical user interface I believe. You can also check out Nate’s guide using just Homebrew.

    Oh, and the author of cgminer released 3.1.0 just yesterday. I’ve updated my guide, including changing a few things to solve the problems you were seeing.

  38. FF Says:

    Hi, thank you for the guide. I compiled it successfully according to the instructions. However I’m not able to make it work, it results in the following crash (it seems it can’t work with the graphic cards)

    [2013-04-29 19:15:54] Error -54: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-04-29 19:15:54] Error -2: Creating Command Queue. (clCreateCommandQueue)
    [2013-04-29 19:15:54] GPU 0 failure, disabling!
    [2013-04-29 19:15:54] Thread 0 being disabled
    [2013-04-29 19:15:54] Failed to init GPU thread 1, disabling device 1
    [2013-04-29 19:15:54] Restarting the GPU from the menu will not fix this.
    [2013-04-29 19:15:54] Try restarting cgminer.
    Press enter to continue:Segmentation fault: 11

    After pressing enter it crashes. Any ideas?

    I have two NVIDIA GeForce 9400M

    Thank you!

    Process: cgminer [64937]
    Path: /usr/local/bin/cgminer
    Identifier: cgminer
    Version: 0
    Code Type: X86-64 (Native)
    Parent Process: bash [1061]
    User ID: 501

    Date/Time: 2013-04-29 19:16:23.381 -0400
    OS Version: Mac OS X 10.8.3 (12D78)
    Report Version: 10

    Interval Since Last Report: 559553 sec
    Crashes Since Last Report: 5
    Per-App Crashes Since Last Report: 5
    Anonymous UUID: B8A1B033-5D31-8F20-1ABC-DAF3D4FFC103

    Crashed Thread: 7

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: EXC_I386_GPFLT

    Thread 7 Crashed:
    0 cgminer 0x00000001014d7f1e watchdog_thread + 2910 (cgminer.c:6327)
    1 libsystem_c.dylib 0x00007fff856197a2 _pthread_start + 327
    2 libsystem_c.dylib 0x00007fff856061e1 thread_start + 13

  39. Kerry Says:

    @FF, I’m not sure, but I think it has to do with NVidia GPUs and their implementation of OpenCL (the interface cgminer uses to run its algorithms). Meaning, it is possible to mine with nvidia CPUs (according to the cgminer FAQ), but at far slower speeds. I’ll keep looking into it later tonight and let you know.

  40. Gary Says:

    @Kerry I see you mention about 3.1, but I am seeing where you explain how to install to 3.1. Can you point that out to me?

    Thanks in advance and also thanks for all the stuff you did above.

  41. Gary Says:

    Figured it out, only now have to see if someone can figure out how to solve the extreme Litecoin hash rate. It sits at around 4 Kh/s on the mac. Anyone has any ideas?

  42. Sam Says:

    @Gary I’m running at about 12-13Kh/s on a 2012 iMac with a GT 650M. After some experimentation I set the intensity at 9, that is the highest setting I can do while avoiding hardware errors. Don’t bother setting it higher than 13 as it has no effect, but let it run for an hour or two and if your HW count > 0 then drop it down a notch. An intensity of 4 is likely to be way too low, but it depends on your hardware.
    Also, generally speaking Nvidia cards are not optimized for compute tasks as much as AMD cards, so don’t be surprised if it doesn’t improve much.
    @Nate Awesome homebrew formula, and thanks for updating it for 3.1.0!

  43. Daniel Says:

    I figured out the low hash rate problem. You need to set the worksize low. This was my optimal setup on a 5770 card.

    –scrypt –worksize 64 -I 14

    The -I variable and had the second biggest effect on performance the Max is 20, default is 10. Going 1 lower or higher affected performance badly so you will need to tweaks this.

    Changing the worksize from 256 -> 128 took hash rate from ~5kh to ~40kh, going down to 64 took it to ~60kh, adding the -I 14 took it upto ~90kh.

    And thats about as good as it seems to want to go on OSX. From what Ive read its probably because OSX uses an OpenGL desktop which eats up GPU memory.

    LLuDAMrxkgy3FtSQ1ebhfX7y3wTLkmARax

  44. voykov Says:

    hi! i have a problem like this:
    [2013-05-07 01:17:03] Started cgminer 3.1.0
    [2013-05-07 01:17:03] Probing for an alive pool
    [2013-05-07 01:17:03] Network diff set to 10.1M
    [2013-05-07 01:17:03] Long-polling activated for http://91.121.58.230:443/LPSegmentation fault: 11

    [2013-05-07 01:17:03] Started cgminer 3.1.0
    [2013-05-07 01:17:03] Probing for an alive pool
    [2013-05-07 01:17:03] Network diff set to 10.1M
    [2013-05-07 01:17:03] Long-polling activated for http://91.121.58.230:443/LPSegmentation fault: 11

    can anyone help me?

  45. voykov Says:

    hi! i have a problem like this:

    [2013-05-07 01:17:03] Started cgminer 3.1.0
    [2013-05-07 01:17:03] Probing for an alive pool
    [2013-05-07 01:17:03] Network diff set to 10.1M
    [2013-05-07 01:17:03] Long-polling activated for http://91.121.58.230:443/LPSegmentation fault: 11

    vsg:cgminer-3.1.0 voykov$ cgminer -n [2013-05-07 01:18:41] CL Platform 0 vendor: Apple
    [2013-05-07 01:18:41] CL Platform 0 name: Apple
    [2013-05-07 01:18:41] CL Platform 0 version: OpenCL 1.1 (Aug 10 2012 19:59:48)
    [2013-05-07 01:18:41] Platform 0 devices: 2
    [2013-05-07 01:18:41] 0 ATI Radeon Turks PRO Prototype
    [2013-05-07 01:18:41] 1 ATI Radeon Turks XT Prototype
    [2013-05-07 01:18:41] 2 GPU devices max detected

    whats wrong?

  46. Ian Kremer Says:

    I am getting an error like:
    usbutils.c:913: error: redefinition of ‘union semun’
    usbutils.c: In function ‘cgminer_usb_unlock_bd’:
    usbutils.c:1139: warning: implicit declaration of function ‘semtimedop’
    make[1]: *** [cgminer-usbutils.o] Error 1
    make: *** [install-recursive] Error 1

    When I go to build. As far as I can tell its a OSX error. Kano talks about it on the CGminer page: https://bitcointalk.org/index.php?topic=28402.msg1917002#msg1917002

    Any ideas on how to get around it?

  47. Kerry Says:

    @Ian Sounds like you’re compiling with one of the ASIC or FPGA options turned on (as they require USB access).

    I have a modified usbutils.c file I’ll email you later this morning. I’d be interested to hear if it works with your devices, as I simply commented out the offending code (which looked to me just was error logging)

  48. Ian Kremer Says:

    @Kerry Yes I am compiling with the –enable-bflsc flag. Getting my cgminer ready. If all goes well I should be getting a BFL Jalipanio and Little single soon.

    Thanks for sending over that file. Hopefully it will let me compile the app, though I might not be able to fully test it for a few weeks when my BFL gets here.

    Who needs error loggin? (*Sarcastic Programmer is Sarcastic*)

  49. Whit Says:

    Thanks for the walk-through!! Worked great. Running iMac 2011 27″ 6770 AMD. I am getting around 90 – 100 Mhash. Not awesome but for a desktop that just sits there it is great. I will be adding 3 other iMacs ranging in age and hardware. Thanks again for the guide.

  50. Gary Says:

    @Whit, are you getting Mhash/s or KHash/s ?

  51. Donavon Says:

    I originally installed CGMiner using the instructions were MacPorts was used. I have 3.0.1 running now using those instructions. I wanted to update to the latest (3.1.1 as of now) and followed the new instructions for 3.1.0 which requires the removal of MacPorts.

    After removing MacPorts as requested, installing Homebrew and all that, when I go to compile and run CGMiner I get a curl error. It tells me I have 7.0 but 8.0 is required.

    How should I proceed? I can only assume that MacPorts is involved here.

  52. Kerry Says:

    @Donavon Try using “brew doctor” in the Terminal and see if it returns anything. Assuming it doesn’t report any errors, be sure to run configure with “PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig” as noted above and see if that helps!

  53. Kath Says:

    I have a GEForce 320M (mid 2010 13 inch MBP) and can’t get better than 5Mh/s. Any suggestions?

  54. Kade Says:

    Been trying to get Cgminer or BGminer installed on Lion for a week and no luck on either…This is what I get when i try to run CGminer via terminal. Of course the xxxxx are replaced with username and pass. I am pretty sure it did not configure and install correctly as I cannot find any help on getting Lion running. Seems to be all for Mountain Lion out there..

    [2013-05-21 02:14:19] Started cgminer 3.1.0
    [2013-05-21 02:14:19] Started cgminer 3.1.0
    [2013-05-21 02:14:20] Need to specify at least one pool server.
    Input server details.
    URL:
    http://mining.usa.la.hypernova.pw:9332
    Username:
    xxxxxx
    Password:
    xxxxx
    Segmentation fault: 11
    logout

    [Process completed]

    When I try to compile Cgminer 3.1.1. from cgminer-3.1.1 .tar.bz2 this is the complete log from compile to install . Please help!!

    ——-

    Last login: Tue May 21 02:22:15 on ttys000
    Pup-Patrol:~ Kade$ cd /Users/Kade/Downloads/cgminer-3.1.1
    Pup-Patrol:cgminer-3.1.1 Kade$ ./configure –enable-scrypt PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig CFLAGS=”-g -O2 -Wall”
    checking build system type… x86_64-apple-darwin11.4.2
    checking host system type… x86_64-apple-darwin11.4.2
    checking target system type… x86_64-apple-darwin11.4.2
    checking for a BSD-compatible install… /usr/local/bin/ginstall -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… /usr/local/bin/gmkdir -p
    checking for gawk… no
    checking for mawk… no
    checking for nawk… no
    checking for awk… awk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking for style of include used by make… GNU
    checking for gcc… gcc
    checking whether the C compiler works… yes
    checking for C compiler default output file name… a.out
    checking for suffix of executables…
    checking whether we are cross compiling… no
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking dependency style of gcc… gcc3
    checking how to run the C preprocessor… gcc -E
    checking for grep that handles long lines and -e… /usr/bin/grep
    checking for egrep… /usr/bin/grep -E
    checking for ANSI C header files… rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking minix/config.h usability… no
    checking minix/config.h presence… no
    checking for minix/config.h… no
    checking whether it is safe to define __EXTENSIONS__… yes
    checking whether to enable maintainer-specific portions of Makefiles… no
    checking for gcc… (cached) gcc
    checking whether we are using the GNU C compiler… (cached) yes
    checking whether gcc accepts -g… (cached) yes
    checking for gcc option to accept ISO C89… (cached) none needed
    checking dependency style of gcc… (cached) gcc3
    checking for ranlib… ranlib
    checking whether gcc needs -traditional… no
    checking whether gcc and cc understand -c and -o together… yes
    checking for ranlib… (cached) ranlib
    checking sys/mman.h usability… yes
    checking sys/mman.h presence… yes
    checking for sys/mman.h… yes
    checking wchar.h usability… yes
    checking wchar.h presence… yes
    checking for wchar.h… yes
    checking for stdint.h… (cached) yes
    checking for mprotect… yes
    checking for sigaction… yes
    checking for sigaltstack… yes
    checking for siginterrupt… yes
    checking for mmap… yes
    checking for MAP_ANONYMOUS… yes
    checking whether memchr works… yes
    checking whether memmem is declared… yes
    checking for memmem… yes
    checking whether memmem works… no
    checking for C/C++ restrict keyword… __restrict
    checking for uid_t in sys/types.h… yes
    checking for inline… inline
    checking whether the preprocessor supports include_next… yes
    checking whether system header files limit the line length… no
    checking for wchar_t… yes
    checking for unsigned long long int… yes
    checking for long long int… yes
    checking whether stdint.h conforms to C99… no
    checking sys/inttypes.h usability… no
    checking sys/inttypes.h presence… no
    checking for sys/inttypes.h… no
    checking sys/bitypes.h usability… no
    checking sys/bitypes.h presence… no
    checking for sys/bitypes.h… no
    checking for bit size of ptrdiff_t… 64
    checking for bit size of size_t… 64
    checking for bit size of sig_atomic_t… 32
    checking for bit size of wchar_t… 32
    checking for bit size of wint_t… 32
    checking whether sig_atomic_t is signed… yes
    checking whether wchar_t is signed… yes
    checking whether wint_t is signed… yes
    checking for ptrdiff_t integer literal suffix… l
    checking for size_t integer literal suffix… ul
    checking for sig_atomic_t integer literal suffix…
    checking for wchar_t integer literal suffix…
    checking for wint_t integer literal suffix…
    checking whether memmem is declared without a macro… yes
    checking whether mempcpy is declared without a macro… no
    checking whether memrchr is declared without a macro… no
    checking whether rawmemchr is declared without a macro… no
    checking whether stpcpy is declared without a macro… yes
    checking whether stpncpy is declared without a macro… yes
    checking whether strchrnul is declared without a macro… no
    checking whether strdup is declared without a macro… yes
    checking whether strncat is declared without a macro… yes
    checking whether strndup is declared without a macro… yes
    checking whether strnlen is declared without a macro… yes
    checking whether strpbrk is declared without a macro… yes
    checking whether strsep is declared without a macro… yes
    checking whether strcasestr is declared without a macro… yes
    checking whether strtok_r is declared without a macro… yes
    checking whether strerror_r is declared without a macro… yes
    checking whether strsignal is declared without a macro… yes
    checking whether strverscmp is declared without a macro… no
    checking for memmem… (cached) yes
    checking whether memmem works… (cached) no
    checking for struct sigaction.sa_sigaction… yes
    checking for volatile sig_atomic_t… yes
    checking for sighandler_t… no
    checking whether sigaction is declared without a macro… yes
    checking whether sigaddset is declared without a macro… yes
    checking whether sigdelset is declared without a macro… yes
    checking whether sigemptyset is declared without a macro… yes
    checking whether sigfillset is declared without a macro… yes
    checking whether sigismember is declared without a macro… yes
    checking whether sigpending is declared without a macro… yes
    checking whether sigprocmask is declared without a macro… yes
    checking for sigprocmask… yes
    checking whether NULL can be used in arbitrary expressions… yes
    checking for ANSI C header files… (cached) yes
    checking syslog.h usability… yes
    checking syslog.h presence… yes
    checking for syslog.h… yes
    checking for size_t… yes
    checking for working alloca.h… yes
    checking for alloca… yes
    checking for OpenCL… yes
    checking for pthread_create in -lpthread… yes
    checking for json_loads in -ljansson… yes
    checking for ./ADL_SDK/adl_sdk.h… no
    checking for library containing addstr… -lncurses
    checking for pkg-config… /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0… yes
    checking for LIBCURL… yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating compat/Makefile
    config.status: creating compat/jansson/Makefile
    config.status: creating ccan/Makefile
    config.status: creating lib/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands

    ————————————————————————
    cgminer 3.1.1
    ————————————————————————

    Configuration Options Summary:

    curses.TUI………..: FOUND: -lncurses
    OpenCL……………: FOUND. GPU mining support enabled
    scrypt……………: Enabled
    ADL………………: SDK NOT found, GPU monitoring support DISABLED

    Avalon.ASICs………: Disabled
    BFL.ASICs…………: Disabled
    BitForce.FPGAs…….: Disabled
    Icarus.FPGAs………: Disabled
    ModMiner.FPGAs…….: Disabled
    Ztex.FPGAs………..: Disabled

    Compilation…………: make (or gmake)
    CPPFLAGS………….:
    CFLAGS……………: -g -O2 -Wall
    LDFLAGS…………..:
    LDADD…………….: -L/usr/local/Cellar/curl/7.30.0/lib -lcurl -ljansson -lpthread -framework OpenCL -lm

    Installation………..: make install (as root if needed, with ‘su’ or ‘sudo’)
    prefix……………: /usr/local

    Pup-Patrol:cgminer-3.1.1 Kade$ sudo make install
    Password:
    Making install in lib
    GEN signal.h
    GEN stdint.h
    GEN string.h
    make install-recursive
    CC memmem.o
    AR libgnu.a
    /usr/bin/ranlib: file: libgnu.a(dummy.o) has no symbols
    ranlib: file: libgnu.a(dummy.o) has no symbols
    make[4]: Nothing to be done for `install-exec-am’.
    make[4]: Nothing to be done for `install-data-am’.
    Making install in compat
    make[3]: Nothing to be done for `install-exec-am’.
    make[3]: Nothing to be done for `install-data-am’.
    Making install in ccan
    make[2]: Nothing to be done for `install-exec-am’.
    make[2]: Nothing to be done for `install-data-am’.
    CC cgminer-cgminer.o
    CC cgminer-util.o
    util.c: In function ‘keep_sockalive’:
    util.c:207: warning: unused variable ‘tcp_keepidle’
    util.c: In function ‘__stratum_send’:
    util.c:970: error: ‘MSG_NOSIGNAL’ undeclared (first use in this function)
    util.c:970: error: (Each undeclared identifier is reported only once
    util.c:970: error: for each function it appears in.)
    make[1]: *** [cgminer-util.o] Error 1
    make: *** [install-recursive] Error 1
    Pup-Patrol:cgminer-3.1.1 Kade$

  55. Kade Says:

    any idea what Segmentation Fault 11 means which running Cgminer?

  56. Lacedaemon Says:

    @Kade:

    Did you actually get CGMiner to make/compile? I’m getting the same error as you when make-ing CGMiner, but I’m on OS X Mountain Lion 10.8.3.

    Any ideas?

  57. Rich Says:

    Hello,

    I followed your instructions and everything seemed to install OK. When I run “cgminer” I do not get any text to indicate its working (my terminal window flashes and thats it).

    Where can I see logging to show why the screen flashes (for a split second) and then disappears?

    Below is the last logging I saw during installation. I did want to attempt to use my video card (and logging seems to indicate OpenCL support enabled. Any thoughts?

    ————————————————————————
    cgminer 3.2.0
    ————————————————————————

    Configuration Options Summary:

    curses.TUI………..: FOUND: -lncurses
    OpenCL……………: FOUND. GPU mining support enabled
    scrypt……………: Enabled
    ADL………………: SDK NOT found, GPU monitoring support DISABLED

    Avalon.ASICs………: Disabled
    BFL.ASICs…………: Disabled
    BitForce.FPGAs…….: Disabled
    Icarus.FPGAs………: Disabled
    ModMiner.FPGAs…….: Disabled
    Ztex.FPGAs………..: Disabled

    Compilation…………: make (or gmake)
    CPPFLAGS………….:
    CFLAGS……………: -g -O2 -Wall
    LDFLAGS…………..:
    LDADD…………….: -L/usr/local/Cellar/curl/7.30.0/lib -lcurl -ljansson -lpthread -framework OpenCL -lm

    Installation………..: make install (as root if needed, with ‘su’ or ‘sudo’)
    prefix……………: /usr/local

  58. rajat Says:

    @Kade and @Lacedaemon,
    I put in a ghetto hack for MSG_NOSIGNAL that allowed me to compile and provisionally make some progress.

    MSG_NOSIGNAL is a socket or tcp related definition that exists on linux and not mac osx:
    http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html

    I added this line to util.c after the include statements:
    #define MSG_NOSIGNAL 0x2000

    I know it isn’t the correct command, but it’s my best guess and it doesn’t totally destroy the TCP communications. My cgminer is working fine and posting results to litebonk.

  59. rye Says:

    Figured out how to do this – one thing I can’t figure out how to do is to disable the GPU mining. I’m using it with a Block Erupter, but don’t want the GPU to be mining. is this possible?

  60. Kerry Says:

    @Rye – Yes, just add “–disable-gpu” to your command line when you launch cgminer.

  61. rye Says:

    that oddly shut off my amu

  62. Sebas Says:

    So I was able to install it. After entering my username and pwd i get this. Any recommendations????
    Thx!

    [2013-07-17 22:29:15] Probing for an alive pool
    [2013-07-17 22:29:27] Error -2: Creating Command Queue. (clCreateCommandQueue)
    [2013-07-17 22:29:27] Failed to init GPU thread 2, disabling device 1
    [2013-07-17 22:29:27] Restarting the GPU from the menu will not fix this.
    [2013-07-17 22:29:27] Try restarting cgminer.
    [2013-07-17 22:31:24] Error -2: Creating Command Queue. (clCreateCommandQueue)
    [2013-07-17 22:31:24] Failed to init GPU thread 3, disabling device 1
    [2013-07-17 22:31:24] Disabling extra threads due to dynamic mode.
    [2013-07-17 22:31:24] Tune dynamic intensity with –gpu-dyninterval
    [2013-07-17 22:31:25] Network diff set to 26.2M
    [2013-07-17 22:31:25] Error -54: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-07-17 22:31:25] GPU 0 failure, disabling!
    [2013-07-17 22:31:25] Thread 1 being disabled
    [2013-07-17 22:31:25] Error -54: Enqueueing kernel onto command queue. (clEnqueueNDRangeKernel)
    [2013-07-17 22:31:25] GPU 0 failure, disabling!
    [2013-07-17 22:31:25] Thread 0 being disabled

Comment: