master on OS X Lion / Xcode 4 [Build Fixed]

427 views
Skip to first unread message

Al Sutton

unread,
Dec 20, 2011, 9:31:24 AM12/20/11
to android-...@googlegroups.com
Using the previous patches I've successfully compiled AOSP master on Lion under XCode 4 to create a maguro image which I've flashed and booted successfully on my Galaxy Nexus.

I've also cleaned off and re-installed Lion & Xcode 4 on a machine to eliminate any local customisations I may have made on my main dev box, so I'm confident that from a building perspective everything works.

There are some runtime issues (such as scripts looking for non-existant 64 bit libraries because they detect Lion is a 64 bit OS), but, with the build changes, we could draw in some more eyeballs from those on Lion with XCode 4 to help nail those down.

Enjoy :),

Al.

P.S. I've put a summary of what I did up at http://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-os-x-lion-with-xcode-4/ in case anyone prefers to see it all in one place.

--
T: @alsutton W: www.funkyandroid.com

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.

Jean-Baptiste Queru

unread,
Dec 20, 2011, 11:08:21 AM12/20/11
to android-...@googlegroups.com
Thank you very much for that. I'll try to apply those patches soon.

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.

Youjia

unread,
Dec 21, 2011, 5:21:23 AM12/21/11
to Android Building
I've applied Al's changes and the full-eng target builds fine.
However the emulator exits with "Bus error: 10" when ran.

Youjia

On Dec 20, 4:08 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> Thank you very much for that. I'll try to apply those patches soon.
>
> JBQ
>
>
>
>
>
>
>
>
>
> On Tue, Dec 20, 2011 at 6:31 AM, Al Sutton <a...@funkyandroid.com> wrote:
> > Using the previous patches I've successfully compiled AOSP master on Lion under XCode 4 to create a maguro image which I've flashed and booted successfully on my Galaxy Nexus.
>
> > I've also cleaned off and re-installed Lion & Xcode 4 on a machine to eliminate any local customisations I may have made on my main dev box, so I'm confident that from a building perspective everything works.
>
> > There are some runtime issues (such as scripts looking for non-existant 64 bit libraries because they detect Lion is a 64 bit OS), but, with the build changes, we could draw in some more eyeballs from those on Lion with XCode 4 to help nail those down.
>
> > Enjoy :),
>
> > Al.
>
> > P.S. I've put a summary of what I did up athttp://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...in case anyone prefers to see it all in one place.

Al Sutton

unread,
Dec 21, 2011, 2:08:53 PM12/21/11
to android-...@googlegroups.com
That'll be one of those runtime issues I mentioned :).

Feel free to start digging in to see if you can resolve it on the master branch in a manner that's acceptable for the AOSP, my focus is more on device builds which currently seem to be working, so it may be some time before I look at any qemu issues personally.

Al.

Jean-Baptiste Queru

unread,
Dec 21, 2011, 7:30:43 PM12/21/11
to android-...@googlegroups.com
We've reviewed all those patches, and I've pushed them all to AOSP
after approval and basic testing.

Thanks Al for putting those together :)

JBQ

sanigo

unread,
Dec 23, 2011, 4:56:00 AM12/23/11
to Android Building
The build was done successfully.
and the same thing happened when i ran emulator.
Bus error: 10.
Even if i use Xcode 3.2.4, emulator reported bus error either.
What's the matter, and any workarounds?

On 12月21日, 下午6时21分, Youjia <eyok...@gmail.com> wrote:
> I've applied Al's changes and the full-eng target builds fine.
> However the emulator exits with "Bus error: 10" when ran.
>
> Youjia
>
> On Dec 20, 4:08 pm, Jean-Baptiste Queru <j...@android.com> wrote:
>
>
>
>
>
>
>
> > Thank you very much for that. I'll try to apply those patches soon.
>
> > JBQ
>
> > On Tue, Dec 20, 2011 at 6:31 AM, Al Sutton <a...@funkyandroid.com> wrote:
> > > Using the previous patches I've successfully compiled AOSP master on Lion under XCode 4 to create a maguro image which I've flashed and booted successfully on my Galaxy Nexus.
>
> > > I've also cleaned off and re-installed Lion & Xcode 4 on a machine to eliminate any local customisations I may have made on my main dev box, so I'm confident that from a building perspective everything works.
>
> > > There are some runtime issues (such as scripts looking for non-existant 64 bit libraries because they detect Lion is a 64 bit OS), but, with the build changes, we could draw in some more eyeballs from those on Lion with XCode 4 to help nail those down.
>
> > > Enjoy :),
>
> > > Al.
>
> > > P.S. I've put a summary of what I did up athttp://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...case anyone prefers to see it all in one place.

Jean-Baptiste Queru

unread,
Dec 27, 2011, 12:23:58 PM12/27/11
to android-...@googlegroups.com
The emulator doesn't work in that exact environment. At this point we
haven't identified the actual cause. Anyone with a Mac and good
debugging skills is welcome to look at this, but you need to expect
that it might not be easy and/or might involve building with a
different toolchain.

JBQ

2011/12/23 sanigo <san...@gmail.com>:

Rene

unread,
Dec 25, 2011, 12:31:16 PM12/25/11
to Android Building
I just downloaded the SDK and copied the files "emulator", "emulator-
arm" and "emulator-x86" from the SDK
to the directory "*YOUR_WORKING_DIRECTORY*/out/host/darwin-x86/bin"
and everything is just fine :)

On 21 Dez., 11:21, Youjia <eyok...@gmail.com> wrote:
> I've applied Al's changes and the full-eng target builds fine.
> However the emulator exits with "Buserror: 10" when ran.
>
> Youjia
>
> On Dec 20, 4:08 pm, Jean-Baptiste Queru <j...@android.com> wrote:
>
>
>
>
>
>
>
> > Thank you very much for that. I'll try to apply those patches soon.
>
> > JBQ
>
> > On Tue, Dec 20, 2011 at 6:31 AM, Al Sutton <a...@funkyandroid.com> wrote:
> > > Using the previous patches I've successfully compiled AOSP master on Lion under XCode 4 to create a maguro image which I've flashed and booted successfully on my Galaxy Nexus.
>
> > > I've also cleaned off and re-installed Lion & Xcode 4 on a machine to eliminate any local customisations I may have made on my main dev box, so I'm confident that from a building perspective everything works.
>
> > > There are some runtime issues (such as scripts looking for non-existant 64 bit libraries because they detect Lion is a 64 bit OS), but, with the build changes, we could draw in some more eyeballs from those on Lion with XCode 4 to help nail those down.
>
> > > Enjoy :),
>
> > > Al.
>
> > > P.S. I've put a summary of what I did up athttp://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...case anyone prefers to see it all in one place.

Al Sutton

unread,
Dec 27, 2011, 2:47:36 PM12/27/11
to android-...@googlegroups.com
I'm hoping to get some time over the next few days to look into the Bus Error 10 message. If anyone else is working on it or has already got started please let me know so we can avoid duplicating work and co-ordinate any efforts.

Thanks,

Al.

-- 
T: @alsutton W: www.funkyandroid.com 

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. 

Andrea D`Amore

unread,
Dec 28, 2011, 3:57:45 PM12/28/11
to Android Building
On Dec 25, 6:31 pm, Rene <rene.herbr...@googlemail.com> wrote:
> I just downloaded the SDK and copied the files "emulator", "emulator-
> arm" and "emulator-x86" from the SDK
> to the directory "*YOUR_WORKING_DIRECTORY*/out/host/darwin-x86/bin"
> and everything is just fine :)

You don't need to copy them, you can just launch emulator from the
binary SDK, e.g.
emulator -system out/target/product/generic/system.img -data out/
target/product/generic/userdata.img -kernel prebuilt/android-arm/
kernel/kernel-qemu -show-kernel -shell

I have Android SDK in PATH.

Andrea D`Amore

unread,
Dec 28, 2011, 4:35:40 PM12/28/11
to Android Building
On Dec 20, 3:31 pm, Al Sutton <a...@funkyandroid.com> wrote:
> P.S. I've put a summary of what I did up at http://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...in case anyone prefers to see it all in one place.

I can confirm your patch works with android-4.0.3_r1 manifest as well
provided project external/elfutils is checked out to 72940de in order
to avoid strlen redefinition. I built full-eng targets on 4.0.3_r1 and
master.


> T: @alsutton W:www.funkyandroid.com


--
Andrea

cadence2004

unread,
Dec 29, 2011, 2:25:30 AM12/29/11
to Android Building
I notice that the bus error 10 raised from the "getenv" in the main
function.

But I don't know how to correct it . Maybe it caused from the fact
that the OS is 64bit but ,the Android build environment is configured
as 32bit.
> >>>> P.S. I've put a summary of what I did up athttp://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...anyone prefers to see it all in one place.

TwistedUmbrella

unread,
Jan 29, 2012, 8:13:33 PM1/29/12
to Android Building
In regards to my previous post and question about this change:
The issue was fixed by just adding 10.5 and 10.5.% into the line ifneq
($(filter 10.6 10.6.%,$(DARWIN_VERSION)),) and then everything seemed
to work properly with either layout.

On Dec 20 2011, 9:31 am, Al Sutton <a...@funkyandroid.com> wrote:
> Using the previous patches I've successfully compiled AOSP master on Lion under XCode 4 to create a maguro image which I've flashed and booted successfully on my Galaxy Nexus.
>
> I've also cleaned off and re-installed Lion & Xcode 4 on a machine to eliminate any local customisations I may have made on my main dev box, so I'm confident that from a building perspective everything works.
>
> There are some runtime issues (such as scripts looking for non-existant 64 bit libraries because they detect Lion is a 64 bit OS), but, with the build changes, we could draw in some more eyeballs from those on Lion with XCode 4 to help nail those down.
>
> Enjoy :),
>
> Al.
>
> P.S. I've put a summary of what I did up athttp://blog.alsutton.com/2011/12/20/compiling-android-master-on-mac-o...in case anyone prefers to see it all in one place.
Reply all
Reply to author
Forward
0 new messages