質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Kivy

Kivyは、Pythonを用いたNUI開発のためのオープンソースフレームワーク。マルチタッチなど多くの入力に対応したNUIアプリなどを開発することができます。多くの環境で動作するクロスプラットフォームです。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

1460閲覧

Ubuntu buildozer android debug で undefined macro: AC_PROG_LD エラー

groggy_egg

総合スコア24

Kivy

Kivyは、Pythonを用いたNUI開発のためのオープンソースフレームワーク。マルチタッチなど多くの入力に対応したNUIアプリなどを開発することができます。多くの環境で動作するクロスプラットフォームです。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2020/06/07 07:05

編集2020/06/09 12:59

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()

エラーで検索したところlibtoolautoconf 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

何かアドバイスお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

シンボリックリンクの追加
ln -s /usr/share/aclocal /usr/local/share/aclocal

autoconf 最新版をダウンロード、解凍、フォルダに移動しコマンド実行
$ autoreconf -f -i -Wall,no-obsolete -I/usr/share/aclocal
./configure
make
sudo make install

の結果、別エラーが発生したため質問を投稿し直します。

投稿2020/06/15 01:46

groggy_egg

総合スコア24

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問