建议在centos下编译apollo,没办法,只有本身搞定在Ubuntu下面的编译问题。
遇到的问题和解决方法以下:
1. no gmake
gmake 其实就是Ubuntu下面的make,只是个别系统如centos携带自身的make,因此用gmake指GNU make。
修改文件: pnx8400_a9_env.sh
----------------------------------------------------------------
# for most linux system such as Ubuntu, gmake is just make
if which gmake ; then
export MAKE='gmake'
else
export MAKE='make'
fi
if [ "$_TMTGTREL" = "retail" ]; then
export MAKE="${MAKE} -s"
fi
------------------------------------------------------------------
2. bash string comparision
target/build/systems/linux/stbtv/makefile
------------------------------------------------------------------
check_config:
@echo -n "Checking environment configuration ... "
@if [ x$(NXP_BASE_ROOT) == x ] ; then \
echo "Error: NXP_BASE_ROOT not set"; \
exit 1; \
fi
------------------------------------------------------------------
这样的语法会存在问题,须要把 == 改为 =进行字符串比较。
refer: http://tldp.org/LDP/abs/html/comparison-ops.html#EQUALSIGNREF
html