Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Add libusb compile information to README
Browse files Browse the repository at this point in the history
  • Loading branch information
kanoi committed Aug 9, 2013
1 parent d06b0d9 commit d470828
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,51 @@ Dependencies:
(This is only required for ASIC+FPGA support)


Before compiling cgminer, if you are using any USB devices you need to build libusb

Some versions of libsub have a timeout bug.
This shows up mostly with the ICA and AMU USB1.1 devices.

To compile cgminer with a known working version of libusb
First install udev-dev via one of:
Ubuntu derivatives: apt-get install libudev-dev
Arch: it should be installed by default as part of systemd
Fedora: yum install libgudev1
Mingw: not required

In the cgminer folder create a subfolder called libusb
mkdir libusb
cd libusb
Now, in that folder get and extract the known working libusb
libusb-1.0.16-rc10.tar.bz2

It is available here:
http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.16-rc10/

In linux and mingw you extract with:
tar -xvf libusb-1.0.16-rc10.tar.bz2

Then to build it:
cd libusb-1.0.16-rc10
./configure
make
cd ../..

Now when you configure cgminer as listed further below in the build
instructions, for all the USB devices you must add libusb as follows:
LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev" ./configure --enable-bflsc --enable-icarus --enable-bitforce --enable-modminer --enable-ztex --enable-avalon

On Fedora18 you need -lrt also:
LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev -lrt" ./configure --enable-bflsc --enable-icarus --enable-bitforce --enable-modminer --enable-ztex --enable-avalon

On Windows mingw:
LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.dll.a" ./configure --enable-bflsc --enable-icarus --enable-bitforce --enable-modminer --enable-ztex --enable-avalon

After compiling on windows you need to copy
./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.dll
into the current cgminer folder before running cgminer


CGMiner specific configuration options:
--disable-opencl Override detection and disable building with opencl
--disable-adl Override detection and disable building with adl
Expand Down

0 comments on commit d470828

Please sign in to comment.