{"id":3215,"date":"2014-01-19T17:48:29","date_gmt":"2014-01-19T17:48:29","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/?p=3215"},"modified":"2014-01-19T17:50:31","modified_gmt":"2014-01-19T17:50:31","slug":"building-cgminer-from-source-on-osx","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/building-cgminer-from-source-on-osx\/","title":{"rendered":"building cgminer from source on OSX"},"content":{"rendered":"<p>so you cloned the cgminer repo from github to build on your OSX machine and you get this bullshit error<\/p>\n<p><code>$ .\/autogen.sh<br \/>\nreadlink: illegal option -- f<br \/>\nusage: readlink [-n] [file ...]<br \/>\nusage: dirname path<br \/>\ntouch: \/ltmain.sh: Permission denied<br \/>\nUse of chdir('') or chdir(undef) as chdir() is deprecated at \/usr\/local\/bin\/autoreconf line 670.<br \/>\nConfiguring...<br \/>\n.\/autogen.sh: line 10: \/configure: No such file or directory<br \/>\n<\/code><\/p>\n<p><strong>readlink<\/strong> works differently in OSX and the current version of the autogen.sh script seems like it wasn&#8217;t tested on OSX (wonder why didn&#8217;t they use a simple bs_dir=`pwd`, the answer is probably  canonical paths and what not). <\/p>\n<p>To keep moving along, open the autogen.sh script and just change the value of the <strong>bs_dir<\/strong> variable to the full real path of where you have cloned the cgminer source code.<\/p>\n<p>then execute your autogen script, make sure to enable compilation flags for your ASIC hardware, in my case I remember seeing &#8216;icarus&#8217; on a binary build of cgminer I tried before, so I did<\/p>\n<p><code>.\/autogen.sh --enable-icarus<\/code><\/p>\n<p>you might want to enable all of them if you&#8217;re not sure what hardware you have or you will have in the future as you may not like the joys of building software (check out the  the README for all the &#8211;enable-xxx options available)<\/p>\n<p>If you&#8217;re getting errors on your configuration script due to missing dependencies, I strongly recommend you use Homebrew to install these packages (if you are using Macports or Fink, I strongly suggest you completely remove that crap from your computer and go 100% with brew, it works really well if you&#8217;re building a lot of code on a regular basis):<\/p>\n<p><code>brew install autoconf automake autoreconf libtool openssl curses curl<\/code><\/p>\n<p>brew, at the point of this writing didn&#8217;t have libcurl, so that one you will have to download, .\/configure, make and sudo make install yourself from here http:\/\/curl.haxx.se\/download.html (I used version 7.34 when I did it)<\/p>\n<p>after that the autogen script should work, and then you should be just one &#8216;make&#8217; away from your goal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>so you cloned the cgminer repo from github to build on your OSX machine and you get this bullshit error $ .\/autogen.sh readlink: illegal option &#8212; f usage: readlink [-n] [file &#8230;] usage: dirname path touch: \/ltmain.sh: Permission denied Use of chdir(&#8221;) or chdir(undef) as chdir() is deprecated at \/usr\/local\/bin\/autoreconf line 670. Configuring&#8230; .\/autogen.sh: line [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,30],"tags":[1258,232,1371,1259,750,1367],"class_list":["post-3215","post","type-post","status-publish","format-standard","hentry","category-code","category-geeklife","tag-bitcoin","tag-building","tag-compiling","tag-mining","tag-osx","tag-unix"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-PR","jetpack-related-posts":[{"id":3236,"url":"https:\/\/www.gubatron.com\/blog\/how-to-actually-build-bitcoin-on-mac-osx-10-9-1\/","url_meta":{"origin":3215,"position":0},"title":"How to actually build bitcoin on Mac OSX 10.9.1","author":"gubatron","date":"February 3, 2014","format":false,"excerpt":"First of all, if you have Macports, do yourself a favor and get rid of it. Then make sure you have Homebrew installed and all the packages installed by it up to date. 1. Let's install all the dependencies for Bitcoin hacking. brew install autoconf automake berkeley-db4 boost miniupnpc openssl\u2026","rel":"","context":"In &quot;BitCoin&quot;","block_context":{"text":"BitCoin","link":"https:\/\/www.gubatron.com\/blog\/category\/bitcoin-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1208,"url":"https:\/\/www.gubatron.com\/blog\/mac-osx-terminal-to-slow-to-open\/","url_meta":{"origin":3215,"position":1},"title":"Mac OSX Terminal too slow to open?","author":"gubatron","date":"April 3, 2009","format":false,"excerpt":"Try this: rm ~\/.fonts.cache-1 Open a new Terminal, it should open pretty fast after that.","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":649,"url":"https:\/\/www.gubatron.com\/blog\/tecnotulia-podcast-mac-osx-vs-linux\/","url_meta":{"origin":3215,"position":2},"title":"TecnoTulia Podcast: Mac OSX vs Linux","author":"gubatron","date":"January 30, 2008","format":false,"excerpt":"Hoy tengo el honor de salir en el primer podcast de TecnoTulia, hablando con JM sobre las diferencias, similitudes, ventajas entre Mac OSX y Linux. TecnoTulia es uno de los podcasts que forman parte de una nueva iniciativa llamada OyeEsto Labs.","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":741,"url":"https:\/\/www.gubatron.com\/blog\/how-to-reset-your-joost-profile-on-mac-osx\/","url_meta":{"origin":3215,"position":3},"title":"How to reset your Joost profile on Mac OSX","author":"gubatron","date":"March 19, 2008","format":false,"excerpt":"I've noticed Joost tends to not refresh the content of their channel Line up unless it resets its User Profile. I'm not sure if this trick works on Windows, but it certainly does work for Mac. (Please leave a comment if it works the same way on windows, I don't\u2026","rel":"","context":"In &quot;Joost&quot;","block_context":{"text":"Joost","link":"https:\/\/www.gubatron.com\/blog\/category\/joost\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2186,"url":"https:\/\/www.gubatron.com\/blog\/new-location-of-src-jar-for-jdk-1-6-0_24-on-mac-os-x\/","url_meta":{"origin":3215,"position":4},"title":"New Location of src.jar for JDK 1.6.0_24 on Mac OS X","author":"gubatron","date":"March 5, 2011","format":false,"excerpt":"These Apple devs... why do you keep moving src.jar? Here's the new location: [bash]\/Library\/Java\/JavaVirtualMachines\/1.6.0_24-b07-330.jdk\/Contents\/Home\/src.jar[\/bash] Not there! If you don't see src.jar there, and you're running Mac OSX 10.6, and you did download the Java system update, you will have to go to developer.apple.com and download the \"Java for Mac OS\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2881,"url":"https:\/\/www.gubatron.com\/blog\/solved-kindle-fire-hd-not-being-detected-by-adb\/","url_meta":{"origin":3215,"position":5},"title":"[SOLVED] Kindle Fire HD not being detected by adb","author":"gubatron","date":"November 26, 2012","format":false,"excerpt":"OSX Setup Modify your adb_usb.ini Open the ~\/.android\/adb_usb.ini file for editing and add 0x1949 0x0006 Save the file. Note: Make sure there is only one entry per line. If the file does not exist, create the file and make sure you have the required Android SDK prerequisites configured. Restart the\u2026","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/www.gubatron.com\/blog\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/3215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=3215"}],"version-history":[{"count":4,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/3215\/revisions"}],"predecessor-version":[{"id":3225,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/3215\/revisions\/3225"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=3215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=3215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=3215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}