Search code examples
makefilecygwinandroid-ndkandroid-ndk-r5

Android ndk build mysteriously failing under cygwin with "Error 126"


I have a JNI application built by ndk-build (using Android NDK r5b and cygwin make 3.81). The build usually works, by occasionally fails with:

...
Compile++ thumb  : components <= Component.cpp
make: *** [/c/.hudson/jobs/Nightly/workspace/application/obj/local/armeabi/objs/components/Component.o] Error 126
make: Leaving directory `/c/.hudson/jobs/Nightly/workspace/application/obj/local/armeabi/objs/components'

There is no other error. Make than exits with status 2. It happens in different file each time (the name above is anonymized). It seems to happen more often with parallel builds, but sometimes happens with non-parallel builds too.

Does anybody have an idea what it might be or at least how to debug it?


Solution

  • Make error 126 is permission denied. Do you run antivirus software? IF so, maybe it is locking files or preventing writes, and therefore causing errors? If you do not have antivirus software on, maybe you have another software which might be acquiring file locks?