libusb的交叉编译出错

juve008 2011-09-02 03:44:47
本人是新手,最近想学习在android系统上移植USB,3G模块
之前用arm-none-linux-gnueabi进行交叉编译,可以编译成功,但移植到板子上的android系统时却显示
./usb_modeswitch command not found
怀疑是由于板子的android系统是用arm-eabi交叉编译的。
之后我便想用arm-eabi交叉编译libusb,结果出错,请大家帮帮我看这错误是怎么回事。
具体错误如下:
WSCEC@ubuntu:~$ cd 3G/123/libusb-0.1.12/
WSCEC@ubuntu:~/3G/123/libusb-0.1.12$ source ../anv
WSCEC@ubuntu:~/3G/123/libusb-0.1.12$ export ROOT=/home/WSCEC/Android/out/target/product/omap3evm/obj
WSCEC@ubuntu:~/3G/123/libusb-0.1.12$ ./configure --build=i686-linux --host=arm-eabi CPPFLAGS="-I$ROOT/include/" CFLAGS="-nostdlib" LDFLAGS="-Wl,-rpath-link=$ROOT/lib/ -L$ROOT/lib/" LIBS="-lc" --prefix=/home/WSCEC/3G/123/libusb-0.1.12/install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
……(中间省略)
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for what USB OS support... unknown operating system
configure: error: libusb does not support compiling for arm-unknown-eabi

其实anv是我弄的环境变量。

后面我看了下config.log:如下:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libusb configure 0.1.12, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure --build=i686-linux --host=arm-eabi CPPFLAGS=-I/home/WSCEC/Android/out/target/product/omap3evm/obj/include/ CFLAGS=-nostdlib LDFLAGS=-Wl,-rpath-link=/home/WSCEC/Android/out/target/product/omap3evm/obj/lib/ -L/home/WSCEC/Android/out/target/product/omap3evm/obj/lib/ LIBS=-lc --prefix=/home/WSCEC/3G/123/libusb-0.1.12/install

## --------- ##
## Platform. ##
## --------- ##

hostname = ubuntu
uname -m = i686
uname -r = 2.6.38-10-generic
uname -s = Linux
uname -v = #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011
……(省略)
configure:2828: $? = 0
configure:2832: test -z
|| test ! -s conftest.err
configure:2835: $? = 0
configure:2838: test -s conftest.o
configure:2841: $? = 0
configure:2852: result: yes
configure:2869: checking for arm-eabi-gcc option to accept ANSI C
configure:2939: arm-eabi-gcc -c -nostdlib -I/home/WSCEC/Android/out/target/product/omap3evm/obj/include/ conftest.c >&5
conftest.c:17:19: error: stdio.h: No such file or directory
conftest.c:18:23: error: sys/types.h: No such file or directory
conftest.c:19:22: error: sys/stat.h: No such file or directory
conftest.c:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
conftest.c:51: error: expected declaration specifiers or '...' before 'FILE'
……
#endif
#ifdef __cplusplus
void exit (int);

configure: exit 1

求各位大神们 帮帮我看看怎么回事
...全文
543 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
xqhrs232 2011-12-22
  • 打赏
  • 举报
回复
今天按LZ的方法来交叉编译LIBUSB也报同样的错误--libusb does not support compiling for arm-unknown-eabi
qthsrs232 2011-12-21
  • 打赏
  • 举报
回复
正好也有这样的问题!

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧