交叉编译过很多个库,经常出现sudo make install 安装时出现提示arm-linux-gnueabihf-xxx command not found
以交叉编译tslib库为例
sudo make install 出现以下错误:
/local/tslib/etc/pointercal\" -DTSLIB_INTERNAL -fvisibility=hidden -DGCC_HASCLASSVISIBILITY -O2 -Wall -W -fPIC -module -avoid-version -o linear.la -rpath /usr/local/tslib/lib/ts linear.lo ../src/libts.la -ldl )
/home/ares/work/lib/tslib-1.21/libtool: line 7827: arm-linux-gnueabihf-gcc: command not found
libtool: install: error: relink `linear.la' with the above command before installing it
Makefile:810: recipe for target 'install-pluginexecLTLIBRARIES' failed
经常使用解决办法:
修改libtool文件,将提示错误的交叉编译工具加上绝对路径:
将
# A language specific compiler.
CC="arm-linux-gnueabihf-gcc"
修改为
CC="/opt/gcc-arm-linux-gnueabihf-8.3.0/bin/arm-linux-gnueabihf-gcc"
给提示没有找到的command加上绝对路径