How to fix Buildozer build fails with cmake error

谁说胖子不能爱 提交于 2019-12-20 06:27:03

问题


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


回答1:


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)



来源:https://stackoverflow.com/questions/55468917/how-to-fix-buildozer-build-fails-with-cmake-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!