Linux
無法辨識的 –sysroot 選項。(Eclipse)
我正在嘗試
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
我錯過了什麼?
包含
--sysroot
選項CFLAGS
可解決此問題。