Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
NDK from AOSP/master on OS X issues
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Romain Tisserand  
View profile  
 More options Nov 7 2012, 6:28 pm
From: Romain Tisserand <romain.tisser...@gmail.com>
Date: Wed, 7 Nov 2012 15:28:55 -0800 (PST)
Local: Wed, Nov 7 2012 6:28 pm
Subject: NDK from AOSP/master on OS X issues

Hello,

That's my first post here so let's I don't get flamed for telling something
stupid :)
If anybody from Google working on the NDK could read this and give
feedback, it would be great.

We use Android NDK a lot at my company (DotEmu SAS, a French videogame
company) and I decided to build my own from AOSP master for many reasons
(mostly critical bugfixes we need for our projects). I tried to build NDK
from AOSP master branch, from 2012-11-07, on OS X Lion 10.7.5. XCode 4.5.2
installed with command-line tools, and environment setup as AOSP guidelines
require it.

I ran into two major issues :

1. Building the NDK itself
Without adding --systems=darwin-x86 it to make-release.sh command line the
build fails. Still, the documentation says it should be the default on OS X
(which makes a lot of sense). Still, after scratching my head a bit, I
discovered the switch was being filtered by make-release.sh itself by this
line :
HOST_SYSTEMS_FLAGS=$(echo "$HOST_SYSTEMS_FLAGS" | sed -e 's/darwin-x86//')
I had to comment it to get the NDK compiling fine.

After a good sleep, I had a nice tar.bz2 file containing my NDK, which was
building our projects quite well. Then comes the second and most
problematic issue.

2. My NDK keeps rebuilding all files at each build, even untouched
It took me a while to figure out why, but the reason was in fact each
directory being "touched" by the OS, therefore bringing a timestamp later
than my source files. So GNU make complains for each file it's out of date
due to the timestamp its own directory being later than the file itself.

I had a deep look between r8b (working fine) and master, and discovered a
lot of changes were done in directory handling, especially regarding
host-mkdir command. I finally managed to tweak it to work as it should,
namely rebuilding only changed files between to builds, and all files if I
request a clean. Please find attached a (dirty) patch which is mostly a
rollback to r8b system.
I am aware this is not going to be merged in AOSP but I would love to
understand what's going "under the hood" and why I had to make such a dirty
hack.

Looking forward from feedback :)

Thanks,
Romain Tisserand

  ndk_20121107_osx_fix_DotEmu.patch
5K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Turner  
View profile  
 More options Nov 13 2012, 3:36 am
From: David Turner <di...@android.com>
Date: Tue, 13 Nov 2012 09:36:02 +0100
Local: Tues, Nov 13 2012 3:36 am
Subject: Re: NDK from AOSP/master on OS X issues

Hello,

First, sorry for your troubles,

The first issue seems to be a bug. We don't package the darwin NDK on OS X
anymore, instead we launch the build from Linux, and use the
--darwin-ssh=<hostname> option to build only the host NDK binaries on a
remote machine. I guess that's why this change to make-release.sh wasn't
tested properly. It should be easy to fix though.

The second issue is stranger to me. The "generate-file-dir" improvement has
been written specifically to ensure that directories containing each object
file are only created once per build. This is in contrast to NDK r8b and
before, which performed a forced "mkdir -p <dirname>" for every object file
being built. The directories themselves should only be touched/created if
they don't already exist.

I can't reproduce the problem on Linux, I'll have to check on an OS X
machine.

Thanks for reporting this.

- David

On Thu, Nov 8, 2012 at 12:28 AM, Romain Tisserand <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Romain Tisserand  
View profile  
 More options Nov 15 2012, 5:09 am
From: Romain Tisserand <romain.tisser...@gmail.com>
Date: Thu, 15 Nov 2012 02:09:17 -0800 (PST)
Local: Thurs, Nov 15 2012 5:09 am
Subject: Re: NDK from AOSP/master on OS X issues

Hello David,

Thank you for your feedback and explanation.

My various OSX setups at work and home have various MacPorts binaries
installed, I thought that would be wise to add.
Maybe some of them, since in the path, is conflicting with the new
generate-file-dir behaviour.
Will try on a virgin OSX 10.8 install and try to reproduce the issue using
ndk-r8c.

Romain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Weber  
View profile  
 More options Nov 15 2012, 5:44 am
From: Luke Weber <luke.we...@gmail.com>
Date: Thu, 15 Nov 2012 02:44:13 -0800 (PST)
Local: Thurs, Nov 15 2012 5:44 am
Subject: Re: NDK from AOSP/master on OS X issues

Confirmed that all files are rebuilt every time on OS X. Do we have an ETA
for a version that fixes this?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Turner  
View profile  
 More options Nov 16 2012, 5:14 am
From: David Turner <di...@android.com>
Date: Fri, 16 Nov 2012 11:13:47 +0100
Local: Fri, Nov 16 2012 5:13 am
Subject: Re: NDK from AOSP/master on OS X issues

I could reproduce the bug on Linux, and am working on a solution. See
http://code.google.com/p/android/issues/detail?id=39810 for details.

Sorry about the annoyance. I hope we'll be able to release the fix shortly.

On Thu, Nov 15, 2012 at 11:09 AM, Romain Tisserand <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Weber  
View profile  
 More options Nov 16 2012, 6:25 am
From: Luke Weber <luke.we...@gmail.com>
Date: Fri, 16 Nov 2012 12:25:16 +0100
Local: Fri, Nov 16 2012 6:25 am
Subject: Re: NDK from AOSP/master on OS X issues

Applying the patch simply to the new ndk-r8c did seem to fix things
for anyone who's stuck.

Wanted to get clang compiling and in the end I noticed it dropped my
release binary size by about 30% so win-win.

The following diff applies cleanly to the ndk, the above you need to
fuzz it a bit and apply one section manually.

  ndk.diff
5K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »