64-bit requirement for building

428 views
Skip to first unread message

Chris Moore

unread,
Nov 16, 2010, 12:25:25 PM11/16/10
to Android Building
I'm just trying to get started with building Android, starting with
the instructions at http://source.android.com/source/download.html

After running into build problems and looking through the forums I've
learned that a 64-bit environment is required to build.

I have two questions related to this. First, does this mean my build
machine has to actually be a 64-bit processor? Or is this referring
to an environment capable of generating 64-bit code? In other words,
does this really mean I need to throw out my hardware and buy a new
system in order to build?

Second, could the "Getting Started" web page referenced above be
updated? It specifically says that 64-bit may not work, and it also
says that Java 5 is required and that Java 6 does not work.

As a newcomer to the Android environment it was very encouraging to
find step-by-step directions for getting started, and very
discouraging to find that the instructions are wrong.

Ying Wang

unread,
Nov 16, 2010, 1:30:14 PM11/16/10
to android-...@googlegroups.com
You only need 64-bit build machine for the master branch.
You can still build froyo and earlier branches on a 32-bit machine.
The instruction will be updated soon, I believe.


--
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

speedbaron

unread,
Nov 16, 2010, 4:12:46 PM11/16/10
to Android Building
Hi Chris,

A 64-bit environment mean a 64-bit machine :-)
A 64-bit machine has a 64-bit CPU and a 64-bit operating systems.
Some 64-bit CPU can run 32-bit operating systems.
A 64-bit environment can build both a 64 & 32 bits applications; but
not the other way around.

Now to answer your question.
- Yes, you will need a 64-bit environment; see definition above.
- if your current machine has a 32-bit operating system; check your
CPU type.
- Intel Dual Core CPU are actually 64-bit; which means you can install
a 64-bit operating system on them.

There is nothing wrong with the "Getting Started" Web page. It says
it has not been tested :-)




On Nov 16, 9:25 am, Chris Moore <cmoore...@gmail.com> wrote:
> I'm just trying to get started with building Android, starting with
> the instructions athttp://source.android.com/source/download.html

Jim Dibb

unread,
Nov 16, 2010, 4:24:00 PM11/16/10
to android-...@googlegroups.com
It is not generally true that you need a 64 bit processor to build 64 bit code.  This is the magic of "cross-compiling".  Similar to that you don't need to be building on a Snapdragon processor to create code that runs on a Snapdragon processor.

In my company we built 64 bit w2k3/w2k8 executables for some time on 32 bit win XP.

It is a function of the compiler as to what code it generates, not a function of the processor.

This is not necessarily an answer as it regards Android, just a response to the misleading general assertion by speedbaron.

Regards,
Jim

Chris Moore

unread,
Nov 16, 2010, 5:55:45 PM11/16/10
to Android Building
OK, thanks for all the help.

I know about cross-compiling environments - I use one all the time to
build PPC
kernels on an x86 box - that's why I was wondering if a cross-compiler
would do it.
But it sounds like in this case "64-bit environment" really
means that the compiler has to be running on a 64-bit OS.

The error message says that froyo and later need 64-bit. I haven't
yet tried building
froyo to see if that is true, but I suspect I would have to go with
eclair or earlier on
my current hardware.

Unfortunately the only 64-bit hardware I have is my gaming machine,
running Windows 7.
I'll looking into installing Ubuntu either under a VM or on an
additional disk.

Thanks again.

Chris

Sandeep

unread,
Nov 16, 2010, 6:19:29 PM11/16/10
to Android Building
I had the same problem. But then I found a patch after googling for it
which allowed me to build it for 32 bit.
If you don't want to install 64 bit OS, then the patch would work
really well.

Thanks,
Sandeep

Anders Hasselqvist

unread,
Nov 16, 2010, 11:29:41 PM11/16/10
to android-...@googlegroups.com
Hi Chris,

Check out one of the Froyo tags instead of the master branch:

For example:
repo init -u git://android.git.kernel.org/platform/manifest.git -b
android-2.2.1_r
repo sync

Thanks,
Anders

Ketil Froyn

unread,
Nov 17, 2010, 2:34:26 AM11/17/10
to android-...@googlegroups.com

You can install ubuntu using wubi on your windows 7 computer. It installs ubuntu in a large file on your ntfs partition, and configures dual boot, so you can reboot into ubuntu.

Ketil


--

You received this message because you are subscribed to the "Android Building" mailing list.

To post...

Przemyslaw Wegrzyn

unread,
Nov 17, 2010, 5:46:22 PM11/17/10
to android-...@googlegroups.com
On 11/16/2010 07:30 PM, Ying Wang wrote:
> You only need 64-bit build machine for the master branch.
Can anybody explain what is the rationale for this particular
requirement? It seems that master branch compiles on 32-bit system with
a bit of build env patching, so why was this requirement introduced really?

BR,
Przemek

Jean-Baptiste Queru

unread,
Nov 17, 2010, 5:50:43 PM11/17/10
to android-...@googlegroups.com
The root reason is that JDK 1.6 is only available as 64-bit on some platforms.

JBQ

> --
> 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
Software Engineer, 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.

Emeka Omo

unread,
Nov 17, 2010, 6:06:11 PM11/17/10
to android-...@googlegroups.com
Actually that's not true.  JDK comes in both 32-bit & 64-bit.  You can find both at the Oracle SUN JAVA site.

The problem is that if you are using Eclipse; it will pick the same version of JDK as itself.
Eclipse 32-bit version will look for JDK 32-bit and Eclipse 64-bit version will look for JDK 64-bit version.

As for my post earlier; I have done cross platform compilation.  In the context of Andriod; I have not found a workable solution of building 64-bit on a 32-bit machine.

Even if you do cross platform compilation; you still test it on an actually target machine.

Chris;
You might want to trying using VMWare workstation.  I use that; it works great on an Intel i7 machine.

-Olisemeka

Austin, Brian

unread,
Nov 17, 2010, 6:18:23 PM11/17/10
to <android-building@googlegroups.com>, android-...@googlegroups.com
Builds just fine on a 32bit machine. Just have to modify a few makefiles.

This question has been posed alot and I have posted that the patch to enforce 64bit builds be removed, but the response seems to be that google uses 64bit machines, so we have to as well.

I still think it is unnecessary, but you can make it work pretty easy

On Nov 17, 2010, at 5:08 PM, "Emeka Omo" <speed...@gmail.com<mailto:speed...@gmail.com>> wrote:

Actually that's not true. JDK comes in both 32-bit & 64-bit. You can find both at the Oracle SUN JAVA site.

The problem is that if you are using Eclipse; it will pick the same version of JDK as itself.
Eclipse 32-bit version will look for JDK 32-bit and Eclipse 64-bit version will look for JDK 64-bit version.

As for my post earlier; I have done cross platform compilation. In the context of Andriod; I have not found a workable solution of building 64-bit on a 32-bit machine.

Even if you do cross platform compilation; you still test it on an actually target machine.

Chris;
You might want to trying using VMWare workstation. I use that; it works great on an Intel i7 machine.

-Olisemeka


On Wed, Nov 17, 2010 at 2:50 PM, Jean-Baptiste Queru <<mailto:j...@android.com>j...@android.com<mailto:j...@android.com>> wrote:
The root reason is that JDK 1.6 is only available as 64-bit on some platforms.

JBQ

On Wed, Nov 17, 2010 at 2:46 PM, Przemyslaw Wegrzyn
<<mailto:pweg...@codepainters.com>pweg...@codepainters.com<mailto:pweg...@codepainters.com>> wrote:
> On 11/16/2010 07:30 PM, Ying Wang wrote:
>>
>> You only need 64-bit build machine for the master branch.
>
> Can anybody explain what is the rationale for this particular requirement?
> It seems that master branch compiles on 32-bit system with a bit of build
> env patching, so why was this requirement introduced really?
>
> BR,
> Przemek
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to <mailto:android-...@googlegroups.com> android-...@googlegroups.com<mailto:android-...@googlegroups.com>


> To unsubscribe from this group, send email to

> <mailto:android-building%2Bunsu...@googlegroups.com> android-buildi...@googlegroups.com<mailto:android-buildi...@googlegroups.com>


> For more options, visit this group at

> <http://groups.google.com/group/android-building?hl=en> http://groups.google.com/group/android-building?hl=en
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, 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.

--
You received this message because you are subscribed to the "Android Building" mailing list.

To post to this group, send email to <mailto:android-...@googlegroups.com> android-...@googlegroups.com<mailto:android-...@googlegroups.com>


To unsubscribe from this group, send email to

<mailto:android-building%2Bunsu...@googlegroups.com>android-buildi...@googlegroups.com<mailto:android-buildi...@googlegroups.com>


For more options, visit this group at

<http://groups.google.com/group/android-building?hl=en>http://groups.google.com/group/android-building?hl=en


--
You received this message because you are subscribed to the "Android Building" mailing list.

To post to this group, send email to <mailto:android-...@googlegroups.com> android-...@googlegroups.com<mailto:android-...@googlegroups.com>


To unsubscribe from this group, send email to

<mailto:android-buildi...@googlegroups.com>android-buildi...@googlegroups.com<mailto:android-buildi...@googlegroups.com>


For more options, visit this group at

<http://groups.google.com/group/android-building?hl=en>http://groups.google.com/group/android-building?hl=en

Al Sutton

unread,
Nov 18, 2010, 3:16:14 AM11/18/10
to android-...@googlegroups.com
JBQ has covered the main reason before - http://goo.gl/x9IY2

So, as with builds up to and including froyo, 32 bit build environments were the norm and 64 bit was not officially supported, as of Gingerbread the position reverses where 64 bit is the norm & 32 is officially unsupported.

It had to happen at some point because I vaguely recall hearing that under certain conditions running a build can push systems to the limits of the 32 bit RAM addressing on some platforms (I want to say a multi-threaded make on 32 bit Windows, but I'm not 100% certain) , so it was just a matter of when a change was made, and the when just happens to be now.

Al.

======
Funky Android Limited is registered in England & Wales with the company number 6741909.

The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries.

> To post to this group, send email to android-...@googlegroups.com


> To unsubscribe from this group, send email to

Jean-Baptiste Queru

unread,
Nov 18, 2010, 2:44:03 PM11/18/10
to android-...@googlegroups.com
I'm not sure about the Windows side of things (especially since the
Windows SDK is now cross-compiled from linux), but in Google's
internal master tree several of the build steps come close to filling
the address space of 32-bit processes (e.g. the steps that handle the
entire set of *.java source files in a single pass), and switching to
64-bit was going to be a natural move anyway, regardless of the
availability of toolchains.

Even without per-process size limits, Android is a heavy piece of
software to compile, and typical 32-bit machines are unfortunately
quite impractical for such work.

JBQ

Tiago Vieira

unread,
Nov 21, 2010, 8:25:01 AM11/21/10
to android-...@googlegroups.com
Hi JBQ

Could you please let me know what sort of problems I might find cross-compiling Windows SDK in a linux environment?

I'm doing it at the moment (and for Mac SDK as well) and the tests we ran on the packages created in this way show that it is usable and people that are experimenting it are happy. I haven't faced any support request yet that could be caused by the cross-compiled packages.

Regards,
Tiago

Jean-Baptiste Queru

unread,
Nov 22, 2010, 11:52:41 AM11/22/10
to android-...@googlegroups.com
I'm not aware of specific issues, other than a few extra required
packages. IIRC the recent official Windows SDKs were built like that.

JBQ

atinm

unread,
Dec 18, 2010, 7:17:54 AM12/18/10
to Android Building
Can you post/point to the changes you had to do to build on a 32 bit
machine? I found that external/clearsilver won't build on 32-bit
without warnings and so was wondering if I'm missing some other stuff
too. Thanks.

-Atin

On Nov 17, 6:18 pm, "Austin, Brian" <Brian.Aus...@cirrus.com> wrote:
> Builds just fine on a 32bit machine. Just have to modify a few makefiles.
>
> This question has been posed alot and I have posted that the patch to enforce 64bit builds be removed, but the response seems to be that google uses 64bit machines, so we have to as well.
>
> I still think it is unnecessary, but you can make it work pretty easy
>
Reply all
Reply to author
Forward
0 new messages