使用 Android NDK r6b 的 gcc 构建时“无输入文件”

问题描述 投票:0回答:0

从纽约假期回来后,我在构建项目时遇到了一个奇怪的问题,我以前没有遇到过任何类似的问题。
每个项目都是一个共享/静态库或一个使用 gcc 交叉编译器 (cygwin) 使用 NDK 6b 构建的 Android 应用程序。
操作系统是Windows 7(32位),我没有安装/卸载/重装任何相关软件(假期期间:)。

我已经尝试构建标准的 NDK 示例

hello-jni
- 发生同样的错误。
日志:

A.User@A-User-L ~/Devel/hello-jni
$ ndk-build
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile thumb  : hello-jni <= hello-jni.c
arm-linux-androideabi-gcc.exe: /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/jni/hello-jni.c: No such file or directory
arm-linux-androideabi-gcc.exe: no input files
/cygdrive/c/dev/Android/android-ndk-r6b/build/core/build-binary.mk:217: recipe for target `/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o' failed
make: *** [/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1

冗长的日志(抱歉用字母太多):

A.User@A-User-L ~/Devel/hello-jni
$ ndk-build V=1
rm -f /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/lib*.so /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi-v7a/lib*.so /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/x86/lib*.so
rm -f /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/gdbserver /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi-v7a/gdbserver /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/x86/gdbserver
rm -f /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/gdb.setup /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi-v7a/gdb.setup /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/x86/gdb.setup
Gdbserver      : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
mkdir -p /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi
install -p /cygdrive/c/dev/Android/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
mkdir -p /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi
echo "set solib-search-path /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi" > /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/gdb.setup
echo "directory /cygdrive/c/dev/Android/android-ndk-r6b/platforms/android-8/arch-arm/usr/include /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/jni /cygdrive/c/dev/Android/android-ndk-r6b/sources/cxx-stl/system" >> /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/libs/armeabi/gdb.setup
Compile thumb  : hello-jni <= hello-jni.c
/cygdrive/c/dev/Android/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc -MMD -MP -MF /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d.org -fpic  -ffunction-sections  -funwind-tables  -fstack-protector  -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__  -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__   -Wno-psabi -march=armv5te  -mtune=xscale  -msoft-float  -mthumb  -Os  -fomit-frame-pointer  -fno-strict-aliasing  -finline-limit=64  -I/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/jni  -DANDROID  -Wa,--noexecstack  -O0 -g  -I/cygdrive/c/dev/Android/android-ndk-r6b/platforms/android-8/arch-arm/usr/include  -c   /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/jni/hello-jni.c -o /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o &&  ( if [ -f "/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d.org" ]; then  awk -f /cygdrive/c/dev/Android/android-ndk-r6b/build/awk/convert-deps-to-cygwin.awk /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d.org > /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d &&  rm -f /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o.d.org;  fi )
/cygdrive/c/dev/Android/android-ndk-r6b/build/core/build-binary.mk:217: recipe for target `/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o' failed
arm-linux-androideabi-gcc.exe: /cygdrive/e/Users/A.User.ORG/Devel/hello-jni/jni/hello-jni.c: No such file or directory
arm-linux-androideabi-gcc.exe: no input files
make: *** [/cygdrive/e/Users/A.User.ORG/Devel/hello-jni/obj/local/armeabi/objs-debug/hello-jni/hello-jni.o] Error 1

Android.mk
的内容很标准:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.c

include $(BUILD_SHARED_LIBRARY)

我知道

cygwin
在 Windows 上不支持符号链接 - 目录树中没有符号链接。
没有残忍的杀毒软件在运行,只有 Windows Defender。
我像去年一样以普通用户身份运行构建(即没有凭证更改)。

可能有什么问题

相关问题:


[更新] Process Monitor 显示交叉编译器试图访问“错误的路径”:`E
c++ windows gcc android-ndk cygwin
© www.soinside.com 2019 - 2024. All rights reserved.