Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Compiling Qt 5.4.0 for QNX: (9 Items)
   
Compiling Qt 5.4.0 for QNX  
I am trying to compile Qt 5.4 from source on my windows machine.  Has anyone been succesful setting up their environment
 and compiling the libraries?  I keep getting errors, and the instructions are very cryptic on Qt's website.
Re: Compiling Qt 5.4.0 for QNX  
I was able to compile using the following steps:

1) Edit <qt-source-root>/qtbase/configure.bat. Somewhere around line 37 comment out:
if not exist %QTSRC%\.gitignore goto sconf

2)c:\QNX660\qnx660-env.bat

3)configure.bat -xplatform qnx-armle-v7-qcc -opengl es2 -no-cups -no-iconv -skip qtserialport -skip qtwebkit -no-c++11

4)mingw32-make

There was an error about _fopen when I didn't use the "-no-c++11" flag. 

This configured and built for me.
Re: Compiling Qt 5.4.0 for QNX  
Thanks for the help.  Commenting out the line in the configure.bat has gottne me farther.

Now, I am running into errors while trying to compile.  I have cygwin installed on my computer which adds another layer 
ot the process.  If I try to run from the a CMD window, I get an error that says:
   /bin/sh: /c/cygwin/bin/g++: Bad File Number
   Makefile 119: recipe for target 'configure_pch.h/c++' failed

If I run from cygwin, I get an error saying: 
    cygppl_c-2.dll cannot open

Any ideas the best way to solve either of these issues?  I am not sure why the CMD prompt version is trying to run 
cygwin style commands.

Thanks.

Scott.
Re: Compiling Qt 5.4.0 for QNX  
I have gotten configure to succesfully complete now.  I had to move the path variable for cygwin to the end of the path 
rather than near the beggining.

Now I am trying to make the project.  When I execute mingw32-make, I get the following warnings and errors:

minggw32-make[2]: Entering directory 'C:/Qt-QNX/Qt5.4.0/5.4/Src/qtbase/src' cd tools/bootstrap/ && ( test -e Makefile ||
 C:/Qt/QNX/Qt5.4.0/5.4/Src/qtbase/bin/qmake.exe C:/Qt-QNX/Qt5.4.0/Src/qtbase/src/tools/bootstrap.pro -o Makefile ) && 
mingw32-make -f Makefile

Project WARNING: You should probably load(qt_build_config) first in bootstrap.pro for QBootStrap, as the latter also 
load()s qt_module.
Project MESSAGE: Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.
Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.
Project ERROR: Module does not define version.
Makefile 62: recipe for target 'sub-bootstrap-make_first' failed

Any input as to why qt_build_config did not execute or how to define a version would be greatly appreciated at this 
point.

Thanks.
RE: Compiling Qt 5.4.0 for QNX  
Hey Scott, just curious... what is the great thing in Qt 5.4 that is not in Qt 5.3, which is readily available built and
 usable out of the box?

> -----Original Message-----
> From: Scott Stone [mailto:community-noreply@qnx.com]
> Sent: Thursday, February 05, 2015 12:52 AM
> To: general-qt
> Subject: Re: Compiling Qt 5.4.0 for QNX
> 
> I have gotten configure to succesfully complete now.  I had to move the
> path variable for cygwin to the end of the path rather than near the
> beggining.
> 
> Now I am trying to make the project.  When I execute mingw32-make, I get
> the following warnings and errors:
> 
> minggw32-make[2]: Entering directory 'C:/Qt-
> QNX/Qt5.4.0/5.4/Src/qtbase/src' cd tools/bootstrap/ && ( test -e
> Makefile || C:/Qt/QNX/Qt5.4.0/5.4/Src/qtbase/bin/qmake.exe C:/Qt
-
> QNX/Qt5.4.0/Src/qtbase/src/tools/bootstrap.pro -o Makefile ) && mingw32-
> make -f Makefile
> 
> Project WARNING: You should probably load(qt_build_config) first in
> bootstrap.pro for QBootStrap, as the latter also load()s qt_module.
> Project MESSAGE: Not doing so may lead to qt_module.prf overriding
> compiler/linker options in your .pro file.
> Project MESSAGE: Ignore this warning with CONFIG+=no_qt_module_warning
> if you know what you are doing.
> Project ERROR: Module does not define version.
> Makefile 62: recipe for target 'sub-bootstrap-make_first' failed
> 
> Any input as to why qt_build_config did not execute or how to define a
> version would be greatly appreciated at this point.
> 
> Thanks.
> 
> 
> 
> _______________________________________________
> 
> Qt General
> http://community.qnx.com/sf/go/post113223
> To cancel your subscription to this discussion, please e-mail general-
> qt-unsubscribe@community.qnx.com
Re: RE: Compiling Qt 5.4.0 for QNX  
Main reason to use 5.4.0 is to standardize all our platforms to one version of Qt.  We have code for many OS's and want 
all to compile without changes.

I have gotten farther, I cleaned my src folder and re copied all the files from the src zip file.  I can get Qt to 
compile, but, am unsure if I did it properly.  When I run configure.bat it fails unless I specifically add in a platform
 command.  I used the command line argument -platform win32-g++.  Anything else, and the configuration would fail.  Is 
that the proper platform to use since I am building on a windows machine?

Thanks.
Re: RE: Compiling Qt 5.4.0 for QNX  
It is worth noting that as of Qt 5.4, some new content was introduced that are now licensed under LGPL3 and this may 
affect your deployment abilities depending on your situation. The LGPL3 Qt content that I am aware of is Qt Canvas3D and
 Qt Webview. Thought it was worth noting...

More info can be obtained here:
http://blog.qt.io/blog/2014/08/20/adding-lgpl-v3-to-qt/
http://doc.qt.io/qt-5/lgpl.html
http://doc.qt.io/qt-5/licensing.html
http://www.qt.io/download/
Re: Compiling Qt 5.4.0 for QNX  
I have the source all compiled for x86 and arm architectures now.  I can compile the code using the command line and 
deploy to targets.

I tried adding a kit in Qt Creator that I use from QNX with Qt5.3.0.  I cloned the 5.3.0 kit and changed the location of
 the qmake folder to the 5.4.0 location and added all the proper compilers for the new version.  When I try to build the
 application,  I get the following error:
make[1]:  *** [realease/moc_tunits.cpp] Error -1073741515

Has anyone added the Qt 5.4.0 build as a kit in Qt Creator succesfully?  I am not sure why I am getting this error or 
what it means.


Thanks.
Re: Compiling Qt 5.4.0 for QNX  
Hi Scott,

You may already have solved this since your last post, but the reason moc.exe is failing is that it needs some libs from
 the mingw distribution.  

I had the same problem, and copying libgcc_s_dw2-1.dll, libstdc++-6.dll and libwinpthread-1.dll from the mingw bin 
directory to the same directory as moc.exe fixed the problem.

Cheers
Sandy