Yesterday I finally updated to the NDK r7b for my Android builds – it worked great, until I tried a build on my Xoom.
It crashed on some silly math function with an ILL_ILLOPC error. (More info here)
The culprit is the armeabi-v7a gnustl_static static lib – which was compiled with incorrect options making it incompatible with the tegra2.
Five different ways to work around the problem:
- Change -mfpu=vfpv3 to -mfpu=vfp in android-ndk-r7b\build\tools\build-gnu-libstdc++.sh and (edit: builder-funcs.sh too?) and recompile it
- (OR) Don’t use the gnustl libs… but you sort of have to if you want exceptions and rtti. Plus, the STLport and GAlibs have the same problem.
- (OR) Remove armeabi-v7a from your Application.mk. Bad, will slow your app down on good devices.
- (OR) Copy the files from android-ndk-r7b\sources\cxx-stl\gnu-libstdc++\libs\armeabi to android-ndk-r7b\sources\cxx-stl\gnu-libstdc++\libs\armeabi-v7a – the lib won’t be as fast as it could be, but at least your app can build an armabi-v7a version
- (OR) Go back to ndk r7… but it has its own issues, I don’t recommend it
I was too lazy to do #1 so I did #4. Don’t forget to clean/rebuild your project so it puts the new files in there.
EDIT: Just noticed a google tech has commented on the subject here.