There was a thread about it recently. Just install libusb-0.1
Problem is, Gentoo (and basically all modern distros) no longer has libusb-0.1 available in packages - just a compatibility layer that doesn't work with the hack used by the program. However, I'm going to share how I worked around it.
* Download fx2pipe and libusb-0.1. Unzip fx2pipe, then unzip libusb-0.1 inside it.
* The Makefile for libusb-0.1 errors out on warnings, so disable that by removing -Werror from line 260 of Makefile.in.
* Compile libusb with " CFLAGS=-O2 ./configure --prefix=`pwd` ", "make", and "make install". Note that because the install was set to use the current directory, root is not necessary for "make install".
* Go down one directory and start patching fx2pipe to use the libusb you just built rather than the system libusb:
** On line 163 of fx2pipe/Makefile.in, replace " -lusb " with " ../libusb-0.1.12/lib/libusb.a ".
** On line 18 of usbio/cycfx2dev.h and line 24 of usbio/wwush.h, replace ' #include <usb.h> ' with ' #include "../libusb-0.1.12/include/usb.h" '.
* Compile fx2pipe with " ./configure" and "make".
The code is quite a mess. It would seriously be easier to just rewrite it from scratch.
If anyone is up to do that, might as well make "fx3pipe" for the FX3 that is also backwards compatible with the FX2. The 40MBps or so the FX2 can do (at least on my PC) is a lot but some applications can use more.
Now I'll have to see if there's an easy way for GNUradio to use fx2pipe as a real time input.