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

Qt6: Failed to install Qt6 Android on Linux Host #193

Closed
ghost opened this issue Jan 10, 2021 · 11 comments
Closed

Qt6: Failed to install Qt6 Android on Linux Host #193

ghost opened this issue Jan 10, 2021 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 10, 2021

Version: aqtinstall-0.10.1 installed via pip

After running aqt install 6.0.0 linux android android_armv7 it says:

(aqt_test) tmp/aqt_test > aqt install 6.0.0 linux android android_armv7
2021-01-10 16:06:17,227 - aqt - INFO - aqtinstall(aqt) v0.10.1 on Python 3.9.1 [CPython GCC 10.2.0]
2021-01-10 16:06:18,823 - aqt - ERROR - Specified packages are not found while parsing XML of package information!
2021-01-10 16:06:18,823 - aqt - DEBUG - <Updates>
 <ApplicationName>{AnyApplication}</ApplicationName>
 <ApplicationVersion>1.0.0</ApplicationVersion>
 <Checksum>true</Checksum>
 <PackageUpdate>
  <Name>qt.qt6.600.android</Name>
  <DisplayName>Android</DisplayName>
  <Description>Qt 6.0.0 Prebuilt Components for Android armv7, arm64-v8a, x86 and x86_64</Description>
  <Version>6.0.0-0-202012071150</Version>
  <ReleaseDate>2020-12-07</ReleaseDate>
  <Dependencies>qt.tools.qtcreator, qt.qt6.600.doc, qt.qt6.600.examples, qt.qt6.600.android_arm64_v8a, qt.qt6.600.android_armv7, qt.qt6.600.android_x86, qt.qt6.600.android_x86_64</Dependencies>
  <AutoDependOn/>
  <Default>false</Default>
  <Script>installscript.qs</Script>
  <SortingPriority>270</SortingPriority>
  <DownloadableArchives/>
  <UpdateFile UncompressedSize="0" CompressedSize="0" OS="Any"/>
  <SHA1>16dc9c6fb99c87d673c4f659a922f7e4202e4fa2</SHA1>
 </PackageUpdate>
 <SHA1>16dc9c6fb99c87d673c4f659a922f7e4202e4fa2</SHA1>
 <MetadataName>2020-12-07-1150_meta.7z</MetadataName>
</Updates>

Traceback (most recent call last):
  File "/tmp/aqt_test/bin/aqt", line 8, in <module>
    sys.exit(main())
  File "/tmp/aqt_test/lib/python3.9/site-packages/aqt/__init__.py", line 38, in main
    return cli.run()
  File "/tmp/aqt_test/lib/python3.9/site-packages/aqt/installer.py", line 373, in run
    return args.func(args)
  File "/tmp/aqt_test/lib/python3.9/site-packages/aqt/installer.py", line 186, in run_install
    finisher(target_config, base_dir, self.logger)
  File "/tmp/aqt_test/lib/python3.9/site-packages/aqt/installer.py", line 460, in finisher
    raise e
  File "/tmp/aqt_test/lib/python3.9/site-packages/aqt/installer.py", line 445, in finisher
    with open(os.path.join(base_dir, qt_version, arch_dir, 'bin', 'qt.conf'), 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/aqt_test/6.0.0/android_armv7/bin/qt.conf'

Following the code, it tries to search DownloadableArchives however in this XML it's empty. However there's a new key Dependencies which could help.

@ghost ghost changed the title Qt6 Android: Failed to install Qt6 on Android Qt6 Android: Failed to install Qt6 Android Jan 10, 2021
@miurahr miurahr added the enhancement New feature or request label Jan 10, 2021
@ghost ghost changed the title Qt6 Android: Failed to install Qt6 Android Qt6: Failed to install Qt6 Android Jan 21, 2021
@ghost ghost changed the title Qt6: Failed to install Qt6 Android Qt6: Failed to install Qt6 Android on Linux Host Jan 21, 2021
@miurahr
Copy link
Owner

miurahr commented Jan 27, 2021

Work around in #200 and it has already merged into master.

@miurahr miurahr self-assigned this Jan 27, 2021
@miurahr miurahr added the feedback Need feedback from issue reporter label Jan 27, 2021
@miurahr miurahr added this to the Version 1.0.0 GA milestone Jan 27, 2021
@miurahr
Copy link
Owner

miurahr commented Jan 30, 2021

Fix is out as v1.0.0b2

@miurahr miurahr closed this as completed Jan 30, 2021
@ghost
Copy link
Author

ghost commented Feb 8, 2021

The installer gives installed/6.0.1/android_x86_64/bin/qmake: line 7: /home/qt/work/install/bin/qmake: No such file or directory when running android qmake.

The Qt android installed from QtOnlineInstaller has this pointed to a gcc_64/bin/qmake, so it's possible that desktop version is an indirect dependency of android version.

@miurahr
Copy link
Owner

miurahr commented Feb 8, 2021

You can install desktop version by yourself before installing android version.

@ghost
Copy link
Author

ghost commented Feb 8, 2021

As you may check here: https://github.com/Qv2ray/Qv2ray/runs/1853603668?check_suite_focus=true#step:4:359
/home/runner/work/Qv2ray/Qt/6.0.1/android_armv7/bin/qmake: 7: /home/runner/work/Qv2ray/Qt/6.0.1/android_armv7/bin/qmake: /home/qt/work/install/bin/qmake: not found

It's referencing an external address: /home/qt/work/install/bin/qmake which should be replaced by the real desktop version of qt

This below is the content of qmake executable in a Qt Android Installation, where /home/qt/work/install/bin/qmake should be replaced with the actual desktop Qt qmake path.

(aqt_test) android_x86/bin > cat ./qmake
#!/bin/sh

# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
script_dir_path=`dirname $0`
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`

/home/qt/work/install/bin/qmake -qtconf "$script_dir_path/target_qt.conf" $*

@miurahr
Copy link
Owner

miurahr commented Feb 10, 2021

There seems be necessary to patch many files for Qt6, because of contents of meta package script for android such as follows.

aqtinstall does not support qscript scripting engine, so users should handle them by hand by themselves
except for common things which aqt does, such as qmake binary patching, and license setting.

/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the release tools of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

// constructor
function Component()
{
    // Add dynamic dependency for mingw TC for Android packages on Windows.
    if (installer.value("os") == "win") {
        var mingw_tc_component = "qt.tools.win64_mingw810";
        component.addDependency(mingw_tc_component);
    }
    // Determine if this is a online snapshot build
    var snapshotBuild = false;
    var isSnapshotStr = "true";
    if (['true', 'yes', '1'].indexOf(isSnapshotStr) >= 0)
        snapshotBuild = true;

    // In snapshot builds add automatic dependency for preview component,
    // and in release builds add automatic dependency for common 'android' component,
    var dependencyStr = "qt.qt6.61.android";
    if (snapshotBuild)
        dependencyStr = "preview.qt.qt6.61.android";

    var autoDependency = component.value("AutoDependOn");
    if (autoDependency) {
        component.setValue("AutoDependOn", autoDependency+","+dependencyStr)
    }
    else {
        component.setValue("AutoDependOn", dependencyStr)
    }

    var hostDependencyStr = "";
    var hostDependency = component.value("Dependencies");
    if (hostDependency) {
        if (installer.value("os") == "x11") {
            hostDependencyStr = "qt.qt6.610.gcc_64"
        }
        if (installer.value("os") == "mac") {
            hostDependencyStr = "qt.qt6.610.clang_64"
        }
        if (installer.value("os") == "win") {
            hostDependencyStr = "qt.qt6.610.win64_mingw81"
        }
    component.setValue("Dependencies", hostDependencyStr)
    }
}

Component.prototype.createOperations = function()
{
    component.createOperations();

    var qtPath = "@TargetDir@" + "/6.1.0/android_armv7";
    var qmakeBinary = "";
    var cmakeBinary = "";
    var platform = "";
    var qmakeScript = "";
    var qtCMakeScript = "";
    var targetQtConf = "";
    var targetQtConf_documentation = "Documentation=../../Docs/Qt-6.1.0";
    var targetQtConf_examples = "Examples=../../Examples/Qt-6.1.0";
    var originalQmakePath = "";
    var newQmakePath = "";
    var originalSetCMakePath ="";
    var newSetCMakePath = "";
    var originalQtCMakeStandaloneTestPath = "/Users/qt/work/install/target";
    var newQtCMakeStandaloneTestPath = "";
    var originalHostPrefix = "HostPrefix=../../";
    var newHostPrefix = "";
    var originalHostData = "HostData=target";
    var newHostData = "";
    var androidQmakeBinary = "";
    var qtToolchainCmake = "";
    var qtBuildInternalsExtraCmake = "";
    var originalQtHostPath = "/Users/qt/work/install";
    var newQtHostPath = "";
    var originalQtHostPathCmakeDir = "";
    var newQtHostPathCmakeDir = "";
    var originalQtHostTargetPath = "/Users/qt/work/install/target";
    var newQtHostTargetPath = "";

    if (installer.value("os") == "x11") {
        // Host qmake installed via dependencies
        qmakeBinary = "@TargetDir@" + "/6.1.0/gcc_64/bin/qmake";
        // CMake is installed under Tools by default for all Qt installations
        cmakeBinary = "@TargetDir@" + "/Tools/CMake/bin/cmake";
        platform = "linux";

        qmakeScript = qtPath + "/bin/qmake";
        qtCMakeScript = qtPath + "/bin/qt-cmake";
        qtCMakePrivateScript = qtPath + "/bin/qt-cmake-private";
        qtCMakeStandaloneTestScript = qtPath + "/bin/qt-cmake-standalone-test";
        targetQtConf = qtPath + "/bin/target_qt.conf";
        qtToolchainCmake = qtPath + "/lib/cmake/Qt6/qt.toolchain.cmake";
        qtBuildInternalsExtraCmake = qtPath + "/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake";

        // Initialize variables used for patching host qmake location
        // Host is qmake installed via dependencies
        originalQmakePath = "/home/qt/work/install/bin/qmake";
        newQmakePath = "@TargetDir@" + "/6.1.0/gcc_64/bin/qmake";

        // Initialize variables used for patching CMake to under Tools
        originalSetCMakePath = "/opt/cmake-3.18.3/bin/cmake";
        newSetCMakePath = cmakeBinary;

        // Initialize variable with path to bin/qt-cmake-private(.bat)
        originalQtCMakeStandaloneTestPath = "/home/qt/work/install/target";
        newQtCMakeStandaloneTestPath = qtPath;

        // Set new patched values for target_qt.confs
        newHostPrefix = "HostPrefix=../../gcc_64";
        newHostData = "HostData=../android_armv7";

        // Set new patched values for qt.toolchain.cmake
        // __qt_initial_qt_host_path
        originalQtHostPath = "/home/qt/work/install";
        newQtHostPath = "@TargetDir@" + "/6.1.0/gcc_64";
        //__qt_initial_qt_host_path_cmake_dir
        originalQtHostPathCmakeDir = "/home/qt/work/install/lib/cmake";
        newQtHostPathCmakeDir = "@TargetDir@" + "/6.1.0/gcc_64/lib/cmake";

        // Set new patched values for QtBuildInternalsExtra.cmake
        originalQtHostTargetPath = "/home/qt/work/install/target";
        newQtHostTargetPath = qtPath;
    }

    if (installer.value("os") == "mac") {
        // Host qmake installed via dependencies
        qmakeBinary = "@TargetDir@" + "/6.1.0/clang_64/bin/qmake";
        // CMake is installed under Tools by default for all Qt installations
        cmakeBinary = "@TargetDir@" + "/Tools/CMake/bin/cmake";
        platform = "mac";

        //qmakeScript = "@TargetDir@" + "/6.1.0/armv7/bin/qmake.bat";
        qmakeScript = qtPath + "/bin/qmake";
        qtCMakeScript = qtPath + "/bin/qt-cmake";
        qtCMakePrivateScript = qtPath + "/bin/qt-cmake-private";
        qtCMakeStandaloneTestScript = qtPath + "/bin/qt-cmake-standalone-test";
        targetQtConf = qtPath + "/bin/target_qt.conf";
        qtToolchainCmake = qtPath + "/lib/cmake/Qt6/qt.toolchain.cmake";
        qtBuildInternalsExtraCmake = qtPath + "/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake";

        // Initialize variables used for patching host qmake location
        // Host is qmake installed via dependencies
        originalQmakePath = "/Users/qt/work/install/bin/qmake";
        newQmakePath = "@TargetDir@" + "/6.1.0/clang_64/bin/qmake";

        // Initialize variables used for patching CMake to under Tools
        originalSetCMakePath = "/Applications/CMake.app/Contents/bin/cmake";
        newSetCMakePath = cmakeBinary;

        // Initialize variable with path to bin/qt-cmake-private(.bat)
        newQtCMakeStandaloneTestPath = qtPath;

        // Set new patched values for target_qt.confs
        newHostPrefix = "HostPrefix=../../clang_64";
        newHostData = "HostData=../android_armv7";

        // Set new patched values for qt.toolchain.cmake
        // __qt_initial_qt_host_path
        newQtHostPath = "@TargetDir@" + "/6.1.0/clang_64";
        //__qt_initial_qt_host_path_cmake_dir
        originalQtHostPathCmakeDir = "/Users/qt/work/install/lib/cmake";
        newQtHostPathCmakeDir = "@TargetDir@" + "/6.1.0/clang_64/lib/cmake";

        // Set new patched values for QtBuildInternalsExtra.cmake
        newQtHostTargetPath = qtPath;
    }

    if (installer.value("os") == "win") {
        // Host qmake installed via dependencies
        qmakeBinary = "@TargetDir@" + "/6.1.0/mingw81_64/bin/qmake.exe";
        // CMake is installed under Tools by default for all Qt installations
        cmakeBinary = "@TargetDir@" + "/Tools/CMake_64/bin/cmake.exe";
        platform = "windows";

        //qmakeScript = "@TargetDir@" + "/6.1.0/armv7/bin/qmake.bat";
        qmakeScript = qtPath + "\\bin\\qmake.bat";
        qtCMakeScript = qtPath + "\\bin\\qt-cmake.bat";
        qtCMakePrivateScript = qtPath + "\\bin\\qt-cmake-private.bat";
        qtCMakeStandaloneTestScript = qtPath + "\\bin\\qt-cmake-standalone-test.bat";
        targetQtConf = qtPath + "\\bin\\target_qt.conf";
        qtToolchainCmake = qtPath + "\\lib\\cmake\\Qt6\\qt.toolchain.cmake";
        qtBuildInternalsExtraCmake = qtPath + "\\lib\\cmake\\Qt6BuildInternals\\QtBuildInternalsExtra.cmake";

        // Initialize variables used for patching host qmake location
        // Host is qmake installed via dependencies
        originalQmakePath = "/Users/qt/work/install/bin\\qmake.exe";
        newQmakePath = "@TargetDir@" + "\\6.1.0\\mingw81_64\\bin\\qmake.exe";

        // Initialize variables used for patching CMake to under Tools
        originalSetCMakePath = "C:/CMake/bin/cmake.exe";
        newSetCMakePath = cmakeBinary.replace(/\\/g, "/");

        // Initialize variable with path to bin/qt-cmake-private(.bat)
        newQtCMakeStandaloneTestPath = qtPath;

        // Set new patched values for target_qt.conf
        newHostPrefix = "HostPrefix=../../mingw81_64";
        newHostData = "HostData=../android_armv7";

        // Set new patched values for qt.toolchain.cmake
        // cmake paths can use forward slash instead of backslash in paths which is unusual for Windows
        // Make whole path using forward slash a.k.a Unix path notation instead of backslash
        var windowsTargetDir = "@TargetDir@";
        var unixTargetDir = windowsTargetDir.replace(/\\/g, "/");
        console.log("Converting path for cmake: ");
        console.log("  from windowsTargetDir: " + windowsTargetDir);
        console.log("  to unixTargetDir: " + unixTargetDir);

        // __qt_initial_qt_host_path
        newQtHostPath = unixTargetDir + "/6.1.0/mingw81_64";
        //__qt_initial_qt_host_path_cmake_dir
        originalQtHostPathCmakeDir = "/Users/qt/work/install/lib/cmake";
        newQtHostPathCmakeDir = unixTargetDir + "/6.1.0/mingw81_64/lib/cmake";

        // Set new patched values for QtBuildInternalsExtra.cmake
        newQtHostTargetPath = qtPath;

        // Copy qmake from host bin to target bin for patching
        androidQmakeBinary =  qtPath + "\\bin\\qmake.exe";
        console.log("Copying qmake: ");
        console.log("  from qmakeBinary: " + qmakeBinary);
        console.log("  to androidQmakeBinary: " + androidQmakeBinary);
        component.addOperation("Copy", qmakeBinary, androidQmakeBinary);
    }

    // Patch build time paths from target\bin\qmake(.bat) script
    console.log("Patching qmake script: " + qmakeScript);
    console.log("  from originalQmakePath: " + originalQmakePath);
    console.log("  to newQmakePath: " + newQmakePath);
    component.addOperation("Replace", qmakeScript, originalQmakePath, newQmakePath);

    // Patch build time CMake path from qt-cmake(.bat) script
    console.log("Patching CMake path from qt-cmake script: " + qtCMakeScript);
    console.log("  from originalSetCMakePath: " + originalSetCMakePath);
    console.log("  to newSetCMakePath: " + newSetCMakePath);
    component.addOperation("Replace", qtCMakeScript, originalSetCMakePath, newSetCMakePath);

    // Patch build time CMAke paths from qt-cmake-private(.bat) script
    console.log("Patching CMake path from qt-cmake-private script: " + qtCMakePrivateScript);
    console.log("  from originalSetCMakePath: " + originalSetCMakePath);
    console.log("  to newSetCMakePath: " + newSetCMakePath);
    component.addOperation("Replace", qtCMakePrivateScript, originalSetCMakePath, newSetCMakePath);

    // Patch build time CMAke paths from qt-cmake-standalone-test(.bat) script
    console.log("Patching path from qt-cmake-standalone-test script: " + qtCMakeStandaloneTestScript);
    console.log("  from originalQtCMakeStandaloneTestPath: " + originalQtCMakeStandaloneTestPath);
    console.log("  to newQtCMakeStandaloneTestPath: " + newQtCMakeStandaloneTestPath);
    component.addOperation("Replace", qtCMakeStandaloneTestScript, originalQtCMakeStandaloneTestPath, newQtCMakeStandaloneTestPath);

    // Patch Host Prefix and Host Data paths from target_qt.conf
    console.log("Patching Host Prefix and Host Data from target_qt.conf: " + targetQtConf);
    console.log("  from originalHostPrefix: " + originalHostPrefix);
    console.log("  to newHostPrefix: " + newHostPrefix);
    console.log("  from originalHostData: " + originalHostData);
    console.log("  to newHostData: " + newHostData);
    component.addOperation("Replace", targetQtConf, originalHostPrefix, newHostPrefix);
    component.addOperation("Replace", targetQtConf , originalHostData, newHostData);

    // Append target_qt.conf with relative paths to documentation and examples
    console.log("Appending " + targetQtConf_documentation + " and " + targetQtConf_examples + " to targetQtConf" + targetQtConf);
    component.addOperation("AppendFile", targetQtConf, targetQtConf_documentation);
    // Add a new line to targetQtConf which AppendFile operation doesn't add automatically
    if (installer.value("os") == "win") {
        // \r\n = CR + LF used as a new line character in Windows
        component.addOperation("AppendFile", targetQtConf, "\r\n");
    }
    else {
        // \n = LF (Line Feed) used as a new line character in Unix/macOS
        component.addOperation("AppendFile", targetQtConf, "\n");
    }
    component.addOperation("AppendFile", targetQtConf, targetQtConf_examples);

    // Patch Qt install path from qt.toolchain.cmake
    console.log("Patching install path from qt.toolchain.cmake : " + qtToolchainCmake);
    console.log("set __qt_initial_qt_host_path");
    console.log("  from originalQtHostPath: " + originalQtHostPath);
    console.log("  to newQtHostPath: " + newQtHostPath);
    component.addOperation("Replace", qtToolchainCmake, originalQtHostPath, newQtHostPath);
    console.log("set __qt_initial_qt_host_path_cmake_dir");
    console.log("  from originalQtHostPathCmakeDir: " + originalQtHostPathCmakeDir);
    console.log("  to newQtHostPathCmakeDir: " + newQtHostPathCmakeDir);
    component.addOperation("Replace", qtToolchainCmake, originalQtHostPathCmakeDir, newQtHostPathCmakeDir);

    // Patch Qt install path from QtBuildInternalsExtra.cmake
    console.log("Patching install path from QtBuildInternalsExtra.cmake : " + qtBuildInternalsExtraCmake);
    console.log("  from originalQtHostTargetPath: " + originalQtHostTargetPath);
    console.log("  to newQtHostTargetPath: " + newQtHostTargetPath);
    component.addOperation("Replace", qtBuildInternalsExtraCmake, originalQtHostTargetPath, newQtHostTargetPath);

    addInitQtPatchOperation(component, platform, qtPath, qmakeScript, "emb-arm-qt5");

    if (installer.value("SDKToolBinary") == "")
        return;

    // add Qt into QtCreator
    component.addOperation("Execute",
                           ["@SDKToolBinary@", "addQt",
                            "--id", component.name,
                            "--name", "Qt %{Qt:Version} for Android ARMv7",
                            "--type", "Qt4ProjectManager.QtVersion.Android",
                            "--qmake", qmakeScript,
                            "UNDOEXECUTE",
                            "@SDKToolBinary@", "rmQt", "--id", component.name]);

    // patch/register docs and examples
    var installationPath = installer.value("TargetDir") + "/6.1.0/android_armv7";
    print("Register documentation and examples for: " + installationPath);
    patchQtExamplesAndDoc(component, installationPath, "Qt-6.1.0");

    // is this OpenSource installation?
    var isOpenSource = "true";
    if (['true', 'yes', '1'].indexOf(isOpenSource) >= 0) {
        // patch qconfig.pri
        var qconfigFile = qtPath + "/mkspecs/qconfig.pri";
        component.addOperation("LineReplace", qconfigFile, "QT_EDITION =", "QT_EDITION = OpenSource");
        if (installer.value("os") == "x11") {
            component.addOperation("LineReplace", qconfigFile, "QT_LICHECK = licheck64", "QT_LICHECK =");
        }
        if (installer.value("os") == "mac") {
            component.addOperation("LineReplace", qconfigFile, "QT_LICHECK = licheck_mac", "QT_LICHECK =");
        }
        if (installer.value("os") == "win") {
            component.addOperation("LineReplace", qconfigFile, "QT_LICHECK = licheck.exe", "QT_LICHECK =");
        }
    }

    // On Windows, earlier copied qmake.exe for patching purposes causes issues later if not removed
    if (installer.value("os") == "win") {
        component.addOperation("Delete", androidQmakeBinary);
    }
}

@miurahr miurahr reopened this Feb 10, 2021
@miurahr miurahr added help wanted Extra attention is needed and removed feedback Need feedback from issue reporter labels Feb 10, 2021
@miurahr miurahr removed this from the Version 1.0.0 GA milestone Feb 10, 2021
@miurahr
Copy link
Owner

miurahr commented Feb 11, 2021

PR #210 handle the case, it modify qmake script for android installation, that is now merged into master branch.

@miurahr miurahr removed the help wanted Extra attention is needed label Feb 11, 2021
@miurahr
Copy link
Owner

miurahr commented Feb 20, 2021

released the fix.

@miurahr miurahr closed this as completed Feb 20, 2021
@ghost
Copy link
Author

ghost commented Feb 27, 2021

Wait, there's another quick question.

(aqt_test) aqt_test > diff ~/Qt/6.1.0/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake ./installed/6.1.0/android_arm64_v8a/lib/cmake/Qt6/qt.toolchain.cmake                                       2⏎ 11s
27c27
<     set(__qt_initial_qt_host_path "/home/uvu/Qt/6.1.0/gcc_64")
---
>     set(__qt_initial_qt_host_path "/home/qt/work/install")
32c32
<     set(__qt_initial_qt_host_path_cmake_dir "/home/uvu/Qt/6.1.0/gcc_64/lib/cmake")
---
>     set(__qt_initial_qt_host_path_cmake_dir "/home/qt/work/install/lib/cmake")

With aqtinstall 1.1.3

(aqt_test) aqt_test > pip show aqtinstall                                                                                                                                                               1⏎
Name: aqtinstall
Version: 1.1.3
Summary: Another unofficial Qt installer

The qt.toolchain.cmake seems not patched. A valid __qt_initial_qt_host_path is required for a working qt-cmake.

@miurahr
Copy link
Owner

miurahr commented Feb 27, 2021

aqt don't have a feature to patch cmake. Please do it by yourself.
Anyone who know how to patch it, on variety of Qt versions and OSes, are very welcome to give Pull-Request to aqtinstall project.

@ghost
Copy link
Author

ghost commented Feb 28, 2021

Thanks for your reply, for future reference, this patch make the toolchain work.

sed -i "s,/home/qt/work/install,/YOUR_PATH_TO_QT/6.0.1/gcc_64,g" $Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake as we are using it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant