Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No rule to make target when trying to build in Android #19

Open
korab8 opened this issue Jan 31, 2020 · 3 comments
Open

No rule to make target when trying to build in Android #19

korab8 opened this issue Jan 31, 2020 · 3 comments

Comments

@korab8
Copy link

korab8 commented Jan 31, 2020

I am trying to build the source code in Android Studio and it keeps throwing the *** No rule to make target for ../pdf-js.c needed by pdf-js.o . Stop.

I am having a hard time trying to fix this. How do I exactly run this source code?

Full Error:

Build command failed.
Error while executing process C:\Users\SITF01\AppData\Local\Android\Sdk\ndk\21.0.6113669\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\src\main\cpp\jni\Android.mk NDK_APPLICATION_MK=C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\src\main\cpp\jni\Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-22 NDK_OUT=C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: WARNING:C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\src\main\cpp\jni\Android.mk:mupdfcore: LOCAL_LDLIBS is always ignored for static libraries
md "C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib\arm64-v8a" >NUL 2>NUL || rem
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../prebuilt/windows-x86_64/bin/echo.exe [arm64-v8a] "Gdbserver ": "[aarch64-linux-android] C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib/arm64-v8a/gdbserver"
copy /b/y "C:\Users\SITF01\AppData\Local\Android\Sdk\ndk\21.0.6113669\build\..\prebuilt\android-arm64\gdbserver\gdbserver" "C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib\arm64-v8a\gdbserver" > NUL
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../prebuilt/windows-x86_64/bin/echo.exe [arm64-v8a] "Gdbsetup ": "C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib/arm64-v8a/gdb.setup"
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../prebuilt/windows-x86_64/bin/echo.exe "set solib-search-path C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a" > C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib/arm64-v8a/gdb.setup
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../prebuilt/windows-x86_64/bin/echo.exe "directory C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot jni/andprof ../../include ../../source/fitz ../../source/pdf C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/src/main/cpp/jni ../../thirdparty/jbig2dec ../../thirdparty/openjpeg/libopenjpeg ../../thirdparty/jpeg ../../thirdparty/mujs ../../thirdparty/zlib ../../thirdparty/freetype/include ../../source/xps ../../source/cbz ../../source/img ../../source/tiff ../../scripts/freetype ../../scripts/jpeg ../../scripts/openjpeg ../../generated ../../resources" >> C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\lib/arm64-v8a/gdb.setup
md "C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\obj\local\arm64-v8a\objs\mupdf" >NUL 2>NUL || rem
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../prebuilt/windows-x86_64/bin/echo.exe [arm64-v8a] "Compile ": "mupdf <= mupdf.c"
C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -MMD -MP -MF C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs/mupdf/mupdf.o.d -target aarch64-none-linux-android22 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/SITF01/AppData/Local/Android/Sdk/ndk/21.0.6113669/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fpic -O2 -DNDEBUG -Ijni/andprof -I../../include -I../../source/fitz -I../../source/pdf -IC:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/src/main/cpp/jni -DANDROID -Wformat -Werror=format-security -c C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/src/main/cpp/jni/mupdf.c -o C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs/mupdf/mupdf.o
md "C:\Users\SITF01\Desktop\ndk-samples\kotlin-app\SITFPDFApp\app\build\intermediates\ndkBuild\debug\obj\local\arm64-v8a" >NUL 2>NUL || rem

make: *** No rule to make target 'C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/src/main/cpp/jni/../../../source/pdf/js/pdf-js.c', needed by 'C:/Users/SITF01/Desktop/ndk-samples/kotlin-app/SITFPDFApp/app/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs/mupdfcore///__/source/pdf/js/pdf-js.o'. Stop.

@cgogolin
Copy link
Owner

cgogolin commented Feb 1, 2020

The file is in /source/pdf/js/. I have no experience in building with Android Studio (always used ant).

@korab8
Copy link
Author

korab8 commented Feb 3, 2020

You have an android version and it is in the play store. Could you explain how did you build the project in android? Maybe I'm doing something wrong.

@cgogolin
Copy link
Owner

cgogolin commented Feb 6, 2020

I haven't done it for quite some time, but I always used to compile this "the old fashioned way" by issuing:

ant clean && ndk-build clean && ndk-build && ant debug

This assumes that you have the android SDK set up and your local.properties in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants