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
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/sqsn8uXZkSYJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.