Configuration-generated definitions are not seen when building Qt
-
Hello,
I'm trying to build 5.15 on QNX (successfully built 5.6.2 and 5.12 in the past), and I'm running into an issue with the bootstrap library. The configure script has determined various values for UNIX compatibility, such as
QT_POSIX_IPC
, but these are not taken into account when the code is built. I do see that some files incore/io
andcore/kernel
includeqplatformdefs.h
so I added an explicit definition there, but- It's not clear why such a change is needed, given that the configuration script has already determined that the symbol should be set, and
- Not all files include
qplatformdefs.h
, resulting in errors when building unsupported code.
Before I open a bug report I was wondering if there is anything I'm missing.
Thanks,
--Elad -
Hi and welcome to devnet,
I never nuit Qt for it so it's a shot in the dark, do you have QNX SDP 7.0 as described in the Qt for QNX documentation page ?
-
Then I would try with a previous version of Qt to see when the build broke. I'd go with the latest 5.14 to start.
-
@SGaist 5.14 has the same issue, and I'm running into other problems on 5.13.
Before I spend too much time on it, though, there's something that I may be missing. How do you switch git branches in the Qt source tree? It looks like the standardgit checkout 5.14
command doesn't affect all directories, and in particularqtbase
. For now I ran that command in both the top-level directory andqtbase
, but I'm not at all convinced that I'm doing the right thing. -
I managed to build 5.15 with the following change, but I'm not at all convinced it's the right way to go:
diff --git a/mkspecs/common/qnx/qplatformdefs.h b/mkspecs/common/qnx/qplatformdefs.h index b30cd96002..67de126926 100644 --- a/mkspecs/common/qnx/qplatformdefs.h +++ b/mkspecs/common/qnx/qplatformdefs.h @@ -101,4 +101,8 @@ inline int getpagesize() #define QT_QWS_TEMP_DIR QString::fromLatin1(qgetenv("TMP")) +#ifndef QT_POSIX_IPC +#define QT_POSIX_IPC true +#endif + #endif // Q_QNX_PLATFORMDEFS_H diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 196081eaa2..231e5cb0ea 100644 --- a/src/corelib/kernel/qsystemsemaphore_systemv.cpp +++ b/src/corelib/kernel/qsystemsemaphore_systemv.cpp @@ -37,6 +37,8 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" + #include "qsystemsemaphore.h" #include "qsystemsemaphore_p.h" diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp index f12a808891..a2ad4b4e56 100644 --- a/src/corelib/kernel/qsystemsemaphore_unix.cpp +++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp @@ -37,6 +37,8 @@ ** ****************************************************************************/ +#include "qplatformdefs.h" + #include "qsystemsemaphore.h" #include "qsystemsemaphore_p.h"
-
The problem seems to stem from
qglobals.h
includingqconfig-boostrapped.h
when buildingqtbase/src/tools/boostrap
, instead of the generatedqtcore-config.h
. This file does not defineQT_POSIX_IPC
, and thus tries to buildqsystemsemaphore_systemv.cpp
.
I'll post a bug report.