1

I am trying to compile Iozone (located here) into an executable that is suitable to be used on an Android device. I have followed these directions using Android Studio. However when the build enters the externalNativeBuildDebug it fails with this error:

org.gradle.internal.UncheckedException: Build command failed.
Error while executing process /home/mbosnjak/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/mbosnjak/AndroidStudioProjects/CommandLine/app/src/main/cpp/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-15 NDK_OUT=/home/mbosnjak/AndroidStudioProjects/CommandLine/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/mbosnjak/AndroidStudioProjects/CommandLine/app/build/intermediates/ndkBuild/debug/lib /home/mbosnjak/AndroidStudioProjects/CommandLine/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/iozone_arm}
[armeabi-v7a] Compile thumb  : iozone_arm <= libasync.c
/home/mbosnjak/AndroidStudioProjects/CommandLine/app/src/main/cpp/libasync.c:96:10: fatal error: 'aio.h' file not found
#include <aio.h>
     ^~~~~~~

And this happens with most of the #include statements that are in the .c files. I was able to compile it fine when compiling it with make. Am I making this harder than it needs to be?

  • Reminder Android != Linux so there may be headers and libraries that do not exist on the Android NDK platform. Nothing on that site indicate that it would run on Android "out of the box". See: [Is there asynchronous file i/o in Android NDK?](https://stackoverflow.com/q/44611137/295004) – Morrison Chang May 29 '18 at 20:26

0 Answers0