Bitcoin Forum

Other => Beginners & Help => Topic started by: dennisc on November 19, 2013, 06:40:53 AM



Title: compiling bfgminer for raspberrypi
Post by: dennisc on November 19, 2013, 06:40:53 AM
Reference:  https://bitcointalk.org/index.php?topic=291456.msg3632179#msg3632179 (https://bitcointalk.org/index.php?topic=291456.msg3632179#msg3632179)

Quote
Re: [CLOSED] NanoFury NF1 USB stick - Group Buy + Product Assembly
Today at 01:06:34 AM

Anyone managed to get the latest bfgminer to compile on FreeBSD 9.2-RELEASE?

The configure script can't seem to find libusb for some reason which is in the standard location  /usr/lib/libusb.a

I got bfgminer to compile on my Mac with Snow Leopard, but it gives a segfault when I try and mine. No luck on either platform.

This sounds like a similar problem on compiling bfgminer for raspberrypi.  I was advised to provide libusb because the one provided by rasbpian was not appropriate. It would compile, but the result was not useable.

The solution may be as follows: cd into your bfgminer-x.y.x and make a directory libusb for the purpose of compiling the libusb.

I used an earier version of the source. However, I suggest using the latest bfgminer source; then unzip and change iinto the directory.

Code:
wget http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.6.0/bfgminer-3.6.0.zip
unzip bfgminer-3.6.0.zip
cd bfgminer-3.6.0/

 wget the libusb source from sourceforge.net .  Extract the .tar.bz2 source. cd into the resulting directory.
Execute commands ./configure and make. Note that I do NOT do a "make install".


Code:
mkdir libusb
cd libusb
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.16-rc10/libusb-1.0.16-rc10.tar.bz2
tar -xf libusb-1.0.16-rc10.tar.bz2
cd libusb-1.0.16-rc10
./configure
make

cd up a couple levels back to your bfgminer directory.  The apt-get commands will no doubt be different for FreeBSD. Moreover, the libjason-dev may not be necessary, or you may already have it. Take a close look at the ./configure comand with the LIBUSB_CFLAGS= and LIBUSB_LIBS= . This is the next to last line. The purpose is to pass the path to the usb libraries previously compiled to the ./configure command. I have no experience with BSD and don't know if this will work.

Code:
cd ../..
 sudo apt-get update && apt-get -y install uthash-dev libjansson-dev
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-icarus --disable-avalon --disable-opencl --disable-bitforce --disable-modminer --disable-x6500 --without-sensors --enable-bitfury
make

The only claim that I can make is that this worked for rasbpian (debian for raspberrypi). Keep in mind that I am running a red furry rather than a nanofury on a raspberrypi.


Title: Re: compiling bfgminer for raspberrypi
Post by: RicRock on November 19, 2013, 11:29:00 PM
I have no trouble with blue fury's or BE's on my Pi

But will give this a go for my nano's


Title: Re: compiling bfgminer for raspberrypi
Post by: RicRock on November 20, 2013, 12:08:04 AM
same errors as previously compiled bfgminer


Title: Re: compiling bfgminer for raspberrypi
Post by: hydragroup on March 28, 2014, 06:36:14 PM
maybe this is the lib you're looking for?

 - https://github.com/libusb/libusb

or

 - http://libhid.alioth.debian.org/

I'm also having issues with a nanofury on Raspberry Pi, any luck with this?


Title: Re: compiling bfgminer for raspberrypi
Post by: Flashman on March 28, 2014, 07:01:25 PM
Heard of this?

http://minepeon.com/index.php/Main_Page

Maybe dig bits out of their git and sourceforge...