jurplel / install-qt-action

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

`Specified target combination is not valid: windows tools_opensslv3_x64 qt.tools.opensslv3.win_x64` #209

Closed firewave closed 1 month ago

firewave commented 9 months ago

Recently the old tools_openssl_x64 tool was removed and you now need to use tools_opensslv3_x64. That shows up in the list of available tools:

python3 -m aqt list-tool windows desktop tools_opensslv3_x64
qt.tools.opensslv3.win_x64

But if you install it there is a warning although it is still being installed:

python3 -m aqt install-tool windows desktop tools_opensslv3_x64
aqtinstall(aqt) v2.1.0 on Python 3.9.13 [CPython MSC v.1929 64 bit (AMD64)]
Specified target combination is not valid: windows tools_opensslv3_x64 qt.tools.opensslv3.win_x64
Downloading qt.tools.opensslv3.win_x64...
Redirected: qt-mirror.dannhauer.de
Finished installation of openssl_3.0.11_prebuild_x64.7z in 33.35880100
Finished installation
Time elapsed: 65.94355570 second

Using the latest aqtinstall version this warning does not appear:

python3 -m aqt install-tool windows desktop tools_opensslv3_x64
INFO    : aqtinstall(aqt) v3.1.7 on Python 3.9.13 [CPython MSC v.1929 64 bit (AMD64)]
INFO    : Downloading qt.tools.opensslv3.win_x64...
INFO    : Redirected: qt-mirror.dannhauer.de
INFO    : Finished installation of openssl_3.0.11_prebuild_x64.7z in 2.95331870
INFO    : Finished installation
INFO    : Time elapsed: 5.02023570 second
pzhlkj6612 commented 9 months ago

Hello,

aqtinstall(aqt) v2.1.0 on Python 3.9.13 [CPython MSC v.1929 64 bit (AMD64)]

It's an old version of aqtinstall. What's your workflow file?

firewave commented 9 months ago

It's an old version of aqtinstall. What's your workflow file?

It is using v3 still defaults the aqtinstall version to ==2.1.*.

pzhlkj6612 commented 9 months ago

It is using v3 still defaults the aqtinstall version to ==2.1.*.

OK, the default version of aqtinstall has been changed to ==3.1.* since 945f71c4485be4cbbbd5f3ca17e0126de5939ae0 , but this change has not been applied to v3.

@firewave , did you download valid OpenSSL v3 files by aqtinstall v2.1.0? If so, please ignore that warning; otherwise always specify aqtversion: '==3.1.*' until the v4 version of this action releases.


Hi @jurplel , sorry for bothering you. May I ask what the release plan is for v4?

firewave commented 9 months ago

@firewave , did you download valid OpenSSL v3 files by aqtinstall v2.1.0? If so, please ignore that warning; otherwise always specify aqtversion: '==3.1.*' until the v4 version of this action releases.

Somehow it did download a working version. That's good to not disrupt things but I really dislike some arbitrary package being used as it might lead to unexpected results. But this is an upstream issue and not the scope here.

pzhlkj6612 commented 9 months ago

... but I really dislike some arbitrary package being used as it might lead to unexpected results. But this is an upstream issue and not the scope here.

Well, I know your concern. It's indeed an upstream issue and here I'm trying to do explanation about that warning "Specified target combination is not valid".

Here is the code of aqtinstall v2.1.0:

            if not self._check_tools_arg_combination(os_name, tool_name, arch):
                self.logger.warning("Specified target combination is not valid: {} {} {}".format(os_name, tool_name, arch))
    def _check_tools_arg_combination(self, os_name, tool_name, arch):
        for c in Settings.tools_combinations:
            if c["os_name"] == os_name and c["tool_name"] == tool_name and c["arch"] == arch:
                return True
        return False
    def tools_combinations(self):
        return self._combinations["tools"]
        with open(
            os.path.join(os.path.dirname(__file__), "combinations.json"),
            "r",
        ) as j:
            self._combinations = json.load(j)[0]

The "combinations.json" file is an offline record of the resources on Qt's website [1]. When listing tools, aqtinstall indexes online resources of Qt; when installing tools, it performs some checks (including "combinations.json") and downloads the specified resources. That record will be updated frequently 2. However, if I recall correctly, the prebuilt OpenSSL v3 binaries first appeared in 2023 [3]. No one could predict the future, thus those versions of aqtinstall released prior of 2023 have no awareness of OpenSSL v3. This is the source of that warning.

[1]: https://download.qt.io/

[3]: Moving to OpenSSL 3 in binary builds starting from Qt 6.5 Beta 2

firewave commented 9 months ago

@pzhlkj6612 Thanks for the thorough explanation.

jurplel commented 8 months ago

It is using v3 still defaults the aqtinstall version to ==2.1.*.

OK, the default version of aqtinstall has been changed to ==3.1.* since 945f71c , but this change has not been applied to v3.

@firewave , did you download valid OpenSSL v3 files by aqtinstall v2.1.0? If so, please ignore that warning; otherwise always specify aqtversion: '==3.1.*' until the v4 version of this action releases.

Hi @jurplel , sorry for bothering you. May I ask what the release plan is for v4?

Hi there, no worries at all. Sorry for getting back to you late. I am not really actively planning for v4, but I just threw a v4 branch together you can try using for now. Hopefully it actually works.

jurplel commented 1 month ago

v4 is released—feel free to reopen this if it is still broken