OpenWrt Forum Archive

Topic: crosscompile lualibusb lusb not found

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,
i wold like to try something like this
http://wiki.pinguino.cc/index.php/Interfacing_with_Lua
but having some truble crosscompilig lualibusb...

I can compile lualibusb on my host machine (ubuntu 10.04)

i tried to crosscompile lualibusb following this tutorial:
http://wiki.openwrt.org/doc/devel/crosscompile

but while compilig i have this error:
mipsel-openwrt-linux-uclibc-ld: cannot find -lusb

i think there's some problem linking lusb that i guess stay for libusb (am i wrong???)


here all the message from the compiler:

pippo@clodoveo:~/lualibusb$ make CC=mipsel-openwrt-linux-uclibc-gcc LD=mipsel-openwrt-linux-uclibc-ld
mipsel-openwrt-linux-uclibc-gcc -Wall -D_GNU_SOURCE -I/usr/include/libusb-1.0/ -I/usr/include/lua5.1 -fPIC -o lualibusb lualibusb.o -c -fPIC -fno-stack-protector
mipsel-openwrt-linux-uclibc-gcc: warning: lualibusb.o: linker input file unused because linking not done
mipsel-openwrt-linux-uclibc-ld -shared -soname libluausb.so.1 -o lualibusb.so -lusb lualibusb.o
mipsel-openwrt-linux-uclibc-ld: cannot find -lusb
make: *** [so] Error 1

Can sombody help me??
Tnx

Finally i got it !
libusb.so was not in the righr place.. it had to be inside
<build root dir>staging_dir/ toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/

but after package/libusb/compile it was inside <build root dir>staging_dir/target-mipsel_r2_uClibc-0.9.33.2/lib/

coping libusb.so in the right place solved the issue.

Just to let you know ... cheers!

The discussion might have continued from here.