Reputation: 2068
I am trying to compile Cyanogenmod on Linux Mint 15. And receive the following error.
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
I can't figure out what is causing this. I am on a 64 bit install. Please advise.
benji@ultranoid ~/Source $ uname -p
x86_64
Upvotes: 3
Views: 2696
Reputation: 81
uname -m
to check system.#file -L "$SHELL" | grep -q "x86[_-]64"
#if [ $? != 0 ]; then
# $SHELL is not a 64-bit executable, so assume our userland is too.
# echo "ERROR: $MY_TOOL only run on 64-bit linux"
# exit 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
Upvotes: 0
Reputation: 101
As pointed out here, within Android build system the test for x32 vs x64 host is based on the output of file -L "$SHELL" | grep -q "x86[_-]64"
. In other words it tests whether or not current shell is a 64 bit binary.
So a possible answer is : check out if value of environmental variable $SHELL
is a valid path to a shell executable.
You may try to change shell with chsh
or
create a link to your favorite shell so that $SHELL is satisfied. The latter did the trick for me - I've simply linked /bin/bash to where $SHELL pointed.
Upvotes: 4
Reputation: 2068
Workaround
Comment out lines 23-38 of prebuilts/tools/gcc-sdk/gcc
Example: http://pastebin.com/qH0BYcSF
Upvotes: 6