Hi all, After struggling for almost 2 weeks I finally got QT 6.2.4 to work on AlmaLinux 8. My solution isnt a complete one, but it will at least get you started if you want to learn more. The problem lies in qmake, or more appropriately the QProcess object in qmake.
Setup: AlmaLinux 8.6, fully yum updated, gcc-toolset-11 I wrote this simple program to test out my new install/build of QT: [cbenesch@beneschtech-cloud01 testqt]$ cat test.pro TEMPLATE = app TARGET = test QT -= gui SOURCES = main.cpp [cbenesch@beneschtech-cloud01 testqt]$ cat main.cpp #include <iostream> int main(int,char**) { std::cout << "Hello World" << std::endl; return 0; } However, when running qmake: [cbenesch@beneschtech-cloud01 testqt]$ /opt/software/qt/6.3.0/6.3.0/gcc_64/bin/qmake test.pro /opt/software/qt/6.3.0/6.3.0/gcc_64/mkspecs/features/toolchain.prf:76: Variable QMAKE_CXX.COMPILER_MACROS is not defined. Project ERROR: failed to parse default search paths from compiler output Notice that is the one from QT itself by the pathing. On more detailed examination the problem seems to lie here, a snippet from qmake -d: DEBUG 1: /opt/software/qt/6.3.0/6.3.0/gcc_64/mkspecs/features/toolchain.prf:210: calling built-in $$system("LC_ALL=C g++ -pipe -E -v -xc++ - 2>&1 </dev/null >/dev/null", lines, ec) DEBUG 1: /opt/software/qt/6.3.0/6.3.0/gcc_64/mkspecs/features/toolchain.prf:210: output := $$system, which basically runs a command and captures the output by default uses a QProcess object, and returns the output of readStandardOutput. Looking in the source, it all seems to be okay, nothing obvious, but it just doesnt work. I've tried: Building it myself from source, both 6.2.4 and 6.3 Installing the pre-canned one from QT. The only way I could figure out how to get around it was to ifdef out the QProcess code in qmakeinternals.cpp. I wont share it exactly here, since I dont believe its the root of the problem, but look for runProcess and where its called to figure out how to do it yourself. After doing that, qmake worked and the test program worked, I was able to set up that version in qtcreator and even make a default widgets app and it worked. I've also seen mention that it works on RockyLinux (another RH clone), and built and ran like a charm on Ubuntu 20. I'll dig some more to see if I can find a root cause, but if you feel like you are going crazy, there is a valid reason. I havent tried any QML stuff yet, but I assume this QProcess business is likely an isolated incident, and seems to be platform specific. -- Chris Benesch BeneschTech, LLC
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest