提问人:user22600459 提问时间:11/4/2023 更新时间:11/4/2023 访问量:22
Buildozer 错误:C 编译器无法创建可执行文件
Buildozer error: C compiler cannot create executables
问:
我正在尝试使用 buildozer 转换我的 python 应用程序。. 我按照 buildozer 文档运行了 buildozer -v adnroid debug。 由于这是我第一次调试我的 python 应用程序,因此 SDK 和 NDK 是新安装的
但是它现在在我的 Ubuntu bash 中显示错误: 我检查了config.log,它显示:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libffi configure 3.4.2, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ /mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure --host=aarch64-linux-android --prefix=/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi --disable-builddir --enable-shared
## --------- ##
## Platform. ##
## --------- ##
hostname = LAPTOP-G27L22F8
uname -m = x86_64
uname -r = 4.4.0-19041-Microsoft
uname -s = Linux
uname -v = #3570-Microsoft Fri Sep 29 17:00:00 PST 2023
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
## ----------- ##
## Core tests. ##
## ----------- ##
configure:3071: looking for aux files: ltmain.sh compile missing install-sh config.guess config.sub
configure:3084: trying ./
configure:3113: ./ltmain.sh found
configure:3113: ./compile found
configure:3113: ./missing found
configure:3095: ./install-sh found
configure:3113: ./config.guess found
configure:3113: ./config.sub found
configure:3234: checking build system type
configure:3249: result: x86_64-pc-linux-gnu
configure:3269: checking host system type
configure:3283: result: aarch64-unknown-linux-android
configure:3303: checking target system type
configure:3317: result: aarch64-unknown-linux-android
configure:3416: checking for gsed
configure:3452: result: sed
configure:3481: checking for a BSD-compatible install
configure:3554: result: /usr/bin/install -c
configure:3565: checking whether build environment is sane
configure:3620: result: yes
configure:3672: checking for aarch64-linux-android-strip
configure:3704: result: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded
configure:3775: checking for a race-free mkdir -p
configure:3819: result: /usr/bin/mkdir -p
configure:3826: checking for gawk
configure:3847: found /usr/bin/gawk
configure:3858: result: gawk
configure:3869: checking whether make -j8 sets $(MAKE)
configure:3892: result: yes
configure:3922: checking whether make -j8 supports nested variables
configure:3940: result: yes
configure:4104: checking for aarch64-linux-android-gcc
configure:4136: result: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC
configure:4534: checking for C compiler version
configure:4543: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC --version >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4545: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4554: $? = 126
configure:4543: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -v >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4545: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4554: $? = 126
configure:4543: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -V >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4545: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4554: $? = 126
configure:4543: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -qversion >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4545: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4554: $? = 126
configure:4543: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -version >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4545: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4554: $? = 126
configure:4574: checking whether the C compiler works
configure:4596: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -DANDROID -I/home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1 -L/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/libs_collections/myapp/arm64-v8a conftest.c >&5
/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/configure: line 4598: /home/jvstvs/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: cannot execute binary file: Exec format error
configure:4600: $? = 126
configure:4640: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libffi"
| #define PACKAGE_TARNAME "libffi"
| #define PACKAGE_VERSION "3.4.2"
| #define PACKAGE_STRING "libffi 3.4.2"
| #define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues"
| #define PACKAGE_URL ""
| #define PACKAGE "libffi"
| #define VERSION "3.4.2"
| /* end confdefs.h. */
|
| int
| main (void)
| {
|
| ;
| return 0;
| }
configure:4645: error: in `/mnt/c/EHRGUI/myapp/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi':
configure:4647: error: C compiler cannot create executables
See `config.log' for more details
configure: exit 77
我尝试了以下选项:
检查我是否拥有最新的 x64 版本的 ubuntu。还假设 SDK 和 NDK 是新安装的,因此已更新
更新了 WSL 并重新启动了计算机
答: 暂无答案
评论