Re: [android-building] Weird "Cannot Execute Binary File" error

瀏覽次數:5,754 次
跳到第一則未讀訊息

Jean-Baptiste Queru

未讀,
2012年7月16日 上午11:24:332012/7/16
收件者:android-...@googlegroups.com
You're trying to build on a 32-bit machine, and Jelly Bean requires a
64-bit host (more so than ICS and Gingerbread did).

JBQ

On Sun, Jul 15, 2012 at 6:57 AM, Rohan Mathur <rohanm...@gmail.com> wrote:
> Hi!
>
> So I've been building ICS before and I wanted to try my hand at an AOSP
> port. To get the build environment set up I tried to build AOSP for maguro.
> Whenever I build and I run the lunch/make commands, I get the following
> error:
>
> /bin/bash:
> prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc:
> cannot execute binary file
>
>
> And it repeats itself over quite a few times. I assume this is bad :) My
> build environment is below:
>
> Ubuntu 10.04 Lucid
> GCC 4.6
>
> Does anyone have any ideas? I've searched everywhere but I can't find anyone
> with the same issue as me. I'm a bit of a Linux noob as well, I apologize :)
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Magnus Bäck

未讀,
2013年6月7日 上午11:55:542013/6/7
收件者:android-...@googlegroups.com
On Friday, June 07, 2013 at 01:20 EDT,
janaka seneviratne <janaka.se...@gmail.com> wrote:

> Hi! I get the same error:
>
> prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc:
> cannot execute binary file
>
> even though I am using a x64 bit machine. My config:
>
> gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)

What's the output of 'uname -mpi'?

--
Magnus Bäck
ba...@google.com

manven...@vidurainc.com

未讀,
2013年6月26日 凌晨4:15:422013/6/26
收件者:android-...@googlegroups.com、rohanm...@gmail.com
Can anyone please tell. what the solution to the problem is???


On Sunday, July 15, 2012 6:57:51 AM UTC-7, Rohan Mathur wrote:
Hi!

So I've been building ICS before and I wanted to try my hand at an AOSP port. To get the build environment set up I tried to build AOSP for maguro.
Whenever I build and I run the lunch/make commands, I get the following error:

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file

Magnus Bäck

未讀,
2013年6月26日 上午11:19:122013/6/26
收件者:android-...@googlegroups.com
On Wednesday, June 26, 2013 at 04:15 EDT,
manven...@vidurainc.com wrote:

> Can anyone please tell. what the solution to the problem is???

Please prove that you're actually running a 64-bit operating system on
64-bit hardware by showing the output of this command: uname -mpi

--
Magnus Bäck
ba...@google.com

stephen yu

未讀,
2013年6月28日 清晨5:35:582013/6/28
收件者:android-...@googlegroups.com
i also have the same problem.

my output for uname -mpi:

stephen@stephen-laptop:~$ uname -mpi
i686 unknown unknown

Magnus Bäck

未讀,
2013年6月28日 上午8:37:132013/6/28
收件者:android-...@googlegroups.com
On Friday, June 28, 2013 at 05:35 EDT,
stephen yu <yyu....@gmail.com> wrote:

> i also have the same problem.
>
> my output for uname -mpi:
>
> stephen@stephen-laptop:~$ uname -mpi
> i686 unknown unknown

This would indicate that you're not running a 64-bit operating system
on 64-bit hardware, which is a requirement for building ICS.

--
Magnus Bäck
ba...@google.com

Tracy Smith

未讀,
2015年10月4日 上午10:43:582015/10/4
收件者:Android Building、ba...@google.com
Same problem but on 64 bit.  Have the src on an external drive and a symbolic link to myandroid. But previously on an internal drive and no symbolic link and lunch had no problems.

Permission problem appears to exist for some reason both after doing the git clone or when a mv myandroid to an external drive.  Problem might be permissions not getting set properly or with git checkout of arm-eabi-4.6? Is it necessary to upgrade to the 64bit arm-eabi toolchain, and how do we upgrade to the 64bit arm-eabi toolchain. 

uname -mpi suggest all are 64 bit but the git checkout of android-4.4.3_r1 complains that the toolchain needs to be upgraded to 64bit.

owner:$ uname -mpi
x86_64 x86_64 x86_64


owner:$ cd arm-eabi-4.6
owner:$ ls
arm-eabi  bin  include  lib  libexec  share  SOURCES
owner:$ git checkout android-4.4.3_r1
HEAD is now at d73a051... Upgrade to host 64bit arm-eabi toolchain.
owner:$ pwd
/home/owner/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

How did you resolve this issue?

owner:$ lunch sabresd_6dq-eng
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied

owner:$ sudo chmod +x prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
[sudo] password for owner:
owner:$ ls -lia prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
853965 -rw------- 1 owner owner 706648 Oct  3 22:18 prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
owner:$ sudo chmod +x build/core/find-jdk-tools-jar.sh
owner:$ ls -lia build/core/find-jdk-tools-jar.sh
469679 -rw------- 1 owner owner 420 Oct  3 21:36 build/core/find-jdk-tools-jar.sh

Did you have a permissions issue, and how did you resolve the problem?

thx,
Tracy
回覆所有人
回覆作者
轉寄
0 則新訊息