Android - ndk-build error: "Android.mk:svml: LOCAL_SRC_FILES points to a missing file" when using cygwin

Reference Number: DPD200250354

Version: Intel® C++ Compiler for Android* 14.0 - Windows Host (Initial Release)

Host Operating System: Microsoft Windows*

Problem Description:

Building applications with the Intel C++ Compiler for Android using the ndk-build script in a cygwin shell fails with the following error:


	$ ../../ndk-build -B V=1 APP_ABI=x86
Android NDK: ERROR:/cygdrive/c/Intel/BeaconMountain/NDK/toolchains/x86-icc/intel/runtime/Android.mk:svml: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /cygdrive/c/Intel/BeaconMountain/NDK/toolchains/x86-icc/intel/runtime/C:/Intel/cc_android_14.0.0.014//compiler/lib/ia32/libsvml.so exists  or that its path is correct

Building applications from the Windows* command prompt is not affected. 

Workaround:

1. In file <NDK_INSTALL_DIR>/toolchains/x86-icc14.0.0.14/setup.mk
Change the installation path to Cygwin format: c:\Intel\cc_android_14.0.0.014\ -> /cygdrive/c/intel/cc_android_14.0.0.014/

2. In file <NDK_INSTALL_DIR>/toolchains/x86-icc/setup.mk
Replace lines:
export ANDROID_GNU_X86_TOOLCHAIN := $(TOOLCHAIN_PREBUILT_ROOT)
export ANDROID_SYSROOT := $(SYSROOT_INC)
With:
export ANDROID_GNU_X86_TOOLCHAIN := $(call host-path,$(TOOLCHAIN_PREBUILT_ROOT))
export ANDROID_SYSROOT := $(call host-path,$(SYSROOT_INC))

3. Use full tool chain name: ndk-build.sh … NDK_TOOLCHAIN=x86-icc14.0.0.14
Or do not specify it at all as it’s already default.

Please note if you apply this workaround building applications in a cygwin environment will work, but building applications from the Windows* command prompt will fail. 

For more complete information about compiler optimizations, see our Optimization Notice.