michu posted on Aug 22 2006 at 06:39 AM said:
ok i solved the problem. i documented all steps here:
basic crosscompile stuff
Thanks for the notes on cross compiling they have helped me alot. I'm trying to cross compile capture-1.0.3-cvs-20060706 which deps on libptp2-1.1.0 which deps on libusb-0.1.12.
So far I have managed to compile libusb OK and make a few veggie test programs that can scan usb buses for certain devices. I trying to control canon digital cameras for timelapse photography.
When I run configure the first error I got was that libusb-config couldn't be found so I modified the makefiles to point to the cross compiled version rather than the local version. Now I get this error after alot of warnings (I get the same warnings doing the native compile and it works)
andy@liny:~/cross/libptp2-1.1.0> make
make all-recursive
make[1]: Entering directory `/home/andy/cross/libptp2-1.1.0'
Making all in src
make[2]: Entering directory `/home/andy/cross/libptp2-1.1.0/src'
if /bin/sh ../libtool --tag=CC --mode=compile gp2x-gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT ptp.lo -MD -MP -MF ".deps/ptp.Tpo" -c -o ptp.lo ptp.c; \
then mv -f ".deps/ptp.Tpo" ".deps/ptp.Plo"; else rm -f ".deps/ptp.Tpo"; exit 1; fi
mkdir .libs
gp2x-gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT ptp.lo -MD -MP -MF .deps/ptp.Tpo -c ptp.c -fPIC -DPIC -o .libs/ptp.o
In file included from ptp.c:89:
ptp-pack.c: In function 'ptp_unpack_string':
ptp-pack.c:79: warning: pointer targets in passing argument 2 of 'dtoh16ap' differ in signedness
ptp-pack.c: In function 'ptp_pack_string':
<snip>
ptp-pack.c: In function 'ptp_unpack_Canon_FE':
ptp-pack.c:720: warning: pointer targets in passing argument 2 of 'dtoh32ap' differ in signedness
ptp-pack.c:721: warning: pointer targets in passing argument 2 of 'dtoh16ap' differ in signedness
ptp-pack.c:723: warning: pointer targets in passing argument 2 of 'dtoh32ap' differ in signedness
ptp-pack.c:724: warning: pointer targets in passing argument 2 of 'dtoh32ap' differ in signedness
ptp.c: In function 'ptp_transaction':
ptp.c:313: warning: pointer targets in passing argument 3 of 'params->senddata_func' differ in signedness
make[2]: *** [ptp.lo] Error 1
make[2]: Leaving directory `/home/andy/cross/libptp2-1.1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/andy/cross/libptp2-1.1.0
make: *** [all] Error 2
As this error looks similar to some that you had I was wondering if you have any suggestions