Reference:
https://bitcointalksearch.org/topic/m.3632179Re: [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.
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".
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.
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.