digreatbrian / buildozer-action

Action to build Kivy App to APK
MIT License
5 stars 4 forks source link

Error in the early stage of the build: Unable to locate package libtinfo5 #6

Closed OuchenTech closed 1 month ago

OuchenTech commented 1 month ago

2024-10-11T15:06:10.5825486Z ##[warning]Unexpected input(s) 'work-dir', valid inputs are ['python-version', 'workdir', 'buildozer-cmd'] 2024-10-11T15:06:10.5848666Z ##[group]Run digreatbrian/buildozer-action@v2 2024-10-11T15:06:10.5849313Z with: 2024-10-11T15:06:10.5849766Z buildozer-cmd: buildozer -v android debug 2024-10-11T15:06:10.5850366Z work-dir: . 2024-10-11T15:06:10.5850769Z python-version: 3.8 2024-10-11T15:06:10.5851197Z workdir: . 2024-10-11T15:06:10.5851574Z ##[endgroup] 2024-10-11T15:06:10.6129473Z ##[group]Run actions/setup-python@v2 2024-10-11T15:06:10.6130063Z with: 2024-10-11T15:06:10.6130475Z architecture: x64 2024-10-11T15:06:10.6130921Z python-version: 3.8 2024-10-11T15:06:10.6131603Z token: 2024-10-11T15:06:10.6132011Z ##[endgroup] 2024-10-11T15:06:10.7284417Z Version 3.8 was not found in the local cache 2024-10-11T15:06:11.0167085Z Version 3.8 is available for downloading 2024-10-11T15:06:11.0168726Z Download from "https://github.com/actions/python-versions/releases/download/3.8.18-9962543870/python-3.8.18-linux-24.04-x64.tar.gz" 2024-10-11T15:06:11.7216586Z Extract downloaded archive 2024-10-11T15:06:11.7330186Z [command]/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/f4b54e29-f147-47a9-a85d-1022114adf1b -f /home/runner/work/_temp/71bfb351-bb29-4238-ad73-151352b1637b 2024-10-11T15:06:13.2764118Z Execute installation script 2024-10-11T15:06:13.2859332Z Check if Python hostedtoolcache folder exist... 2024-10-11T15:06:13.2861423Z Create Python 3.8.18 folder 2024-10-11T15:06:13.2875415Z Copy Python binaries to hostedtoolcache folder 2024-10-11T15:06:13.7548869Z Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action) 2024-10-11T15:06:13.7595604Z Upgrading pip... 2024-10-11T15:06:15.8326221Z Looking in links: /tmp/tmpgl5cn30a 2024-10-11T15:06:15.8331762Z Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages (56.0.0) 2024-10-11T15:06:15.8338604Z Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages (23.0.1) 2024-10-11T15:06:17.3699348Z Collecting pip 2024-10-11T15:06:17.4264410Z Downloading pip-24.2-py3-none-any.whl (1.8 MB) 2024-10-11T15:06:17.5647181Z ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 13.4 MB/s eta 0:00:00 2024-10-11T15:06:17.5984823Z Installing collected packages: pip 2024-10-11T15:06:17.5986779Z Attempting uninstall: pip 2024-10-11T15:06:17.5992259Z Found existing installation: pip 23.0.1 2024-10-11T15:06:17.7795615Z Uninstalling pip-23.0.1: 2024-10-11T15:06:17.7876806Z Successfully uninstalled pip-23.0.1 2024-10-11T15:06:18.5258478Z Successfully installed pip-24.2 2024-10-11T15:06:18.5773548Z Create complete file 2024-10-11T15:06:18.5821983Z Successfully setup CPython (3.8.18) 2024-10-11T15:06:18.6023851Z ##[group]Run actions/setup-java@v3 2024-10-11T15:06:18.6024205Z with: 2024-10-11T15:06:18.6024432Z distribution: temurin 2024-10-11T15:06:18.6024700Z java-version: 17 2024-10-11T15:06:18.6024978Z java-package: jdk 2024-10-11T15:06:18.6025233Z check-latest: false 2024-10-11T15:06:18.6025482Z server-id: github 2024-10-11T15:06:18.6025740Z server-username: GITHUB_ACTOR 2024-10-11T15:06:18.6026053Z server-password: GITHUB_TOKEN 2024-10-11T15:06:18.6026348Z overwrite-settings: true 2024-10-11T15:06:18.6026625Z job-status: success 2024-10-11T15:06:18.6027154Z token: 2024-10-11T15:06:18.6027393Z env: 2024-10-11T15:06:18.6027688Z pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64 2024-10-11T15:06:18.6028177Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib 2024-10-11T15:06:18.6028566Z ##[endgroup] 2024-10-11T15:06:18.7552458Z ##[group]Installed distributions 2024-10-11T15:06:18.7600817Z Resolved Java 17.0.12+7 from tool-cache 2024-10-11T15:06:18.7603206Z Setting Java 17.0.12+7 as the default 2024-10-11T15:06:18.7616227Z Creating toolchains.xml for JDK version 17 from temurin 2024-10-11T15:06:18.7694294Z Writing to /home/runner/.m2/toolchains.xml 2024-10-11T15:06:18.7695723Z 2024-10-11T15:06:18.7696134Z Java configuration: 2024-10-11T15:06:18.7697125Z Distribution: temurin 2024-10-11T15:06:18.7697805Z Version: 17.0.12+7 2024-10-11T15:06:18.7698789Z Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:18.7699398Z 2024-10-11T15:06:18.7701727Z ##[endgroup] 2024-10-11T15:06:18.7715064Z Creating settings.xml with server-id: github 2024-10-11T15:06:18.7735798Z Writing to /home/runner/.m2/settings.xml 2024-10-11T15:06:18.7841401Z ##[group]Run echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV 2024-10-11T15:06:18.7841930Z echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV 2024-10-11T15:06:18.7972357Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} 2024-10-11T15:06:18.7972802Z env: 2024-10-11T15:06:18.7973248Z pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64 2024-10-11T15:06:18.7974033Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib 2024-10-11T15:06:18.7974823Z JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:18.7975570Z JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:18.7976205Z ##[endgroup] 2024-10-11T15:06:18.8199243Z ##[group]Run python3 -m venv venv 2024-10-11T15:06:18.8199837Z python3 -m venv venv 2024-10-11T15:06:18.8200344Z source venv/bin/activate 2024-10-11T15:06:18.8200942Z echo "Using Python==$(python --version)" 2024-10-11T15:06:18.8251351Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} 2024-10-11T15:06:18.8251766Z env: 2024-10-11T15:06:18.8252062Z pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64 2024-10-11T15:06:18.8252550Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib 2024-10-11T15:06:18.8253088Z JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:18.8253696Z JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:18.8254152Z ##[endgroup] 2024-10-11T15:06:21.8305090Z Using Python==Python 3.8.18 2024-10-11T15:06:21.8334761Z ##[group]Run sudo apt update 2024-10-11T15:06:21.8335096Z sudo apt update 2024-10-11T15:06:21.8335384Z sudo apt install -y git \ 2024-10-11T15:06:21.8335683Z  zip \ 2024-10-11T15:06:21.8335915Z  unzip \ 2024-10-11T15:06:21.8336165Z  openjdk-17-jdk \ 2024-10-11T15:06:21.8336443Z  python3-pip \ 2024-10-11T15:06:21.8336708Z  autoconf \ 2024-10-11T15:06:21.8337690Z  libtool \ 2024-10-11T15:06:21.8337964Z  pkg-config \ 2024-10-11T15:06:21.8338236Z  zlib1g-dev \ 2024-10-11T15:06:21.8338503Z  libncurses5-dev \ 2024-10-11T15:06:21.8338788Z  libncursesw5-dev \ 2024-10-11T15:06:21.8339075Z  libtinfo5 \ 2024-10-11T15:06:21.8339349Z  cmake \ 2024-10-11T15:06:21.8339589Z  libffi-dev \ 2024-10-11T15:06:21.8339848Z  libssl-dev 2024-10-11T15:06:21.8340132Z export PATH=$PATH:~/.local/bin/ 2024-10-11T15:06:21.8340509Z python3 -m pip install --upgrade \ 2024-10-11T15:06:21.8340849Z  Cython==0.29.33 \ 2024-10-11T15:06:21.8341120Z  buildozer 2024-10-11T15:06:21.8392124Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} 2024-10-11T15:06:21.8392531Z env: 2024-10-11T15:06:21.8392818Z pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64 2024-10-11T15:06:21.8393315Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib 2024-10-11T15:06:21.8393856Z JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:21.8394466Z JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.12-7/x64 2024-10-11T15:06:21.8394935Z ##[endgroup] 2024-10-11T15:06:21.8651871Z 2024-10-11T15:06:21.8653220Z WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 2024-10-11T15:06:21.8654944Z 2024-10-11T15:06:21.9958484Z Hit:1 http://azure.archive.ubuntu.com/ubuntu noble InRelease 2024-10-11T15:06:21.9960634Z Get:2 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] 2024-10-11T15:06:22.0038851Z Hit:3 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease 2024-10-11T15:06:22.0118813Z Get:4 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB] 2024-10-11T15:06:22.0391096Z Hit:5 https://packages.microsoft.com/repos/azure-cli noble InRelease 2024-10-11T15:06:22.0508036Z Hit:6 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease 2024-10-11T15:06:22.2178261Z Get:7 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [542 kB] 2024-10-11T15:06:22.2338546Z Get:8 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [133 kB] 2024-10-11T15:06:22.2353322Z Get:9 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [9048 B] 2024-10-11T15:06:22.2377708Z Get:10 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [386 kB] 2024-10-11T15:06:22.2428176Z Get:11 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [160 kB] 2024-10-11T15:06:22.2462059Z Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [15.0 kB] 2024-10-11T15:06:22.3653638Z Get:13 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [384 kB] 2024-10-11T15:06:22.3700573Z Get:14 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [84.6 kB] 2024-10-11T15:06:22.3723938Z Get:15 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [4708 B] 2024-10-11T15:06:22.3766192Z Get:16 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [278 kB] 2024-10-11T15:06:22.4241497Z Get:17 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [117 kB] 2024-10-11T15:06:22.4243319Z Get:18 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [10.4 kB] 2024-10-11T15:06:25.9795815Z Fetched 2377 kB in 1s (4067 kB/s) 2024-10-11T15:06:26.5522967Z Reading package lists... 2024-10-11T15:06:26.6928721Z Building dependency tree... 2024-10-11T15:06:26.6937306Z Reading state information... 2024-10-11T15:06:26.7071054Z 32 packages can be upgraded. Run 'apt list --upgradable' to see them. 2024-10-11T15:06:26.7189236Z 2024-10-11T15:06:26.7191008Z WARNING: apt does not have a stable CLI interface. Use with caution in scripts. 2024-10-11T15:06:26.7193019Z 2024-10-11T15:06:26.7319334Z Reading package lists... 2024-10-11T15:06:26.8738748Z Building dependency tree... 2024-10-11T15:06:26.8747148Z Reading state information... 2024-10-11T15:06:27.1424416Z E: Unable to locate package libtinfo5 2024-10-11T15:06:27.1453539Z ##[error]Process completed with exit code 100.

OuchenTech commented 1 month ago

The issue seems tied to package availability on the version of Ubuntu being used. Instead of using ubuntu-latest (which is currently linking to Ubuntu 24.04), I used ubuntu-22.04 and the build successfully completed.

digreatbrian commented 1 month ago

Screenshot_20241018_023930_com.github.android.jpg

You provided wrong input to action 'work-dir' instead of 'workdir'.

OuchenTech commented 1 month ago

Screenshot_20241018_023930_com.github.android.jpg

You provided wrong input to action 'work-dir' instead of 'workdir'.

Hi, I copied and pasted your build file, which, by the way, uses 'work-dir' instead of 'workdir' (as shown in this GitHub repo). However, I don't think this is causing the issue. The problem seems to be with using latest version of ubuntu (which is not stable yet).

The following code works for me (using ubuntu-22.04), although I'm still using 'work-dir':

on:
  push:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Build APK
        uses: digreatbrian/buildozer-action@v2
        with:
          buildozer-cmd: buildozer -v android debug
          work-dir: . # directory where your main.py file rests

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: package
          path: ./bin/*.apk
digreatbrian commented 1 month ago

I have tried the action on my end, I used the following action with no problems

on:
  push:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build APK
        uses: digreatbrian/buildozer-action@v2
        with:
          python-version: 3.8
          buildozer-cmd: buildozer -v android debug

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: package
          path: ./bin/*.apk