我正在尝试sysroot
为该autotools
项目使用arm交叉编译。我用于autogen
脚本的选项如下。
CC=arm-linux-gnueabihf-gcc --with-sysroot=/opt/sysroot/dir \
--host=arm-linux-gnueabihf --sysroot=/opt/sysroot/dir --prefix=/some/dir
但是在 eclipse 插件中显示该--sysroot
选项无法识别,但相同的命令在终端中运行良好。
ERROR:
configure: error: unrecognized option: --sysroot=/opt/sysroot/dir
configure: error: unrecognized option: --sysroot=/opt/sysroot/dir
Try ./configure --help' for more information
如果我删除--sysroot
Eclipse 中的选项,那么autogen
工作正常,但我收到以下链接器错误。
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/../lib/libwebkit_clutter-0.so when searching for -lwebkit_clutter-0
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible //usr/lib/libwebkit_clutter-0.so when searching for -lwebkit_clutter-0
make[2]: Leaving directory `/home/dir/workspace/Sharukh/sources/applications'
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lwebkit_clutter-0
make[1]: Leaving directory `/home/dir/workspace/Sharukh/sources'
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /usr/lib/../lib/libwebkit_clutter_mx.so when searching for -lwebkit_clutter_mx
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible //usr/lib/libwebkit_clutter_mx.so when searching for -lwebkit_clutter_mx
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lwebkit_clutter_mx
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible /lib/../lib/libcgroup.so when searching for -lcgroup
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible //lib/libcgroup.so when searching for -lcgroup
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lcgroup
collect2: error: ld returned 1 exit status
make[2]: *** [bin_Sharukh] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
我缺少什么?
答案1
包含--sysroot
选项可解决CFLAGS
此问题。