Compiling cgminer on Ubuntu GNU/Linux

From X86wiki
Jump to: navigation, search

Contents

[edit] Preliminaries

Compiling cgminer on Ubuntu or Mint (Debian derivative distros) the most commonly encountered difficulty is 1) the lack of source file headers for the USB library, and 2) the libcurl library

for 1)

# apt-get install libusb-dev 

Should do the trick; if it does not, you might have to download the libusb-1.0 source code via git and do a fresh compile. We like to put source code folders into /usr/local/src

# git clone git://git.libusb.org/libusb.git
# mv libusb/ /usr/local/src

for 2)

 Go to:

http://curl.haxx.se/download.html and download the latest source; Move it to /usr/local/src. In there:

./configure
make
make install


[edit] The Compile

Set CFLAGS environment variable

 #CFLAGS="-02 -Wall -march=native"

Configure with any special options (in this case the Block Erupter USB ASIC miner)

 #./configure --enable-icarus


libusb headers ubuntu

[edit] Source Sites

[edit] Reference

[edit] AutoReconf