Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cannot run deployment script



  • As per the instructions on https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code I downloaded the data for qt5. I checked out 5.12 as that's what the example used. I then tried to configure qt5 according to the instructions there. However, executing

    ..\qt5\configure -developer-build -opensource -nomake examples -nomake tests

    in the git bash gave me the following error: The build script does not currently recognize all platforms supported by Qt. Rerun this script with a -platform option listed to set the system/compiler option you use.

    I assume that this means that I lack the dependencies qt5 requires. I installed Perl from ActiveState, and got MinGW through Cygwin (at least I think I should have). Python is already installed on my computer through my miniconda distribution.

    Any tips on how to proceed with the installation?

    Kind regards
    Jan



  • I have just noticed that my python path is not in the path variables, contrary to what is stated in https://doc.qt.io/qt-5/windows-requirements.html

    I installed Python through miniconda, as I said previously. That being said, which folder specifically do I need to add to my path variables (if that even is the reason for my problem)?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Unless I am mistaken, the git command prompt uses bash. Since you are on Windows, you should rather use the standard command prompt. Or depending on your compiler, a prompt that is configured to use it.



  • @SGaist I entered the command in the Windows cmd. I got what appears to be the same error: "Cannot detect host toolchain. Please use -platform. Aborting."


  • Lifetime Qt Champion

    What compiler did you install ?



  • @SGaist I am not sure what you are referring to. I followed the instructions on how to get the source code. I run python through Anaconda, I installed ActivePerl, and I installed Cygwin which should have come with a version of MinGW. I am sorry for not being very helpful but I'm rather new to these technicalities


  • Moderators

    @JanGrn said in Cannot run deployment script:

    @SGaist I am not sure what you are referring to. I followed the instructions on how to get the source code. I run python through Anaconda, I installed ActivePerl, and I installed Cygwin which should have come with a version of MinGW.

    @SGaist is referring to a C++ compiler which converts C++ code into programs and/or libraries.

    On Windows, the 2 supported compilers are Microsoft Visual C++ (MSVC) and MinGW.

    ..\qt5\configure -developer-build -opensource -nomake examples -nomake tests

    in the git bash...

    configure is for Unix-based OSes. On Windows, use configure.bat (on the Windows command prompt, as @SGaist said).

    "Cannot detect host toolchain. Please use -platform. Aborting."

    This means the configure script can't detect your compiler. Make sure it is in your PATH.



  • @JKSH Thank you for your answer. Where would I find my compiler in my case, ie when I got my minGW through Cygwin?


  • Moderators

    You're welcome.

    @JanGrn said in Cannot run deployment script:

    Where would I find my compiler in my case, ie when I got my minGW through Cygwin?

    Look for the g++ executable in your Cygwin installation folder. I can't tell you the exact folder structure as I don't use Cygwin.



  • @JKSH What is the name for the g++ executable? I have a cmake file in cygwin64/bin however I have no clue where to get a g++ file.


  • Moderators

    @JanGrn said in Cannot run deployment script:

    What is the name for the g++ executable?

    g++.exe is the C++ compiler. This is what you need to compile Qt.

    gcc.exe is the C compiler. You can't use this for Qt, but this should come bundled with all copies of MinGW. There's a small chance that your copy of MinGW might not contain the C++ compiler.



  • @JKSH I have downloaded a GNU compiler collection for C++ under the name of gcc-g++ (version 9.3.0-2) and tried to deploy QT. The script got further than the previous tries, however, now I get an error which roughly translates to: "The command "mingw32-make" is either written incorrectly or could not be found". What do I do from here?

    I have a g++.exe and a gcc.exe in my cygwin folder, and the bin folder is in my path variables.



  • @JKSH This is what it looks like if I try deploying again:

    deploy_fehler.png


  • Moderators

    @JanGrn said in Cannot run deployment script:

    "The command "mingw32-make" is either written incorrectly or could not be found".

    Make sure your MinGW installation contains mingw32-make.exe



  • @JKSH At this point, I am starting to get more and more confused with each step. Previously, I failed to actually download MinGW and instead just installed a GNU collection of compilers. I now checked the 64-bit packages of Mingw in Cygwin, which are mingw64-x86_64-gcc-core, as well as mingw64-x86_64-gcc-g++. According to https://www3.ntu.edu.sg/home/ehchua/programming/howto/Cygwin_HowTo.html I should have done everything correctly. There it is stated:

    MinGW-w64 is a fork of MinGW to support 64-bit Windows (as well as the 32-bit windows). The mother site is http://mingw-w64.org/doku.php.
    You can install MinGW-W64 under "Cygwin" by selecting these packages (under "Devel" category):
    mingw64-x86_64-gcc-core: 64-bit C compiler for native 64-bit Windows. The executable is "x86_64-w64-mingw32-gcc".
    mingw64-x86_64-gcc-g++: 64-bit C++ compiler for native 64-bit Windows. The executable is "x86_64-w64-mingw32-g++"."

    However, while cygwin/bin now contains files such as x86_64-w64-mingw32-g++ and x86_64-w64-mingw32-gcc, there is no "mingw32-make" file there. I am also struggling to find where to get this file. What am I doing wrong?

    Edit 1: I am now also back to square one, as I've started to once again get the same error as in my first post of this thread.

    Edit 2: I went back and re-installed the packages gcc-core as well as gcc-g++, and now I'm back to where the cmd is telling me that mingw32-make couldn't be found. This makes me wonder, shouldn't my installation of mingw have been totally sufficient and made the gcc-packages superfluous?



  • This post is deleted!

  • Moderators

    Stepping back a bit... May I ask why you want to build Qt from scratch? Why not install a pre-built version of Qt? (See https://www.qt.io/download-open-source )

    @JanGrn said in Cannot run deployment script:

    However, while cygwin/bin now contains files such as x86_64-w64-mingw32-g++ and x86_64-w64-mingw32-gcc, there is no "mingw32-make" file there. I am also struggling to find where to get this file. What am I doing wrong?

    It just looks like that the Cygwin's copy of MinGW is packaged differently from the other providers' copies of MinGW.

    I've been using the version(s) of MinGW that is provided by the Qt installers; this is guaranteed to work nicely with Qt's build script.

    Edit 1: I am now also back to square one, as I've started to once again get the same error as in my first post of this thread.

    The message "The build script does not currently recognize all platforms supported by Qt" means that the build script can't find your compiler. It can't find your compiler because it's looking for g++.exe but that doesn't exist in Cygwin's MinGW package (because Cygwin's MinGW provides x86_64-w64-mingw32-g++.exe instead of g++.exe).

    Edit 2: I went back and re-installed the packages gcc-core as well as gcc-g++, and now I'm back to where the cmd is telling me that mingw32-make couldn't be found. This makes me wonder, shouldn't my installation of mingw have been totally sufficient and made the gcc-packages superfluous?

    This means the build script was able to find g++.exe so it got past the first hurdle, but it's now stuck because it can't find mingw32-make.exe.

    If I'm not mistaken, Cygwin provides its own version of GCC/G++ that is different from MinGW's version of GCC/G++. That's probably why Cygwin renamed MinGW's g++ to x86_64-w64-mingw32-g++.exe.

    This answer might provide some insights: https://stackoverflow.com/a/792142/1144539


Log in to reply