qtcmakeqmakeqt6

Building Qt6 project - QMAKE_CXX.COMPILER_MACROS not defined


I'm building a Qt6 project using the following command

~/Qt/6.3.1/gcc_64/bin/qmake -o ~/nidb/bin/smtp/Makefile ~/nidb/src/smtp/SMTPEmail.pro -spec linux-g++

And it generates this error...

~/Qt/6.3.1/gcc_64/mkspecs/features/toolchain.prf:76: Variable QMAKE_CXX.COMPILER_MACROS is not defined.

This used to work fine on my Rocky Linux 8 machine, but now it's not working. I ran a yum update at some point in the last few weeks, but that's the only thing I can think of that changed. What are some other reasons it might have stopped working?


Solution

  • I'm just answering my own question in case anyone else encounters this bug themselves.

    My issue was that the RHEL/CentOS/Rocky 8.6 kernel had a bug which didn't work correctly with QProcess. After doing a yum update, it updated the kernel and then I encountered the error. The error was that QProcess did not return any output, so any programs requiring console output to decide on the next step, would fail.

    At the time downgrading the kernel fixed it for me. But the kernel bug was fixed in 8.7 releases and newer.