Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 in core/io and core/kernel include qplatformdefs.h so I added an explicit definition there, but

    1. 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
    2. 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


  • Lifetime Qt Champion

    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 ?



  • @SGaist It's QNX 7.1, and I sure hope I have it installed as I'm typing this reply on my QNX system ;-)


  • Lifetime Qt Champion

    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 standard git checkout 5.14 command doesn't affect all directories, and in particular qtbase. For now I ran that command in both the top-level directory and qtbase, 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"
    
    

Log in to reply