Hi i rookie in linux compiling. I have a linux on my PC with toolchain installed and also i have a ARM based on EP9315 with linux on it. First step in ununderstanding of cross-compile was a compile of nano i do that with: ./configure CC=/usr/local/arm/4.3.4-armv4t-arm920t-eabi/usr/bin/arm-linux-gcc CPP='/usr/local/arm/4.3.4-armv4t-arm920t-eabi/usr/bin/arm-linux-gcc -E' --prefix=/home/zaa/armprojects/nano1 --target=armv4t-arm920t-eabi –host=i686-linux-gnu make install copy result on arm and all runs OK. Now i want to compile libusb. I try it with ./configure CC=/usr/local/arm/4.3.4-armv4t-arm920t-eabi/usr/bin/arm-linux-gcc CPP='/usr/local/arm/4.3.4-armv4t-arm920t-eabi/usr/bin/arm-linux-gcc -E' --prefix=/home/zaa/FTDI/FTDI2/libusbdes --host=arm-linux make install copy library on arm /usr/bin directory. Write a simple program with using libusb.h compile it with dynamic linking. Copy programm to arm but when i launch programm it return segmentation fault =(
libusb compiling
Just curious why you do : --target=armv4t-arm920t-eabi –host=i686-linux-gnu for nano then --host=arm-linux for libusb. I am not a cross-compile guru, but this seems inconsistent.
Xaver, are you sure you dynamically link your own program against the correct library and its headers? Maybe you include the libusb.h from your host, that differs from the one on your ARM. It always gives funny runtime errors if your host system leaks in.
When i do --host=armv4t-arm920t-eabi, configure script returns checking operating system... configure: error: unsupported operating system i search for differs in libusb.h files using diff command and they are equal. Recompile using arm libusb.h and nothing changes