Cannot build any example on Windows 64-bit using MinGW-w64

Forum for posting problems using QxOrm library

Cannot build any example on Windows 64-bit using MinGW-w64

Postby Haroogan » Thu Dec 06, 2012 11:27 pm

Hello,

I've successfully built Qt 4.8, Boost 1.52, QxOrm 1.2.4 using MinGW-w64 targeting 64-bit Windows. Now the problem is that I cannot build any example provided by QxOrm. For instance, lets take "qxBlog":

Code: Select all
D:\Users\Haroogan\Projects\qxBlog>qmake

D:\Users\Haroogan\Projects\qxBlog>make release
make -f Makefile.Release
make[1]: Entering directory `/d/Users/Haroogan/Projects/qxBlog'
g++ -x c++-header -c -pipe -O3 -fomit-frame-pointer -funroll-loops -flto -march=native -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGEFILE_SUPPORT -DNDEBUG -D_BUILDING_QX_BLOG -DQT_DLL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
 -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'../../../../Applications/Qt/x64/include/QtCore' -I'../../../../Applications/Qt/x64/include/QtNetwork' -I'../../../../Applications/Qt/x64/include/QtGui' -I'../../../../Applications/Qt/x64/include/QtXml' -I'../../../../Applications/Qt/x64/include/QtSql' -I'../../../../Applications/Qt/x64/include' -I'include' -I'../../../../Applications/Boost/include' -I'../../../../Applications/QxOrm/include' -I'../../../../Applications/Qt/x64/include/ActiveQt' -I'qt/moc' -I'../../../../Applications/Qt/x64/mkspecs/default' -o release/precompiled.h.gch/c++ include/precompiled.h
In file included from ../../../../Applications/Qt/x64/include/QtCore/qglobal.h:62:0,
                 from ../../../../Applications/QxOrm/include/QxPrecompiled.h:50,
                 from ../../../../Applications/QxOrm/include/QxOrm.h:50,
                 from include/precompiled.h:4:
../../../../Applications/Qt/x64/include/QtCore/qconfig.h:41:0: warning: "QT_LARGEFILE_SUPPORT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from ../../../../Applications/Boost/include/boost/ptr_container/ptr_map_adapter.hpp:19:0,
                 from ../../../../Applications/Boost/include/boost/ptr_container/detail/serialize_ptr_map_adapter.hpp:9,
                 from ../../../../Applications/Boost/include/boost/ptr_container/serialize_ptr_map.hpp:9,
                 from ../../../../Applications/Boost/include/boost/ptr_container/serialize_ptr_container.hpp:12,
                 from ../../../../Applications/QxOrm/include/QxSerialize/QxSerialize.h:63,
                 from ../../../../Applications/QxOrm/include/QxFactory/../../inl/QxFactory/QxFactory.inl:32,
                 from ../../../../Applications/QxOrm/include/QxFactory/QxFactory.h:110,
                 from ../../../../Applications/QxOrm/include/QxOrm.h:82,
                 from include/precompiled.h:4:
../../../../Applications/Boost/include/boost/ptr_container/detail/map_iterator.hpp:52:48: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
g++ -c -include release/precompiled.h -pipe -O3 -fomit-frame-pointer -funroll-loops -flto -march=native -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGEFILE_SUPPORT -DNDEBUG -D_BUILDING_QX_BLOG -DQT_DLL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'../../../../Applications/Qt/x64/include/QtCore' -I'../../../../Applications/Qt/x64/include/QtNetwork' -I'../../../../Applications/Qt/x64/include/QtGui'
 -I'../../../../Applications/Qt/x64/include/QtXml' -I'../../../../Applications/Qt/x64/include/QtSql' -I'../../../../Applications/Qt/x64/include' -I'include' -I'../../../../Applications/Boost/include' -I'../../../../Applications/QxOrm/include' -I'../../../../Applications/Qt/x64/include/ActiveQt' -I'qt/moc' -I'../../../../Applications/Qt/x64/mkspecs/default' -o release/author.o src/author.cpp

make[1]: *** [release/author.o] Error 1
make[1]: Leaving directory `/d/Users/Haroogan/Projects/qxBlog'
make: *** [release] Error 2


Now, what actually happens is: a dialog window pops up with an error "cc1plus.exe has stopped working". "cc1plus" as you probably know is a part of GCC (MinGW in my case). What is very suspicious is that after such build there is a 153 MB file called "c++" in "<project root>/release/precompiled.h.gch/" directory! I'm completely sure that this failure is somehow related to that suspicious file, or is it intended behavior? Anyway, I need some help, especially from QxOrm developers to resolve this problem.

Thank you in advance. Regards.
Haroogan
 
Posts: 5
Joined: Thu Dec 06, 2012 11:08 pm

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby qxorm » Fri Dec 07, 2012 10:47 am

Hi,

Sorry but I never see this error !
Maybe you could have a look at the QT_LARGEFILE_SUPPORT on the web.
It seems that this Qt variable has been redefined on your environment (but why ?).
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby Haroogan » Fri Dec 07, 2012 12:21 pm

Hmm, what do you mean redefined? I have built Qt itself with "-largefile" option, i.e. with large file support enabled. That's why it includes it by default to any build.
Haroogan
 
Posts: 5
Joined: Thu Dec 06, 2012 11:08 pm

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby qxorm » Fri Dec 07, 2012 1:19 pm

I don't know, I just read your log and see :
warning: "QT_LARGEFILE_SUPPORT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition

This warning doesn't seem "normal"...
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby Haroogan » Fri Dec 07, 2012 3:57 pm

Well, anyway - I've managed to move forward. This error seems to be known issue with MinGW when using large precompiled headers, but unfortunately it hasn't been resolved yet. So, in order to avoid this problem, I simply decided to build "qxBlog" project without the precompiled header - and it successfully does - I get the "qxBlog.exe". Unfortunately, now there is another problem - when I run this executable another window pops up with the runtime error: "The application was unable to start correctly (0xc0000142).".

That drives me crazy... :(
Haroogan
 
Posts: 5
Joined: Thu Dec 06, 2012 11:08 pm

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby qxorm » Fri Dec 07, 2012 6:28 pm

This error seems to be known issue with MinGW when using large precompiled headers

I don't have any problem to build and run all samples projects using mingw !

I simply decided to build "qxBlog" project without the precompiled header

It's not a good option : precompiled header must be used with QxOrm to reduce compilation times.
Without precompiled header, I don't recommend to develop with QxOrm library.

when I run this executable another window pops up with the runtime error: "The application was unable to start correctly (0xc0000142).".
That drives me crazy... :(

There is something wrong with your dev environment, but it's very hard to help you, I'm sorry.
Maybe you could move to MSVC++ instead of mingw...
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby Haroogan » Fri Dec 07, 2012 7:24 pm

I know it's bad idea, but until MinGW fixes this bug - this is a workaround. Anyway, right know the problem is different.

I have no doubts that you can build with MinGW, however I suspect that you use usual MinGW distribution targeting 32-bit. On the other hand, I use MinGW-w64 targeting 64-bit. My environment is OK, since I can build anything, including sophisticated Qt projects, the problem boils down to QxOrm obviously. Did you test 64-bit builds of QxOrm under Windows, and which tool-chain did you use?
Haroogan
 
Posts: 5
Joined: Thu Dec 06, 2012 11:08 pm

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby qxorm » Fri Dec 07, 2012 7:58 pm

I suspect that you use usual MinGW distribution targeting 32-bit...
Did you test 64-bit builds of QxOrm under Windows, and which tool-chain did you use ?

I test only in 32 bits mode.
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby Haroogan » Fri Dec 07, 2012 8:36 pm

Ok, now that makes sense. Well,try it when you have time to, because as you can see not everything is that smooth in the land of 64-bit, and finding out quickly why is possible only for the developer.

Well, anyway, thank you, once again test it some time please. Too bad that such library cannot be used on in 64-bit Windows with MinGW-w64, taking into account the fact that MinGW-w64 is actively developed (unlike usual MinGW), gathering momentum and is already far more mature and robust than usual MinGW.
Haroogan
 
Posts: 5
Joined: Thu Dec 06, 2012 11:08 pm

Re: Cannot build any example on Windows 64-bit using MinGW-w

Postby qxorm » Mon Dec 10, 2012 10:54 am

Sorry but until MinGW-w64 supports precompiled header, I will not spend time trying to build QxOrm and samples with this compiler.
For me, precompiled header is a "must have" to develop with QxOrm library...
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 8 guests

cron