Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Arm64 ubuntu support #1480

Closed
jhay06 opened this issue Aug 1, 2022 · 8 comments
Closed

[Feature Request] Arm64 ubuntu support #1480

jhay06 opened this issue Aug 1, 2022 · 8 comments

Comments

@jhay06
Copy link

jhay06 commented Aug 1, 2022

Hi would like to request if we can add arm64 support , i have a mac os arm64 , as per documentation building in mac os arm64 is supposedly supported , and yes it was supported but has error on the latest mac os monterey , i've done any posible resolution but same error returns on my mac os
Can't connect to HTTPS URL because the SSL module is not available.

what i did is to remove openssl@3 and openssl@1 then rerun buildozer and buildozer tries to install openssl@1.1 and then when it succcessfully installed and after some time it drops the same error Can't connect to HTTPS URL because the SSL module is not available.

I even add openssl as requirements of the buildozer.spec , clean buildozer and run , but then again same error appear.

this error is not happening when i run my ubuntu 22.04 on my other laptop that has x86_64 architecture. it builds successfully

so i think the only way that i can run this successfully is to build it using ubuntu from the docker but it has arm64 architecture ,

yes i know there's a docker buildozer but on my situation , buildozer from docker is freezing , i think because running x86_64 docker image from mac os with arm64 is very slow . so this is not good alternative for me .

what i'm thinking right now is if buildozer can run on arm64 ubuntu , it will be the best alternative but yes i know there's no android sdk /ndk for arm64 host . but there is box64 and box32 that can emulate x86 and x86_64 architecture on an arm64 ubuntu that has no slow down to the host. so the posible reso for this is to have buildozer that can run on box64 environment

hope that someone read this , also apologies for my very bad english :) thanks

@jhay06
Copy link
Author

jhay06 commented Aug 1, 2022

or if there's a way that we can skip ssl validation during pip recipes installation from the build?

@onuratakan
Copy link

or if there's a way that we can skip ssl validation during pip recipes installation from the build?

Also i have a problem about this.

@misl6
Copy link
Member

misl6 commented Aug 1, 2022

Hi @jhay06 and @onuratakan !

Can you please post the full log?

buildozer, kivy-ios and python-for-android are all supported on Apple Silicon devices, so if there's an issue should be triaged and fixed.

Instead, Ubuntu arm64 support is something we can't support, as Google doesn't distribute an NDK that runs on arm64 for linux.

@onuratakan
Copy link

Hi @jhay06 and @onuratakan !

Can you please post the full log?

buildozer, kivy-ios and python-for-android are all supported on Apple Silicon devices, so if there's an issue should be triaged and fixed.

Instead, Ubuntu arm64 support is something we can't support, as Google doesn't distribute an NDK that runs on arm64 for linux.

Okey ı Will share but in basic, when ı want to insall flask depencies project the buildozer insall depencies but when ı use the congirutation of ios.yml of this project, i view the error that about ssl handshake.

@onuratakan
Copy link

Hi @jhay06 and @onuratakan !

Can you please post the full log?

buildozer, kivy-ios and python-for-android are all supported on Apple Silicon devices, so if there's an issue should be triaged and fixed.

Instead, Ubuntu arm64 support is something we can't support, as Google doesn't distribute an NDK that runs on arm64 for linux.

2022-08-01T11:37:43.0997430Z [DEBUG   ] Processing dependencies for Flask==2.0.0
2022-08-01T11:37:43.1046970Z [DEBUG   ] Searching for itsdangerous>=2.0
2022-08-01T11:37:43.1051680Z [DEBUG   ] Reading https://pypi.org/simple/itsdangerous/
2022-08-01T11:37:43.1232400Z [DEBUG   ] Download error on https://pypi.org/simple/itsdangerous/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) -- Some packages may not be found!
2022-08-01T11:37:43.1234260Z [DEBUG   ] Couldn't retrieve index page for 'itsdangerous'
2022-08-01T11:37:43.1235600Z [DEBUG   ] Scanning index of all packages (this may take a while)
2022-08-01T11:37:43.1236560Z [DEBUG   ] Reading https://pypi.org/simple/
2022-08-01T11:37:43.1291760Z [DEBUG   ] Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) -- Some packages may not be found!
2022-08-01T11:37:43.1294990Z [DEBUG   ] No local packages or working download links found for itsdangerous>=2.0
2022-08-01T11:37:43.1295760Z [DEBUG   ] error: Could not find suitable distribution for Requirement.parse('itsdangerous>=2.0')
2022-08-01T11:37:43.1750600Z Exception in thread background thread for pid 50622:
  build-api-ios:
    runs-on: macos-latest
    environment: Builds       
    strategy:
      matrix:
        python-version: [3.8]
    steps:
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - uses: actions/checkout@v2
      - name: Setup environment
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          pip install -e .
          pip install Cython cookiecutter pbxproj buildozer==1.4.0
      - name: Check buildozer installation
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          buildozer --help
      - name: Initialize buildozer in project folder
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
      - name: Install dependencies
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          brew install autoconf automake libtool pkg-config
      - name: Get Date
        id: get-date
        run: |
          echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
        shell: bash

      - name: Cache Buildozer global directory
        uses: actions/cache@v2
        with:
          path: .buildozer_global
          key: buildozer-global-${{ hashFiles('buildozer.spec') }} # Replace with your path

      - uses: actions/cache@v2
        with:
          path: .buildozer
          key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}
        
      - name: buildozer ios debug
        run: |
          source .ci/osx_ci.sh
          arm64_set_path_and_python_version ${{ matrix.python }}
          buildozer --profile api ios debug
      - name: Zip
        run: sudo zip -r api_ios_${{ github.event.release.tag_name }} bin/
        

      - name: Upload artifacts
        uses: actions/upload-artifact@v2
        with:
          path: api_ios_${{ github.event.release.tag_name }}.zip

      - uses: AButler/upload-release-assets@v2.0
        if: github.event_name == 'release'
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}        
          files: 'api_ios_${{ github.event.release.tag_name }}.zip'

@jhay06
Copy link
Author

jhay06 commented Aug 2, 2022

Instead, Ubuntu arm64 support is something we can't support, as Google doesn't distribute an NDK that runs on arm64 for linux.

hi @misl6 ,
Yes it is understandable that there's no NDK that runs on arm64 and im not asking to convert it or something , if you are familiar with box64/box32 library for linux , this might help us to to run NDK built with x86_64/x86 on arm64 since box32 and box64 are libraries that translate x86_64 opcodes to arm64

i have ubuntu arm64 vm that runs on my mac os arm64 , so i think buildozer + box64/box32 is more feasible that waiting for NDK arm64 :)
thanks

@jhay06
Copy link
Author

jhay06 commented Aug 7, 2022

okay i tried to clean homebrew packages , on both arm64 and x86_64
and now i can confirm that buildozer doesn't work on arm64 mac os monterey

new error appear . unknown host architecture arm64

so i clean again arm64 homebrew and switch to x86_64 homebrew and check if error still persist

@jhay06
Copy link
Author

jhay06 commented Aug 7, 2022

okay found out that having same packages on both arm64 and x86_64 to be specific is the list below
autoconf , automake , cmake libtool libffi , openssl python3 pkg-config create a conflict in buildozer , i think hostpython is looking on an openssl and dont know where to find it because it exist on both architecture , so i need to clean homebrew and give up some installed library to confirm my theory ,

i think for mac os we shoud have different buildozer i think that can detect wether it runs on x86_64 or an arm64 , so it will not confuse where does dependencies located

i will close this now thanks

but i'm still hoping on a buildozer in docker hthat runs win box64/box32

@jhay06 jhay06 closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants