Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Compiling QT 5.3 for Qnx: (8 Items)
   
Compiling QT 5.3 for Qnx  
Hi guys,

I tried to compile Qt 5.3 as it was just released...
But I stumbled into a compilation error : 

../shared/qmakeglobals.cpp: In member function 'bool QMakeGlobals::initProperties()':
../shared/qmakeglobals.cpp:324:85: error: '_popen' was not declared in this scope
                                       + QLatin1String(" -query")).toLocal8Bit(), "r")) {
                                                                                     ^
../shared/qmakeglobals.cpp:328:23: error: '_pclose' was not declared in this scope
         QT_PCLOSE(proc);
                       ^

It seems that there is a problem regarding the popen or pclose function...

I tried to dig a little bit ... but I have a question...cross compiling Qt for Qnx on a Windows machine... which stdio.h
 is used ? The one from qnx660 or from MingW ?

Here is the process I follow to compile Qt :  In a command window:

# c:\qnx660\qnx660-env.bat
# cd C:\QtQNX\qt-everywhere-opensource-src-5.3.0\

# configure  -release -nomake examples -nomake tests  -prefix C:\QtQNX\qt5-5.3 -platform win32-g++ -xplatform qnx-armle-
v7-qcc -opengl es2 -no-cups -no-iconv -skip qtserialport -skip qtwebkit -skip qtmultimedia -mp 

(-skip multimedia because I didn't install the Qnx App and Media as I don't need it right now)

This configure line is the one from Qt5.2 ... in the Qnx wiki from Qt-project, the configure command is way shorter..is 
it normal ?

then # make -j4

First I got a problem with 
In file included from ../shared/translator.cpp:54:0:
c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
              ^
c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
              ^
make[5]: *** [.obj/release/translator.o] Error 1

=> I just changed the c:\mingw\include\io.h : changed the occurences of 'off64_t'  to '_off64_t' , that solved the 
problem..

then again
# make -j4 

=> the popen/pclose problem...(if I look at the qmakeglobals.cpp: 
 #ifdef Q_OS_WIN32
#define QT_POPEN _popen
#define QT_PCLOSE _pclose
#else
#define QT_POPEN popen
#define QT_PCLOSE pclose
#endif

=> Are we on Q_OS_WIN32 ???

Do you have any kind of way around this problem...or perhaps should I wait a few days (weeks ?) and get a perfectly 
compiled QtQnx version from your "File Releases"

Regards,

Paul

 



Re: Compiling QT 5.3 for Qnx  
Something is definitely wrong in your setup. stdio.h should definitely come from QNX SDP. This should be taken care by 
Qt's mkspecs for QNX. We will take a look what is the difference to our builds.

> This configure line is the one from Qt5.2 ... in the Qnx wiki from Qt-project, the configure command is way shorter..
is it normal ?

Yes. The wiki on Qt Project provides a minimal required options. All others are optional, some of them should be covered
 by configure tests, some (the "skip" ones) just make the build shorter and smaller. I believe it is possible to write 
an essay on this. This is not a subject of the above wiki :-) We can publish a few more comments by time...

Did you try this "short" version? Does it work? Do you get the same error?
Re: Compiling QT 5.3 for Qnx  
Hi Vladimir,

Thanks for your quick answer.

> I believe it is possible to write an essay on this. This is not a subject of the above wiki :-) 

Totally agreed ! I just thought that webkit was still a problem so I tend to let this out of the compilation. 
Furthermore, it should be lighter.

Here is the configuration test output :

Environment:
    INCLUDE=
      Unset
    LIB=
      Unset
    PATH=
      C:\qnx660\host\win32\x86\usr\bin
      C:\qnx660\.qnx\bin
      C:\qnx660\jre\bin
      C:\Windows\system32
      C:\Windows
      C:\Windows\System32\Wbem
      C:\Windows\System32\WindowsPowerShell\v1.0\
      C:\Program Files\Intel\DMIX
      C:\QNX650\host\win32\x86\usr\bin
      C:\Program Files (x86)\QNX Software Systems\bin
      C:\Program Files\Microsoft\Web Platform Installer\
      C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
      C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\
      C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
      C:\Qt\Qt5.1.0\5.1.0\msvc2012_64_opengl\bin
      C:\Python27
      C:\Program Files\TortoiseSVN\bin
      C:\Program Files\TortoiseHg\
      C:\Program Files (x86)\WinAnt\bin
      C:\MinGW\bin
      C:\Program Files (x86)\Nmap
Configuration:
    pcre
    release
    compile_examples
    msvc_mp
    cross_compile
Qt Configuration:
    minimal-config
    small-config
    medium-config
    large-config
    full-config
    release
    c++11
    shared
    zlib
    icu
    png
    freetype
    accessibility
    opengl
    opengles2
    egl
    audio-backend
    native-gestures
    qpa
    stack-protector-strong
    concurrent

QMAKESPEC...................qnx-armle-v7-qcc (commandline)
Architecture................arm, features:
Host Architecture...........i386, features:
Maketool....................mingw32-make
Debug.......................no
Force debug info............no
C++11 support...............yes
Link Time Code Generation...no
Accessibility support.......yes
RTTI support................yes
SSE2 support................no
SSE3 support................no
SSSE3 support...............no
SSE4.1 support..............no
SSE4.2 support..............no
AVX support.................no
AVX2 support................no
NEON support................no
IWMMXT support..............no
OpenGL support..............yes
Large File support..........yes
NIS support.................no
Iconv support...............no
Evdev support...............no
Mtdev support...............no
Inotify support.............no
eventfd(7) support..........no
Glib support................no
CUPS support................no
OpenVG support..............no
OpenSSL support.............no
Qt D-Bus support............no
Qt Widgets module support...yes
Qt GUI module support.......yes
QML debugging...............yes
DirectWrite support.........no
Use system proxies..........no

QPA Backends:
    GDI.....................yes
    Direct2D................no

Third Party Libraries:
    ZLIB support............qt
    GIF support.............plugin
    JPEG support............plugin
    PNG support.............yes
    FreeType support........yes
    Fontconfig support......no
    HarfBuzz-NG support.....no
    PCRE support............qt
    ICU support.............yes
    SLOG2 support...........yes
    IMF support.............no
    PPS support.............yes
    LGMON support...........no
    ANGLE...................no
    Dynamic OpenGL..........no

Styles:
    Windows.................yes
    Windows XP..............no
    Windows Vista...........no
    Fusion..................yes
    Windows CE..............no
    Windows Mobile..........no

Sql Drivers:
    ODBC....................no
    MySQL...................no
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
   ...
View Full Message
Attachment: Text set.txt 2.78 KB
Re: Compiling QT 5.3 for Qnx  
Hi,

Some suggestions you might want to try

- Use the same MinGW version as upstream as it is tested that it works: http://download.qt-project.org/
development_releases/prebuilt/mingw_32/i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z

- do not pass "-platform win32-g++"

- do not pass "-mp" (I think this is only valid for msvc anyway)

so something like:

# configure  -release -nomake examples -nomake tests -prefix C:\QtQNX\qt5-5.3 -xplatform qnx-armle-v7-qcc -opengl es2 -
no-cups -no-iconv -skip qtserialport -skip qtwebkit -skip qtmultimedia
# mingw32-make -j4
Re: Compiling QT 5.3 for Qnx  
Hi Sergio,

Thaknks for your MinGw tip... it solved my problem, I was able to compile Qt 5.3 for QNX... I'm now testing it... but 
just a question : did you try to compile the documentation ? 
I want QTCreator to display the doc... so I did :

cd qt5/qtbase/src
make sub-qdoc      #to build the qdoc binary
cd qt5/qttools      
make                    #to build the qhelpgenerator
cd qt5/
make docs

But I got a compilation error as qhelpgenerator doesn't seem to exist... the only one I found is in qttools/src/
assistant/qhelpgenerator ...but if I try to to do qmake qhepgenerator.pro then make, it compiles for a QNX App... not an
 exe...

Any idea ?
Re: Compiling QT 5.3 for Qnx  
Hi,

I have never tried that before as I always use -nomake tools when I do cross-compilation.

What I think that people usually do is to download the online installer from http://qt-project.org/downloads and use the
 Qt Creator shipped there which already contains all the documentation (or maybe you can just import the .qch files into
 your Qt Creator). Not the best solution but it might work.

But if qhelpgenerator is built as a QNX app, then that sounds like a real bug and you might want to report it to http://
bugreports.qt-project.org/

Cheers,
Re: Compiling QT 5.3 for Qnx  
Hi,

I was able to reproduce this on Linux, so I filed a bug report upstream https://bugreports.qt-project.org/browse/QTBUG-
39479

Cheers,
Re: Compiling QT 5.3 for Qnx  
Hi,

Thanks Sergio, sure we can use the doc generated by another install of Qt 5.3... but I wanted to avoid installing 
another version just for the doc.