Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5.1
-
None
-
gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
Rocky Linux 8
Description
While trying to fix the apitrace port to Qt6, I am encountering an issue with signal connections.
QObject::connect is reporting that the signal cannot be found, for any connections made in the executable:
qt.core.qobject.connect: QObject::connect: signal not found in QTimer
I boiled down the issue to an interaction between a library which seems to have nothing in common with Qt - a small image library, which I removed almost all code from, and Qt.
However, it only occurs if the following is set:
set (CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
This enables link time optimization in the compiler if it is supported.
If I remove this, signals work properly.
Attached is a minimal example reproducing the issue.
I have tested it on Rocky Linux 8, with GCC 11.2.1.