我正在尝试在Linux Mint 15上编译Cyanogenmod。并收到以下错误。
host StaticLib: libmincrypt (/home/benji/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a)
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-ar only run on 64-bit linux
make: *** [/home/benji/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a] Error 1
make: *** Waiting for unfinished jobs....
# In case value of PACKAGES is empty.
-
benji@ultranoid ~/Source/prebuilts/tools/gcc-sdk $ ./gcc
ERROR: ./../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux
我无法弄清楚造成这种情况的原因。我正在进行64位安装。请指教。
benji@ultranoid ~/Source $ uname -p
x86_64
正如here所指出的,在Android构建系统中,x32 vs x64主机的测试是基于file -L "$SHELL" | grep -q "x86[_-]64"
的输出。换句话说,它测试当前shell是否是64位二进制文件。
所以可能的答案是:检查环境变量$SHELL
的值是否是shell可执行文件的有效路径。
chsh
或更改shelluname -m
to check system.#file -L“$ SHELL”| grep -q“x86 [_-] 64”
#if [$? != 0];然后
# $SHELL is not a 64-bit executable, so assume our userland is too.
#echo“ERROR:$ MY_TOOL只在64位linux上运行”
#退出1
#fi
ARCH_OS = uname -m | tr '[:upper:]' '[:lower:]'
if [ "$ARCH_OS" != "x86_64" ] ; then
echo "ERROR: $MY_TOOL only run on 64-bit linux from uname -m"
exit 1
fi