I am at my wits end trying to get this binary driver libftd2xx.so.0.4.13 to work on my platform. I have tried to compile openocd two different ways, both with different results.
Method one: Follow all instructions on ftdi’s website and openocd:
unzip tarball
cp libftd2xx.so.0.4.13 /usr/local/lib/libftd2xx.so.0.4.13
make symbolic links in all locations specified in README etc.
compile openocd with:
./configure --enable-ft2232_ftd2xx --with-ftd2xx=/home/brianp/tmp/new/
make
..................
mv -f .deps/openocd-openocd.Tpo .deps/openocd-openocd.Po
gcc -g -O2 -o openocd openocd-openocd.o .._/src/xsvf/libxsvf.a .._/src/target/libtarget.a .._/src/jtag/libjtag.a .._/src/helper/libhelper.a .._/src/server/libserver.a .._/src/helper/libhelper.a .._/src/flash/libflash.a .._/src/target/libtarget.a .._/src/pld/libpld.a -lftd2xx
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.1.3/.._/.._/.._/.._/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/lib/.._/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/bin/.._/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/lib64/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/local/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: cannot find -lftd2xx
collect2: ld returned 1 exit status
make[3]: *** [openocd] Error 1
make[3]: Leaving directory `/home/brphelps/tmp/new/trunk/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/brphelps/tmp/new/trunk/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/brphelps/tmp/new/trunk'
make: *** [all] Error 2
Method 2: chroot jail in 32 bit debian, follow all instructions as before, we’re just in chroot jail this time.
Result: Everything works!
… until I exit the chroot jail:
root@thepackage:~/ext_usbdrive_bak/tmp/trunk# src/openocd
src/openocd: error while loading shared libraries: libftd2xx.so.0: cannot open shared object file: No such file or directory
yes this file is present, I have put this link everywhere also like /usr/lib/ and /usr/local/lib/, yes the link is valid and yes the file is executable by all. Obviously this is not an error with libftd2xx.so.0, but probably with a 32 bit shared library, not being loaded and triggering this error incorrectly.
I have no idea what to do next. I am out of ideas.
Also notice that the _ in the …_/ should not be there, sparkfun does not like this string so I put the _ there.