error compiling Android on ubuntu 11.10 - android

I am getting following error while compiling Android on ubuntu 11.10
target arm C: libc <= bionic/libc/bionic/pthread.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o] Error 1
Any Clue?

It can't find cc1. On my fresh install of Ubuntu 11.10 it's installed but not in my path. Try adding it manually to your path.
export PATH=<pathtoitgoeshere>:$PATH
On my Ubuntu, it was found at
/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1
But you can find it for yours by using
gcc -print-prog-name=cc1

I have spent about a day to find root cause of this: arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file... and others issues. The issue was that I unpacked NDK and SDK with 7z which removed executable permission for all binaries and Eclipse was not able to start cc1. Once I unpacked tar files of SDK and NDK using tar, everything started working well.
PS. I hope it will safe a day for others.

I encountered this problem after upgrading from Ubuntu 12.04 => 14.04.
Seems like the build-essential package wasn't upgraded properly. For me, I was able to fix by doing
sudo apt-get purge gcc
sudo apt-get install gcc

Related

How to fix cannot find libgcc.a: No such file or directory error

I'm trying to make a standalone compile of the kernel for my android phone, using Google Toolchain, and have already tried Uber and linarc.
All of them give the same error, which I don't understand:
/home/aayushgupta219/kernel/toolchain64/bin/aarch64-linux-android-ld: cannot find libgcc.a: No such file or directory
/home/aayushgupta219/kernel/toolchain64/bin/aarch64-linux-android-ld: cannot find libgcc.a: No such file or directory
Makefile:814: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Here is a copy of the source.
Here is a copy of the logfile
OK. In case anyone is having same error and finding no fix here is my own fix for it. I was on Ubuntu 16.04 having gcc5 and was getting this error. I upgraded to Ubuntu 17.04 with gcc6 preinstalled and now no more such errors.
-Fist of all
use command
gcc -m32 -print-libgcc-file-name.
then use
sudo apt-get install -y build-essential gdb git vim
sudo apt-get install gcc-multilib
if it dosent work.
-Second
gcc -m32 -print-libgcc-file-name will give you a path that include libgcc.a.
just copy that to this place.
that path is /usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc.ain my computer
use cp /usr/lib/gcc/x86_64-linux-gnu/7/32/libgcc.a ./

Compiling and installing OpenSSH android NDK

hi i am following this guide (https://wiki.openssl.org/index.php/Android) on compiling and installing OpenSSH for Android NDK and get the following error when i execute this command:
sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib
The error below:
make[1]: Nothing to be done for `install'.
making install in tools...
installing libcrypto.a
/bin/sh: /arm-linux-androideabi-ranlib: No such file or directory
Am not sure where it is trying to find this file or what this file is?
I had to execute export ANDROID_TOOLCHAIN= /path/to/toolchain again as the setEnv-android.sh did not set the toolchain environment for some odd reason

Why the error "no such file or directory" prompted when run the android NDK compiling command arm-linux-androideabi-*?

On my Ubuntu 16.04LTS, there is a Android NDK r8 development kit. When I run toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc, I've gotten a error like "no such file or directory" saying there is no such file. I've tried other commands such as arm-linux-androideabi-g++ etc.., too, but the error is still there. I've also checked those files mode to assure I have the read and executable permission.
I've found the answer myself.
I run
file arm-linux-androideabi-gcc
which says the command is ELF 32-bit LSB executable. Then I get the idea about the reason.
I guess the reason is that my Ubuntu 16.04LTS is a 64bit system and has only one architecture: amd64. So I add the 32bit architecture according to Multiarch/HOWTO
dpkg --add-architecture i386
apt-get update
apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Then I run the command arm-linux-androideabi-gcc again, it's successfully.

ADT - libstdc++.so.6: cannot open shared object file

I have Fedora 20 64-bits, and I have a problem with Android Development Tools.
When I try to run project I have these errors:
[2014-05-11 22:08:03 - TestAp] /home/damian/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt:
error while loading shared libraries: libstdc++.so.6: cannot open
shared object file: No such file or directory
[2014-05-11 22:08:03 - appcompat_v7] /home/damian/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt:
error while loading shared libraries: libstdc++.so.6: cannot open
shared object file: No such file or directory
I know that my question is also writing here but the solutions is not working with Fedora 20.
I'm not totally sure about Fedora 20, but I had this same problem in Ubuntu 14.04 and installing these libraries fixed it.
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
See this post:
Android SDK - aapt error : libstdc++.so.6 cannot open shared object file
On installing NDK, on RedHat x64 these commands was helpful for me:
yum update
yum install libstdc++.i686
yum install compat-libstdc++-33.i686
Os:
[root#VM-Lin-CentOS ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)

Android NDK - building TessTwo (Fork of Tesseract Tools for Android) - ndk-build fails

when I run ndk-build, it fails complaining from the following errors:
$ ndk-build
make: /…/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
Compile arm : jpeg <= jcapimin.c
make: /…/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: *** [obj/local/armeabi/objs/jpeg/jcapimin.o] Error 127
The problem is that although it says "command not found", "arm-linux-androideabi-gcc" exists in the above path. Even when I run "arm-linux-androideabi-gcc" directly from /…/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/ it gives the same error of "command not found"
I also added ./toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin to my PATH but still getting the same error. Even I tried different versions of ndk (7, 7b, 6b) still same error! seems to me the above gcc is meant for 32bit machines whereas my machine is "Linux 2.6.32-37-server x86_64". but I guess the ndk package should work for both 32 and 64bit. am I right? do I need to compile or build ndk before using it? I assume downloading and unpacking is all I have to do. right? how about sdk? I just downloaded and unpacked it at the same folder that I have my ndk. do I need to configure them to work with each other
I ran into the same problem. You are right, the problem is due to trying to run a 32-bit binary on a 64-bit kernel.
I solved it on Ubuntu 11.10 by installing the 32-bit compatibility libs:
sudo apt-get install ia32-libs

Categories

Resources