0
votes

Here is the operation steps, help me:

charlie@charlie-desktop:~/libphidget-ARM$ ./configure --prefix=/home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/bin/ --host=arm-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-strip... arm-linux-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for arm-linux-gcc... arm-linux-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gcc accepts -g... yes
checking for arm-linux-gcc option to accept ISO C89... none needed
checking whether arm-linux-gcc understands -c and -o together... yes
checking dependency style of arm-linux-gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by arm-linux-gcc... /home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/arm-ntc-linux-gnueabi/bin/ld
checking if the linker (/home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/arm-ntc-linux-gnueabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... //home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/bin/arm-linux-nm -B
checking the name lister (//home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/bin/arm-linux-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to arm-unknown-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/arm-ntc-linux-gnueabi/bin/ld option to reload object files... -r
checking for arm-linux-objdump... arm-linux-objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-linux-ar... arm-linux-ar
checking for archiver @FILE support... @
checking for arm-linux-strip... (cached) arm-linux-strip
checking for arm-linux-ranlib... arm-linux-ranlib
checking command to parse //home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/bin/arm-linux-nm -B output from arm-linux-gcc object... ok
checking for sysroot... no
checking for arm-linux-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking how to run the C preprocessor... arm-linux-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-linux-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-linux-gcc option to produce PIC... -fPIC -DPIC
checking if arm-linux-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-linux-gcc static flag -static works... yes
checking if arm-linux-gcc supports -c -o file.o... yes
checking if arm-linux-gcc supports -c -o file.o... (cached) yes
checking whether the arm-linux-gcc linker (/home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/arm-ntc-linux-gnueabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for arm-linux-gcc... (cached) arm-linux-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether arm-linux-gcc accepts -g... (cached) yes
checking for arm-linux-gcc option to accept ISO C89... (cached) none needed
checking whether arm-linux-gcc understands -c and -o together... (cached) yes
checking dependency style of arm-linux-gcc... (cached) gcc3
checking for ldconfig... /sbin/ldconfig
checking for library containing dlopen... -ldl
checking for library containing sqrt... -lm
checking for library containing pthread_join... -lpthread
checking for library containing iconv... none required
checking for library containing libusb_init... no // ----> something wrong? checking for library containing usb_find_busses... -lusb
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating examples/Makefile
config.status: creating libphidget21.pc
config.status: executing depfiles commands
config.status: executing libtool commands
charlie@charlie-desktop:~/libphidget-ARM$ make

 CC       cusblinux.lo  

linux/cusblinux.c:23:17: fatal error: usb.h: No such file or directory
#include
^
compilation terminated.
Makefile:963: recipe for target 'cusblinux.lo' failed make: *** [cusblinux.lo] Error 1

1

1 Answers

1
votes

You are missing the usb.h header file. You can solve it in two ways.

One is providing the path of usb.h using CFLAGS

./configure CFLAGS=-I<path/to/usb.h>

Or the other way is exporting the PKG_CONFIG_PATH variable

export PKG_CONFIG_PATH=<path/to/the/pkg-config-file> 

To cross compile libusb follow the below steps

./configure --prefix=/home/charlie/SDK_Bovine_vdf_nwl12_2.0.18.9/compiler/bin/ --host=arm-linux 

Then compile it

make 

Finally install it

make install