qmake can't generator .stash file
-
After installing the 64-bit MinGW suite, I encountered the following output when using QMAKE: "Project ERROR: failed to parse default search paths from compiler output." I checked the
.qmake.stashfile and it appears incomplete:
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS =
QT_COMPILER_STDCXX
QMAKE_GCC_MAJOR_VERSION
QMAKE_GCC_MINOR_VERSION
QMAKE_GCC_PATCH_VERSION
It looks like the corresponding CXX path was not found. Here is the complete.qmake.stashfile:
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS =
QT_COMPILER_STDCXX
QMAKE_GCC_MAJOR_VERSION
QMAKE_GCC_MINOR_VERSION
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS =
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \ C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/include
QMAKE_CXX.LIBDIRS =
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/lib
C:/Qt/Qt5.14.2/Tools/mingw73I am aware that the toolkits in the two files mentioned above are inconsistent; I am simply using them as an example. What are the steps involved when QMake generates the
.qmake.stashfile? Which environment variables should be set? The MSVC toolchain on my machine works correctly; could it be that the GCC compiler isn't being detected because the MSVC compiler is being found first? -
After installing the 64-bit MinGW suite, I encountered the following output when using QMAKE: "Project ERROR: failed to parse default search paths from compiler output." I checked the
.qmake.stashfile and it appears incomplete:
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS =
QT_COMPILER_STDCXX
QMAKE_GCC_MAJOR_VERSION
QMAKE_GCC_MINOR_VERSION
QMAKE_GCC_PATCH_VERSION
It looks like the corresponding CXX path was not found. Here is the complete.qmake.stashfile:
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS =
QT_COMPILER_STDCXX
QMAKE_GCC_MAJOR_VERSION
QMAKE_GCC_MINOR_VERSION
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS =
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \ C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/include
QMAKE_CXX.LIBDIRS =
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0
C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc
C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/lib
C:/Qt/Qt5.14.2/Tools/mingw73I am aware that the toolkits in the two files mentioned above are inconsistent; I am simply using them as an example. What are the steps involved when QMake generates the
.qmake.stashfile? Which environment variables should be set? The MSVC toolchain on my machine works correctly; could it be that the GCC compiler isn't being detected because the MSVC compiler is being found first?@hello_tyggylpp How do you call qmake (manually or in QtCreator)?
Any reason to still use Qt5 (not even the latest Qt5 version)? -
@hello_tyggylpp How do you call qmake (manually or in QtCreator)?
Any reason to still use Qt5 (not even the latest Qt5 version)?@jsulm qtcreator,and qt5.14.2 mingw shell all not work.qt5.12.2 qt5.14 same.
-
@jsulm qtcreator,and qt5.14.2 mingw shell all not work.qt5.12.2 qt5.14 same.
@hello_tyggylpp Do you call qmake from the preconfigured terminal provided by the Qt installation?
-
@hello_tyggylpp Do you call qmake from the preconfigured terminal provided by the Qt installation?
@jsulm yes.
Setting up environment for Qt usage...C:\Qt\Qt5.14.2\5.14.2\mingw73_32>qmake --version
QMake version 3.1
Using Qt version 5.14.2 in C:/Qt/Qt5.14.2/5.14.2/mingw73_32/libC:\Qt\Qt5.14.2\5.14.2\mingw73_32>cd D:\tmp\untitled22
C:\Qt\Qt5.14.2\5.14.2\mingw73_32>cd /d D:\tmp\untitled22
D:\tmp\untitled22>mkdir build
D:\tmp\untitled22>cd build
D:\tmp\untitled22\build>qmake.exe ../untitled22.pro -spec win32-g++
Info: creating stash file D:\tmp\untitled22\build.qmake.stash
Project ERROR: failed to parse default search paths from compiler output -
Is the correct gcc in the PATH? What does 'gcc --version' prints out?
-
Is the correct gcc in the PATH? What does 'gcc --version' prints out?
@Christian-Ehrlicher Setting up environment for Qt usage...
C:\Qt\Qt5.14.2\5.14.2\mingw73_64>gcc --version
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.C:\Qt\Qt5.14.2\5.14.2\mingw73_64>
-
Ok, I hoped that there is another gcc in the PATH or something like this.
In the current sources your error messsage is no longer available so it's hard to find out what's going wrong here and I didn't use qmake since maybe 15 years... Search for 'failed to parse default search paths from compiler output' in the mkspecs subdirectory of your Qt installation to see why it is triggered. -
@Christian-Ehrlicher Setting up environment for Qt usage...
C:\Qt\Qt5.14.2\5.14.2\mingw73_64>gcc --version
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.C:\Qt\Qt5.14.2\5.14.2\mingw73_64>
@hello_tyggylpp
I know nothing about this. But:- You say your file is "incomplete" and stops at
QMAKE_GCC_PATCH_VERSION. - You say the "complete" file should have
QMAKE_CXX.INCDIRS = ...next. - You can see that the value for that as shown in your paste is "clearly" (at least to me) wrong
QMAKE_CXX.INCDIRS = C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \ C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include C:/Qt/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed C:/Qt/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/includeI have copied & pasted what you have written/pasted. You should always paste code/output into this forum inside the forum's code tags (the
</>toolbar button or inside```or`blocks). I suggest you repaste "the complete.qmake.stashfile:" using the correct tags/verbatim if you want you/us to see whether it is indeed incorrect as it currently appears to be. - You say your file is "incomplete" and stops at