buildozerを使ってPythonのプログラムをapkにデバッグしています。
ボタンを表示するだけのプログラムをデバッグしたときはうまくいったのですが
pyknpのプログラムをデバッグするとエラーになりました
- Ubuntu:16.04
- buildozer:1.1.1.dev0
エラー
[INFO]: -> directory context /home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi [INFO]: -> running autoreconf -vif working: autoreconf: /usr/bin/autoconf failed with exit status: 1 Exception in thread background thread for pid 17559: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.8/site-packages/sh.py", line 1662, in wrap fn(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sh.py", line 2606, in background_thread handle_exit_code(exit_code) File "/usr/local/lib/python3.8/site-packages/sh.py", line 2304, in fn return self.command.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.8/site-packages/sh.py", line 877, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /usr/bin/autoreconf -vif STDOUT: autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level autoreconf: configure.ac: tracing configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure:7697: error: possibly undefined macro: AC_PROG_LD autoreconf: /usr/bin/autoconf failed with exit status: 1 STDERR: Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module> main() File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__ getattr(self, command)(args) File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func build_dist_from_args(ctx, dist, args) File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 213, in build_dist_from_args build_recipes(build_order, python_modules, ctx, File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes recipe.build_arch(arch) File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 41, in build_arch shprint(sh.Command('autoreconf'), '-vif', _env=env) File "/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint for line in output: File "/usr/local/lib/python3.8/site-packages/sh.py", line 925, in next self.wait() File "/usr/local/lib/python3.8/site-packages/sh.py", line 849, in wait self.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.8/site-packages/sh.py", line 877, in handle_command_exit_code raise exc sh.ErrorReturnCode_1: RAN: /usr/bin/autoreconf -vif STDOUT: autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level autoreconf: configure.ac: tracing configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force configure.ac:380: warning: AC_PROG_LD is m4_require'd but not m4_defun'd acinclude.m4:251: LIBFFI_CHECK_LINKER_FEATURES is expanded from... acinclude.m4:353: LIBFFI_ENABLE_SYMVERS is expanded from... configure.ac:380: the top level configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure:7697: error: possibly undefined macro: AC_PROG_LD autoreconf: /usr/bin/autoconf failed with exit status: 1 STDERR: # Command failed: /usr/local/bin/python3.8 -m pythonforandroid.toolchain create --dist_name=pyknptest --bootstrap=sdl2 --requirements=python3,kivy,pyknp --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/ubun/ProgramFiles/kivyTest/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 # Buildozer failed to execute the last command # The error might be hidden in the log above this error # Please read the full log, and search for it before # raising an issue with buildozer itself. # In case of a bug report, please add a full log with log_level = 2
うまくいったもの
python
1from kivy.app import App 2from kivy.uix.button import Button 3class TutorialApp(App): 4 def build(self): 5 return Button(text="Hello World!") 6TutorialApp().run()
だめだったもの
python
1# -*- coding: utf-8 -*- 2from __future__ import unicode_literals #Unicode でないとエラーになる 3 4from kivy.app import App 5#from kivy.uix.button import Button 6from kivy.uix.label import Label 7 8#------------日本語表示用 9from kivy.core.text import LabelBase, DEFAULT_FONT 10from kivy.resources import resource_add_path 11resource_add_path("./japaneseFont") 12LabelBase.register(DEFAULT_FONT, "ipaexg.ttf") 13#------------------------ 14from pyknp import Juman 15import pyknp 16 17class TutorialApp(App): 18 def build(self): 19 knp=pyknp.KNP(option=u'-tab -anaphora',jumanpp=False) 20 text="すもももももももものうち" 21 rslt=knp.parse(text) 22 #return Button(text=rslt.all()) 23 return Label(text=rslt.all()) 24 25TutorialApp().run()
エラーで検索したところlibtool
やautoconf
automake
が足りない
という情報が見つかったのですがどれも既に入っていました。
$ dpkg -l autoconf ii autoconf 2.69-9 all automatic configure script builde $ dpkg -l automake ii automake 1:1.15-4ubun all Tool for generating GNU Standards $ dpkg -l libtool ii libtool 2.4.6-0.1 all Generic library support script
buildozer.spec
title = pyknptest package.name = pyknptest package.domain = org.test source.dir = . requirements = python3,kivy,pyknp android.api = 26 android.minapi = 21 android.sdk = 26 android.ndk = r19c android.ndk_path = /media/sf_VM-share/android-ndk-r19c/android-ndk-r19c android.sdk_path = /media/sf_VM-share
何かアドバイスお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。