1
votes

Android NDK: WARNING:/cygdrive/e/android-sdk-windows/AndroidWorkspace/muPDF/jni/Android.mk:mu‌​pdfcore: LOCAL_LDLIBS is always ignored for static libraries [armeabi-v7a] Compile : mupdf <= mupdf.c /bin/sh: /cygdrive/c/Users/MEHDI/Downloads/Compressed/android-ndk-r9d-windows-x86/android‌​-ndk-r9d/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-an‌​droideabi-gcc: No such file or directory make: * [/cygdrive/e/android-sdk-windows/AndroidWorkspace/muPDF/obj/local/armeabi-v7a/ob‌​js/mupdf/mupdf.o] Error 127

2

2 Answers

2
votes

It looks like you're trying to use GCC 4.4.3 which is no longer distributed with the NDK. Did you set NDK_TOOLCHAIN_VERSION in your environment? If so, please undefine it and re-run the command.

Apart from that, the warning is perfectly normal. You should use LOCAL_EXPORT_LDLIBS if you want to export dependent system libraries for your static library. LOCAL_LDLIBS is only used when building a shared library or executable.

0
votes
  1. ndk-build on Windows does not need cygwin, and some of its components cannot work with cygwin. Run ndk-build.cmd from Windows CMD shell, and avoid hardcoding cygdrive anywhere.
  2. The warning you get is legitimate. You probably have include $(BUILD_STATIC_LIBRARY) in your Android.mk: this module does not use linker, therefore it does not need LOCAL_LDLIBS neither LOCAL_LDFLAGS. I would not worry about this warning, if this is the only problem in your build.

If you need more help with your project, please post the Android.mk file (or fragments of it), and also the Application.mk if you have one.