/bin/sh: 1: x86_64-linux-android-gcc: not found error

2,181 views
Skip to first unread message

Geek Till It Hertz

unread,
Nov 11, 2014, 12:27:58 AM11/11/14
to andro...@googlegroups.com
i am building lolllipop and am getting the folloeing error pl. help

target  C: fio <= external/fio/json.c
  GEN     include/usage_compressed.h
  GEN     include/applet_tables.h
  CC      applets/applets.o
/bin/sh: 1: x86_64-linux-android-gcc: not found
make[3]: *** [applets/applets.o] Error 127
make[2]: *** [applets_dir] Error 2
make[1]: *** [prepare] Error 2
make[1]: Leaving directory `/home/ric/android-x86/external/busybox'
make: *** [/home/ric/android-x86/out/target/product/x86/obj/busybox/full/.config] Error 2
make: *** Deleting file `/home/ric/android-x86/out/target/product/x86/obj/busybox/full/.config'
make: *** Waiting for unfinished jobs....
rm out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_dri_common_intermediates/xmlpool/fr.po out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_dri_common_intermediates/xmlpool/es.po out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_dri_common_intermediates/xmlpool/nl.po out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_dri_common_intermediates/xmlpool/de.po out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_dri_common_intermediates/xmlpool/sv.po
ric@ric-ubuntu:~/android-x86$ 

Message has been deleted

rbg

unread,
Nov 11, 2014, 2:44:29 AM11/11/14
to andro...@googlegroups.com
1) have you resync'd your source........

2) I'm still fixing the 64-bit target (android_x86_64). 
      (see first post in this thread)

3) check your build enviornment, lollipop only compiles with java 7, see AOSP Build Enviornment

Vaidotas

unread,
Nov 11, 2014, 2:49:11 AM11/11/14
to andro...@googlegroups.com
I got the same error when building on Ubuntu 12.04.5 LTS. I had to find where x86_64-linux-android-gcc binary was (somewhere in repo directory, use find) and add that directory to PATH.
On the side note, I didn't have this error when I was building kitkat branch some time ago.

Geek Till It Hertz

unread,
Nov 11, 2014, 3:49:58 AM11/11/14
to andro...@googlegroups.com
thnx 
i had deleted the source fearing it might have downloaded improperly 
will resync useing source forge ang get back 

Chih-Wei Huang

unread,
Nov 11, 2014, 4:03:08 AM11/11/14
to Android-x86
2014-11-11 16:49 GMT+08:00 Geek Till It Hertz <sahaj...@gmail.com>:
> thnx
> i had deleted the source fearing it might have downloaded improperly

No need to delete it.
Just 'repo sync' until there is no error.

> will resync useing source forge ang get back

Sorry the sourceforge mirror is not updated.
Don't use it now.


To be honest, I have seen this error once before
releasing test. But it disappeared after I re-open
a clean build environment.
So I'm not sure what's wrong.

Basically speaking, you should use

. build/envsetup.sh; lunch android_x86-userdebug

to prepare your build environment.
After lunch command, the toolchain path should be
added to your PATH variable.
You can check if the toolchain gcc is runnable.
If not, there is something wrong in your build environment.

$ . build/envsetup.sh; lunch android_x86-userdebug
including device/generic/x86/vendorsetup.sh
including device/generic/x86_64/vendorsetup.sh
including sdk/bash_completion/adb.bash

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.0
TARGET_PRODUCT=android_x86
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
TARGET_CPU_VARIANT=
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-32-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=LRX21M
OUT_DIR=out
============================================

$ x86_64-linux-android-gcc -v
Using built-in specs.
COLLECT_GCC=x86_64-linux-android-gcc
COLLECT_LTO_WRAPPER=/home/cwhuang/git/lollipop-x86/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin/../libexec/gcc/x86_64-linux-android/4.9/lto-wrapper
Target: x86_64-linux-android
Configured with: /s/ndk-toolchain/src/build/../gcc/gcc-4.9/configure
--prefix=/tmp/ndk-andrewhsieh/build/toolchain/prefix
--target=x86_64-linux-android --host=x86_64-linux-gnu
--build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld
--enable-languages=c,c++
--with-gmp=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-mpfr=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-mpc=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-cloog=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-isl=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--with-ppl=/tmp/ndk-andrewhsieh/build/toolchain/temp-install
--disable-ppl-version-check --disable-cloog-version-check
--disable-isl-version-check --enable-cloog-backend=isl
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic
-lm' --disable-libssp --enable-threads --disable-nls
--disable-libmudflap --disable-libgomp --disable-libstdc__-v3
--disable-sjlj-exceptions --disable-shared --disable-tls
--disable-libitm --with-arch=x86-64 --with-tune=intel
--with-fpmath=sse --with-multilib-list=m32,m64,mx32
--enable-initfini-array --disable-nls
--prefix=/tmp/ndk-andrewhsieh/build/toolchain/prefix
--with-sysroot=/tmp/ndk-andrewhsieh/build/toolchain/prefix/sysroot
--with-binutils-version=2.24 --with-mpfr-version=3.1.1
--with-mpc-version=1.0.1 --with-gmp-version=5.0.5
--with-gcc-version=4.9 --with-gdb-version=7.6
--with-python=/usr/local/google/home/andrewhsieh/mydroid/ndk/prebuilt/linux-x86_64/bin/python-config.sh
--with-gxx-include-dir=/tmp/ndk-andrewhsieh/build/toolchain/prefix/include/c++/4.9
--with-bugurl=http://source.android.com/source/report-bugs.html
--disable-bootstrap --disable-libquadmath --enable-plugins
--enable-libgomp --disable-libcilkrts --disable-libsanitizer
--enable-gold --enable-graphite=yes --with-cloog-version=0.18.0
--with-isl-version=0.11.1 --enable-eh-frame-hdr-for-static
--program-transform-name='s&^&x86_64-linux-android-&'
--enable-gold=default
Thread model: posix
gcc version 4.9 20140514 (prerelease) (GCC)

Geek Till It Hertz

unread,
Nov 11, 2014, 4:50:07 AM11/11/14
to andro...@googlegroups.com
thank you 
i had already deleted the source out of frustration (my internet connection is way slow and flaky)
this exactly solves my problem
i'll get back once source is downloaded (more than 24hrs) and report how it went
any particular reason this appears on lollipop and not on kitkat??

Chih-Wei Huang

unread,
Nov 11, 2014, 4:57:16 AM11/11/14
to Android-x86
2014-11-11 17:50 GMT+08:00 Geek Till It Hertz <sahaj...@gmail.com>:
> thank you
> i had already deleted the source out of frustration (my internet connection
> is way slow and flaky)
> this exactly solves my problem
> i'll get back once source is downloaded (more than 24hrs) and report how it
> went

DO NOT delete the .repo dir
to avoid re-downloading.

> any particular reason this appears on lollipop and not on kitkat??

I think you did not use lunch so you encounter the issue.
This happens in both lollipop-x86 and kitkat-x86.

I'm discussing with the busybox porting maintainer
to revise a more reliable make rules.

Geek Till It Hertz

unread,
Nov 11, 2014, 5:45:56 AM11/11/14
to andro...@googlegroups.com
pl. add the above mentioned two steps to http://www.android-x86.org/getsourcecode
so that others may refer to it.
thnx

Geek Till It Hertz

unread,
Nov 12, 2014, 8:12:49 PM11/12/14
to andro...@googlegroups.com
Yup thnx
Works perfectly!!
Reply all
Reply to author
Forward
0 new messages