[Interest] QT 6.2/6.3 on AlmaLinux
chris at beneschtech.com
Mon Jun 6 02:48:05 CEST 2022
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
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 at beneschtech-cloud01 testqt]$ cat test.pro
TEMPLATE = app
TARGET = test
QT -= gui
SOURCES = main.cpp
[cbenesch at beneschtech-cloud01 testqt]$ cat main.cpp
std::cout << "Hello World" << std::endl;
However, when running qmake:
[cbenesch at beneschtech-cloud01 testqt]$
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
calling built-in $$system("LC_ALL=C g++ -pipe -E -v -xc++ - 2>&1 </dev/null
>/dev/null", lines, ec)
$$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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest