如何修复Buildozer构建失败并出现cmake错误 [英] How to fix Buildozer build fails with cmake error
问题描述
我正在尝试使用buildozer构建Kivy应用程序。我已经升级到buildozer 0.39。构建失败,并显示以下内容:
文件〜/ .local / lib / python2.7 / site-packages / sh.py第672行,在handle_command_exit_code
中提高了
sh.ErrorReturnCode_1:
RAN:/ bin / rm -f CMakeCache.txt CMakeFiles /
STDOUT:
/ bin / rm:无法删除 CMakeFiles /:是目录
我已经安装了cmake版本3.5.1
编辑2019年4月18日
cython版本0.21已安装。
我已按照说明此处。
我已删除了。 buildozer目录。现在运行buildozer I时,出现以下问题:
RAN:./autogen.sh
标准输出:
./autogen.sh:2:exec:autoreconf:找不到
之后
sudo apt install autoconf libtool
我现在得到错误:
STDOUT:
文件 setup.py ,第159行
打印 ---使用Tcl / Tk库,TCL_ROOT
^
语法错误:调用'print'时缺少括号。您是说print(-在TCL_ROOT上使用Tcl / Tk库)?
编辑2019年4月19日
如果我卸载buildozer似乎是python 2.7
/usr/local/lib/python2.7/dist-packages/buildozer-0.39 .dist-info / *
我从python版本为2.7.12的目录中安装了buildozer
如何将buildozer定位到python 2.7?
如何找到目标? / p>
如何使用该信息?
我尝试在python 3的virtualenv中使用buildozer,但我遇到相同的错误。
我迷路了。我看过 Docker ,但是我不知道如何安装或使用它。它是否假定使用的是buildozer的工作版本?它是什么?
编辑2019年4月21日
我运行时
docker run --volume $ HOME / .buildozer:/ home / user / .buildozer --volume $ PWD:/ home / user / hostcwd kivy / buildozer --version
'Buildozer 0.40.dev0'。
但是,当我尝试运行
docker run-卷 $ HOME / .buildozer:/ home / user / .buildozer-卷 $ PWD:/ home / user / hostcwd kivy / buildozer android debug
我收到错误:
重命名/home/user/.buildozer/android/platform/android-ndk -r17c到/home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2失败,因为/home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2不是目录
编辑2019年4月22日
我现在已注释掉
#android.ndk_path
来自buildozer.spec
我现在得到错误:
Cwd /home/user/hostcwd/.buildozer/android/platform/python- for-android
命令失败:/ usr / bin / python3 -m pythonforandroid.toolchain create --dist_name = bfgApp --bootstrap = sdl2 --requirements = python2,kivy ,pil,docutils,pathlib,html2rest --arch armeabi-v7a --copy-libs --c olor = always --storage-dir = / home / user / hostcwd / .buildozer / android / platform / build --ndk-api = 21
我删除了此软件包的CMakeFiles目录,然后重新运行buildozer构建并通过了它(在目录.buildozer / android / platform / build / build / other_builds / jpeg / armeabi-v7a__ndk_target_21 / jpeg中)
I am trying to build a Kivy app with buildozer. I have upgraded to buildozer 0.39. The build fails with:
File "~/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /bin/rm -f CMakeCache.txt CMakeFiles/
STDOUT:
/bin/rm: cannot remove 'CMakeFiles/': Is a directory
I have installed cmake version 3.5.1
Edit 18 Apr 2019
cython version 0.21 installed.
I have uninstalled cmake and reinstalled version 3.14.2 using the instructions here.
I have deleted the .buildozer directory. When I now run buildozer I, get the issue:
RAN: ./autogen.sh
STDOUT:
./autogen.sh: 2: exec: autoreconf: not found
After
sudo apt install autoconf libtool
I now get the error:
STDOUT:
File "setup.py", line 159
print "--- using Tcl/Tk libraries at", TCL_ROOT
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("--- using Tcl/Tk libraries at", TCL_ROOT)?
Edit 19 Apr 2019
If I uninstall buildozer it appears to be python 2.7
/usr/local/lib/python2.7/dist-packages/buildozer-0.39.dist-info/*
I have installed buildozer from a directory where the python version is 2.7.12
How can I target buildozer to python 2.7?
How can I find out how it is targetted?
How can I use that information?
I have tried to use buildozer in virtualenv with python 3, but I get the same error.
I am lost. I have looked the Docker, but I have no idea how to install it or use it. Does it assume a working version of buildozer? What is it? Will it solve my problem?
Edit 21 Apr 2019
When I run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer --version
'Buildozer 0.40.dev0'.
However, when I try to run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer android debug
I get the error:
Rename /home/user/.buildozer/android/platform/android-ndk-r17c to /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 fails because /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 is not a directory
Edit 22 Apr 2019
I have now commented out
#android.ndk_path
from buildozer.spec
I now get the error:
Cwd /home/user/hostcwd/.buildozer/android/platform/python-for-android
Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=bfgApp --bootstrap=sdl2 --requirements=python2,kivy,pil,docutils,pathlib,html2rest --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/user/hostcwd/.buildozer/android/platform/build" --ndk-api=21
I deleted CMakeFiles dir of this package and rerun buildozer build and it passed though (in dir .buildozer/android/platform/build/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg)
这篇关于如何修复Buildozer构建失败并出现cmake错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!