![无法识别的 --sysroot 选项。(Eclipse)](https://linux22.com/image/41105/%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E7%9A%84%20--sysroot%20%E9%80%89%E9%A1%B9%E3%80%82(Eclipse).png)
我正在尝试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
此问题。