Issue
I'm trying to build this project: https://github.com/sureshjoshi/android-ndk-swig-example
It's a small example project that uses SWIG to wrap a C++ library for use on Android. I'm getting this error when it builds:
C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\src\main\jni\SeePlusPlus_wrap.cxx:802:1: fatal error: opening dependency file C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/SeePlusPlus/C_\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\src\main\jni\SeePlusPlus_wrap.o.d: No such file or directory
Breaking that up, I see that it's trying to open this file:
C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/SeePlusPlus/C_\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\src\main\jni\SeePlusPlus_wrap.o.d
Breaking that down further, I see that this filepath contains the absolute path to the project twice, but with the colon replaced with an underscore:
C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/SeePlusPlus/
C_\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\src\main\jni\SeePlusPlus_wrap.o.d
I'm wondering what might cause this. I have the NDK in a path with no spaces, as that's been known to cause problems. You can see my project has no spaces in its path, either.
The actual line executed during the build that's failing is this, broken up for clarity:
C:\Dev\Android\android-ndk-r10d\ndk-build.cmd
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\Android.mk
APP_PLATFORM=android-21
NDK_OUT=C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\obj
NDK_LIBS_OUT=C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master\NDKExample\app\build\intermediates\ndk\debug\lib
APP_STL=gnustl_shared
APP_ABI=all
Solution
This seems to have to do with filepath length. Also had it not work in D:\production\Pong\Devel2010\Src\UnityGames\BhvrDemo\BHVRSWIGTest\
I moved my project folder from
C:\Users\elarson\Desktop\Downloads\android-ndk-swig-example-master
to
D:\Almo\Work\android-ndk-swig-example-master
And now it works, but perhaps only because the filenames are shorter:
D:\Almo\BinkSWIGTest2\NDKExample\app\build\intermediates\ndk\debug\obj\local\arm64-v8a\objs\SeePlusPlus\D_\Almo\BinkSWIGTest2\NDKExample\app\src\main\jni\SeePlusPlus_wrap.o.d
is still created.
Answered By - Almo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.