jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
463 stars 79 forks source link

Qt Android refuses to install #63

Closed cagnulein closed 3 years ago

cagnulein commented 3 years ago

Installing qt android gives me a python error

      - name: Install Qt Android
        uses: jurplel/install-qt-action@v2
        with:
          version: '5.12.9'
          host: 'linux'
          target: 'android'
          modules: 'qtcharts debug_info'
          dir: '${{ github.workspace }}/output/android/'

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/__main__.py", line 28, in 
    sys.exit(main())
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/__init__.py", line 38, in main
    return cli.run()
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/cli.py", line 352, in run
    return args.func(args)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/cli.py", line 159, in run_install
    installer.finalize()
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/installer.py", line 174, in finalize
    self.make_conf_files(target.version, target.arch)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/installer.py", line 138, in make_conf_files
    arch_dir = self.get_arch_dir(arch)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/installer.py", line 126, in get_arch_dir
    if arch.startswith('win64_mingw'):
AttributeError: 'NoneType' object has no attribute 'startswith'
Error: The process 'python3' failed with exit code 1
cagnulein commented 3 years ago

almost the same with Mac

2020-11-11 08:12:23,146 - aqt - INFO - Redirected URL: http://mirrors.ocf.berkeley.edu/qt/online/qtsdkrepository/mac_x64/desktop/qt5_5129/qt.qt5.5129.debug_info.clang_64/5.12.9-0-202006121744qtnetworkauth-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z
2020-11-11 08:12:23,479 - aqt - INFO - Finish installation of qtnetworkauth-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z in 1.052542735999964
2020-11-11 08:12:23,481 - aqt - INFO - Downloading qtcharts...
2020-11-11 08:12:23,481 - aqt - DEBUG - Download URL: https://download.qt.io/online/qtsdkrepository/mac_x64/desktop/qt5_5129/qt.qt5.5129.qtcharts.clang_64/5.12.9-0-202006121744qtcharts-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
2020-11-11 08:12:23,640 - aqt - INFO - Redirected URL: http://mirrors.ocf.berkeley.edu/qt/online/qtsdkrepository/mac_x64/desktop/qt5_5129/qt.qt5.5129.debug_info.clang_64/5.12.9-0-202006121744qtwebglplugin-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z
2020-11-11 08:12:23,978 - aqt - INFO - Finish installation of qtscript-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z in 2.3681388899999547
2020-11-11 08:12:24,198 - aqt - INFO - Redirected URL: http://mirrors.ocf.berkeley.edu/qt/online/qtsdkrepository/mac_x64/desktop/qt5_5129/qt.qt5.5129.qtcharts.clang_64/5.12.9-0-202006121744qtcharts-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
2020-11-11 08:12:24,225 - aqt - INFO - Finish installation of qtwebglplugin-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z in 1.306996067
2020-11-11 08:12:24,702 - aqt - INFO - Finish installation of qtcharts-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z in 1.2205323300000828
2020-11-11 08:14:15,750 - aqt - INFO - Finish installation of qtwebengine-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64-debug-symbols.7z in 114.024330265
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/__main__.py", line 28, in 
    sys.exit(main())
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/__init__.py", line 38, in main
    return cli.run()
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/cli.py", line 352, in run
    return args.func(args)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/cli.py", line 159, in run_install
    installer.finalize()
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/installer.py", line 176, in finalize
    updater = Updater(prefix, self.logger)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/qtpatch.py", line 13, in __init__
    self._detect_qmake(prefix)
  File "/home/runner/.local/lib/python3.6/site-packages/aqt/qtpatch.py", line 41, in _detect_qmake
    result = subprocess.run([str(qmake_path), '-query'], stdout=subprocess.PIPE)
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/runner/work/qdomyos-zwift/qdomyos-zwift/output/macos/Qt/5.12.9/clang_64/bin/qmake'
Error: The process 'python3' failed with exit code 1
jurplel commented 3 years ago

You need to specify an arch.

cagnulein commented 3 years ago

@jurplel thanks you are right. now it gives me this error when i try to compile

Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /home/runner/work/qdomyos-zwift/qdomyos-zwift/output/android/Qt/5.12.9/android_armv7/mkspecs/android-clang/qmake.conf.
Error processing project file: /home/runner/work/qdomyos-zwift/qdomyos-zwift/src/qdomyos-zwift.pro
Error: Process completed with exit code 3.

where can i set the NDK?

which is the correct arch for macos? it isn't specified in the wiki. Thanks in advance

jurplel commented 3 years ago

Mac should be able to use the same android arch.

You will have to get the android NDK (maybe through this? https://github.com/marketplace/actions/setup-android-ndk) and set the env variable ANDROID_NDK_ROOT to its directory.

cagnulein commented 3 years ago

@jurplel is there a way to compile for armv7 linux? (for example: raspberry)

jurplel commented 3 years ago

No, Qt doesn't provide bundles for that architecture AFAIK.

jurplel commented 3 years ago

You might be able to cross-compile somehow, actually, but I don't have any idea how to.