Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Outdated: Using 5.2.1 with QTC 3.0.1 now] Compile Qt 5.2 Qt Creator 3.0 on Win 7 / MingW32: Some Probs:
I dont know how to get MingW32 to create the File in the Prefix Folder. When i start compiling from within the Prefix Folder, compiling stops after ~2 Minutes with Error 2.
When i start compiling from outside the Prefix Folder, there are no Files in the Prefix Folder after 6 Hours of compiling but compiling ends without Errors.
That sucks. I have lost 3 Days now because of that s*itty Qt build manuals only to get OpenSSL to work. And after 6 Hours of compiling: "Oh great i need to compile Qt Creator too as it dont come with the qt-everywhere-xxx Package". WTF?
Why do i must go through thousands of Folders and Files manually and copy them to the pre-installed Qt 5.2 Folder only to see that QtWebKit does not work anymore ("QtWebKit No such File or Directory" says Qt Creator").
No Matter what i set as a Prefix to Build Qt: It does not work how dozens of manuals says it should.
Another Problem: With the Qt Creator 3.0.0 RC Source Code, when ever i want to run
"configure -prefix c:\build -debug-and-release -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW" it says “QMAKESPEC is set to win32-g++ which is not supported”.
Does Qt Creator 3.0.0+ not Support Release Variants any more? And yes i tried to compile with and without GIT in the System Path. And no there is no other Compiler installed. Yes Explorer Windows are closed before i start building.
I can start the Compiling of Qt Creator 3.0RC but it just creates the Debug Files as it wont let me change it to "-debug-and-release".
Any Help would we be appreciated.
In short, this is what you need to to do compile Qt in a prefixed folder:
../qt-src/configure -prefix <CD> <other flags>
And for Creator:
qmake -r ../qtc-src/qtcreator.pro
Should work :)
@ sierdzio: isn't your post truncated ?
Oops, yes, sorry.
Thanks @sierdzio but that is what i have done a few times now.
Today i did these Steps:
1.) Uninstalled Qt 5.2.0 and Qt completely (including all the MingW Stuff)
2.) Installed a MingW Compiler that Finally works (Standard MingW Compiler will not work - dont stop complaining about qmake.
3.) Compiled the ICU Libs
4.) Opened a Windows CMD Window.
5.1) configure -prefix c:\qt-build -icu -I C:\icu\dist\include -L C:\icu\dist\lib -prefix c:\build -debug-and-release -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW -platform win32-g++ -nomake examples
6.) After around 1 Hour, Compiler complains that Uic.exe could not find a Icu Library so i copied everything from c:\icu\dist\lib to d:\qt-everywhere-opensource-src-5.2.0\qtbase\bin -> this works.
BUT: This time, after 2 Hours of compiling he stopped as he did not found Python anymore. I dont know. When i dont use the icu stuff, it compiles fine.
Another Problem is: When i start compiling from within the prefix Folder, Compiler always crash with Error 2. When i start compiling from within the qt-everywhere-blablabla folder: No Problems.
Is there really no easier way for using OpenSSL?
And Google told me that when i want Release Files for Qt Creator, i need to run
qmake -r CONFIG+=debug CONFIG+=release
Did not find that info on the qt-project site.
Thanks anyway. I try to set up Python agaín and hope it will compile this time error free -.-
I have reinstalled Python 2.7.6 x86 (as i want to compile a x86 Qt Version...) and started compiling from within c:\qt-build. This time i get the following Error:
Makefile.Debug:9883: recipe for target '.obj/debug/qabstractanimation.o' failed
mingw32-make: *** [.obj/debug/qabstractanimation.o] Error 1
mingw32-make: Leaving directory 'c:/qt-build/qtbase/src/corelib'
Makefile:38: recipe for target 'debug-all' failed
mingw32-make: *** [debug-all] Error 2
mingw32-make: Leaving directory 'c:/qt-build/qtbase/src/corelib'
Makefile:133: recipe for target 'sub-corelib-make_first' failed
mingw32-make: *** [sub-corelib-make_first] Error 2
mingw32-make: Leaving directory 'c:/qt-build/qtbase/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2
mingw32-make: Leaving directory 'c:/qt-build/qtbase'
Makefile:60: recipe for target 'module-qtbase-make_first' failed
mingw32-make: *** [module-qtbase-make_first] Error 2
sorry for the cutted text but somehow not everything get copied even it is selected in the cmd shell. and with select all i cant copy anything. strange never had this before. and i have win 7 fresh installed just 2 weeks ago.
I found out, when i run the configure.bat from within c:\qt-build even without "-prefix c:\qt-build", the directory c:\qt-build get automatically set. But still got the Error 2 Compilation Terminated.
1.) Reinstalled Git also and added "C:\Program Files (x86)\git" to the System Environment Path.
2.) Erased the Source Sode Folder and copied the clean files again into it. Including the Libs for ICU52 to qtbase\bin.
3.) From within c:\qt-build i run:
d:\qt-everywhere-opensource-src-5.2.0\configure -icu -I C:\icu\dist\include -L C:\icu\dist\lib -debug-and-release -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW -platform win32-g++
4.) Compiler runs...
Error: Icuin52.dll is missing from your Computer
Ok when i set it up without the prefix, i have to copy the icu libs also to c:\qt-builds\qtbase\bin.
5.) Without erasing and resetting stuff (well i did not change the parameter so nothing to clean up...)
no asking for icuin52.dll anymore - yet.
still running [12 December 01:00AM GMT+1]
01:42AM GMT+1 -> Again the Compiler can not find python -> added it to the User Environment Path also -> mingw32-make runs...
01:47AM GMT+1 Compiler Stops:
[Sorry cmd.exe dont let me copy and paste anything...]
Undefined References in Jarrinterpreter.o
Undefined References in YarrInterpreter.h
Makefile.Debug:504 recipe for Target 'c:\qt-build\qtbase\lib\Qt5QmlD.dll failed
mingw32-make: *** [module-qtdeclarative-make_first] failed
-I have googled but cant find info in combination with MingW.
Does any one know what the Problem is? Looks like i use wrong Version of <i have really no idea as all other stuff is up2date>-
Oh yes i forgot to mention: I am using 5.2 Final Test Package Build 209. When i try to compile this without ICU52 then everything is fine (beside the prefix problems but this is another problem already mentioned above).
Edit: I widened my google search: I found an entry in Qt 5.2 Mailing List from October: Kai says that the branch could be broken.
Edit: I currently download https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/ and will try to compile that one - after cleaning up all the folders. I hope that the finally final [which should come December 12 (today) - barring any unforeseen circumstances] will work.
Well i wanted to make a test Compilation anyway to see how this must be done and have good working 5.2 Final Build.
I will keep this Thread updated...
Last Edit: 02:36AM GMT+1 12.12.13
Thanks for helping me! Much appreciated!
The Newbie aka Oliver :)
Oh just shut up Qt: With the Source Code from the Stable Branch i get the following Error:
"Uic.exe - The Procedure Entry Point __gxx personality_v0 could not be located in the Dynamic Link Library libstdc++-6.dll"
Why this Error now? Is it because i added "-developer-build"?
Path to the Compiler Stuff is set correct.
Anyway: Solution: I need to Copy the File Libstdc++-6.dll into both qtbase\bin folders.
Mingw32-make started again. Lets see which Problem comes next...
Installing Qt+Qt is so much easier when you dont need OpenSSL.
I have also DL'ed the Source Code from the Current Qt Creator Stable 3.0.0:
"qmake could not find qmake configuration file win32-g++"
Never had that before. Even without a Qt Full Install it did run fine.
Seems i have to wait till Qt 5.2 is fully compiled!?
Right lets wait then...
Edit 02 04:52AM GMT+1
Compiler is still running and we are far beyond where it crashes the last times...
Edit 03 06:58AM GMT+1:
Next Problem: lrelease.exe in \qttools\bin is also looking for libstdc++-6.dll.
Ok i put that in there and simply run mingw32-make again: ~45 Seconds later build is done without further Problems. [Have not tested the Builded Files yet...]
Question: Is there a way to avoid this from the beginning? Can i add those Libs some how to the compilation Process like with the -L and -I Switches? Or can i do something else instead of putting them manually in to those Folders? Thanks again!
Hmm i thought i compile the Source Code and can just run the Program after it: Nope!
I still need to compile Qt Creator to be able to use Qt.
Will do this as soon as i found out why qmake does not find the configuration file... <- Nevermind starting qmake.exe again from the \qtbase\bin folder work. Now compiling Qt Creator...
Well this time a new Error (at least for me).
Qt Creator Complies Error til:
"... LD.exe cannot find -lqbscored1" < Whats this??
wow, impressive ;) I wish you luck. The more I read about MinGW and compiling Qt on Windows, the less I am inclined to do this :P It's just so easy on Linux. Anyway, I did try compiling Qt 5.1 on Windows with MSVC some time ago, and it worked pretty well.
[quote author="MeerMusik" date="1386833840"]Well this time a new Error (at least for me).
Qt Creator Complies Error til:
"... LD.exe cannot find -lqbscored1" < Whats this??[/quote]
Looks like QBS is missing. But QtCreator should compile without it. Try running qmake without -r. Or check out QBS using git checkout --recursive. more info: "this page":http://qt-project.org/wiki/Building-Qt-Creator-from-Git.
[quote author="sierdzio" date="1386834411"][quote author="MeerMusik" date="1386833840"]Well this time a new Error (at least for me).
Qt Creator Complies Error til:
"... LD.exe cannot find -lqbscored1" < Whats this??[/quote]
Looks like QBS is missing. But QtCreator should compile without it. Try running qmake without -r. Or check out QBS using git checkout --recursive. more info: "this page":http://qt-project.org/wiki/Building-Qt-Creator-from-Git.[/quote]
When the compiler runs, then it runs. And the most Problesm i run into, i could cure by questioning the Oracle aka Google.
I need OpenSSL and therefore i have to compile it for my self anyway.
I already thought about going with VS2012 but i want a real OpenSource Variant - which means MingW ;) [Yes i know because of some 3rdParty Stuff used by Qt that it is not "Real OpenSource" anymore].
Ok i will try that.
Have lost 4 Days of Trial and Error with some how "wrong" MingW Versions (even some of those which are mentioned on the qt-project site) and broken Branches already. A few hours more of test compiling does not worry me - not any more :)
And: When the Final-Final Version comes i have to do it again. (Not when the Devs decide, that the 5.2 Stable from December 11 is the Final-Final...)
Lets see what the Day brings. Time to take a nap at minimum.
Thanks for your help. Much appreciated! :)
After i had the Problem with the QBS Module, i did the
"qmake recursive" thingy.
But now i get:
-"Project Error: Unknown Module(s) in QT: Script"-
-In which File(s) do i have to remove what? Please.-
Nevermind @sierdzio already mentioned to do this without "-r"
Mingw32-Make runs for a few seconds but complains about "scripts". Ok i try again from Step 1. Looks like my dumb newbie Fault for now.
Mingw32-Make gives Error
"Project Error: Unknown Module(s) in QT: Script"
What do i have to remove now? Please! Thank You!
Edit: Right after i compiled Qt 5.2 i run "mingw32-make install" <- is that the Problem??
Edit 2: Sorry forgot to add the Info: This Problem regards to Utils.pro and the modules
In \src\libs\utils is still a file called "utils.qbs"
is that ok?
Edit 3: Cleaned the Folders and unzipped the Source Code again. This time i run qmake without "-r" and does not the recursive stuff. Same Problem. My qmake Parameters are:
qmake CONFIG+=debug_and_release CONFIG+=build_all d:\qt-creator-opensource-src-3.0.0\qtcreator.pro
Using the Qt Creator 3.0 Sopurce Code from here:
The used Qt 5.2 Source Code is from here:
The Parameters i have used to build Qt 5.2 are:
configure -prefix c:\qt-build -debug-and-release -developer-build -icu -I C:\icu\dist\include -L C:\icu\dist\lib -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW -platform win32-g++ -nomake examples
After Qt 5.2 was build i run "MingW32-Make install" <<-- Should i have wait til Qt Creator was build??
Compiler is MingW32 x32-4.8.1-posix-dwarf-rev5
What else can i do? I found some old Entrys regarding Qt: Scripts - but there is so much Stuff that i (as a noob) have no Idea what i need to change. And all the Answers that i have found, are too specific to other Problems with Script and for different OS.
I have tried also
"qmake -r CONFIG+=build_and_release CONFIG+=build_all
without any luck.
"qmake CONFIG+=build_and_release CONFIG+=build_all CONFIG-=qbs d:\qt-creator-opensource-src-3.0.0\qtcreator.pro"
Gives still the Error:
"Project Error: Unknown Module(s) in Qt: Script"
"Aggregation" and "ExtensionSystem" are build but right after that, the Compiler stops when it trys "Utils". I am completely out of Ideas now. I am Stuck.
Edit 01: I did (again and again) the whole Procedure shown here: https://qt-project.org/wiki/Building-Qt-Creator-from-Git
I only added "CONFIG+=debug_and_release CONFIG+=build_all"
Still stuck :(
QtScript is a module of Qt, not something from QtCreator. I've had that error somewhere once, but I don't remember where. Maybe just run QtCreator from the prebuild package?
[quote author="sierdzio" date="1386856583"]QtScript is a module of Qt, not something from QtCreator. I've had that error somewhere once, but I don't remember where. Maybe just run QtCreator from the prebuild package?[/quote]
Hmm i thought when i want to have OpenSSL, i need to compile Qt and Qt Creator by my self? Do i have OpenSSL Support when i use the Standard MingW Binaries?
Edit I dont think it will work as the Windows Stuff is compiled with Visual Studio and I have a MingW Install. But i try this out.
Ok i tried the Binaries of Qt Creator but i have too many "not found" things like QApplication and Webkitwidgets. I uninstalled it. And did i already mention "I am still stuck"?
I think i need to recompile the whole Qt S.2 Stuff - this time without "mingw32-make install" right after compilation. Maybe this will work...
I cleaned all Folders and Entrys and started compiling if Qt 5.2 again with Parameter
"configure -prefix c:\qt-build -debug-and-release -developer-build -icu -I C:\icu\dist\include -L C:\icu\dist\lib -openssl -I C:\OpenSSL-Win32\include -L c:\OpenSSL-Win32\lib\MinGW -platform win32-g++"
Compile Time is most around 6 Hours for everything. I will keep this Post updated as needed - With many Luck in 6 Hours when everything is done without Errors fingerscrossedtiltheybroke
QtCreator is only an IDE. Just as you can develop Qt code in notepad (build by MS), gedit (built by GCC) or any other text editor, QtCreator can work with any number of Qt libraries compiled by any compiler.
If you need OpenSSL support in your Qt apps, you need to compile Qt by yourself. But you can use "stock" Qt Creator to develop Qt applications using those Qt libs.
[quote author="MeerMusik" date="1386863134"]Compile Time is most around 6 Hours for everything. I will keep this Post updated as needed - With many Luck in 6 Hours when everything is done without Errors fingerscrossedtiltheybroke
Woah, maybe it's time for PC upgrade :) On my quad-core (+HT) it takes 20-40 minutes to compile Qt (depending on configure flags and the compiler). It will be slower on Windows, but still much more convenient than 6 hours ;) The mingw-make should support "-j numberOfJobs" flag that can be utilised to compile using all CPU cores.
[quote author="sierdzio" date="1386868294"][quote author="MeerMusik" date="1386863134"]Compile Time is most around 6 Hours for everything. I will keep this Post updated as needed - With many Luck in 6 Hours when everything is done without Errors fingerscrossedtiltheybroke
Woah, maybe it's time for PC upgrade :) On my quad-core (+HT) it takes 20-40 minutes to compile Qt (depending on configure flags and the compiler). It will be slower on Windows, but still much more convenient than 6 hours ;) The mingw-make should support "-j numberOfJobs" flag that can be utilised to compile using all CPU cores.[/quote]
No i mean it. If i compile Qt with everything (including Examples, Tests etc.) it takes 5-6 Hours. But even when i compile without Examples and Tests, it takes still 4-5 Hours.
OS: Win 7 x64 on HDD1
RAM: 16 GB DDR3 No ECC
Pagefile (Swapfile called under Linux if i remember correct): Set to a Fixed Value of 6192 MB on HDD1
CPU: AMD Phenom II X4 965 Black Edition, 3.42 GHz
The CPU is not as the good in Performance like some Intel CPUs when it comes to Encoding Video, Audio etc. Maybe this is also applicable for Compiling. I dont know.
Source Code is on HDD2.
Prefix / Target Folders are on HDD1.
HDD 1 is a little older with 16 MB Cache and S-ATA-2. HDD 2 has 32 MB Cache and is S-ATA-3.
Did not have the I/O Values at Hand.
I am Compiling without Special Optimization Parameters. This is something i will look into at a later time. Had enough trouble the last Days to get the Standard Stuff to work ;)
Anyway: After i have done some preparations, this time Qt compiled without any Errors. And for Qt Creator: I added the QTDIR Paths to System and User Environment and restarted my PC - just be sure.
Parameter for qmake are: -r prefix=c:\qt-creator config+=debug_and_release config+=build_all <PathToQtCreator.Pro>
This time, qmake does not saying anything about missing Modules in Utils.pro -> Scripts.
Creator is compiling right now. This time it should end better now :)
Thanks again for your Help and Time!
Ok the compilation of Qt Creator failed again because of that QBS thing.
Will try something else...
So i did that qmake recursive stuff with git and the qbs module is checked out - like in every try before. after that i did again using the Parameter
"-r prefix=c:\qt-creator config+=debug_and_release config+=build_all <PathToQtCreator.Pro>" for qmake.
Started compiling again...
And this time a new Compiler Error:
"Plugin Metadata File "QMLDesigner.json" does not exist. Declaration will be ignored" :(
First time this shows up. Time to ask the Oracle again...
Edit 01: Such a nonsense. The Files DOES exist in C:\qt-creator\src\plugins\qmldesigner.
Edit 02: The File is missing in D:\qt-creator-opensource-src-3.0.0\qt-creator\src\plugins\qmldesigner so i copied the File into it and started mingw32-make again. Compiler runs but I hope that did not make it worse lol
Edit 03: Great Compiler is done without any further Errors. But i have only Debug Files. Will try it again to get the Release Versions of the Files also.
Edit 04: First Release Files are created while the Compiler is on the way. The Problem/Mistake was:
I wrote "config+=debug_and_release config+=build_all" instead of "CONFIG+=debug_and_release CONFIG+=build_all" <- The Parameters with LowerCase made it in the Makefile but got ignored. Not sure if this is a Windows specific Problem - i am still too "noobish" ;)
At 09:01AM GMT+1 Compiler is done without any further Errors.
Debug and Release Libs and DLLs are in Place.
Have not tested yet if everything works. Must do this later - running out of time.
Thanks again for helping and sharing Information :) If i have more Problems i will write again here. Should i have other Problems, i will create another Thread (if needed and if i cant get infos or help else where).
Your determination is quite astounding :) Good luck, mate.
[quote author="sierdzio" date="1386922264"]Your determination is quite astounding :) Good luck, mate.[/quote]
It still is there. Yeah Thanks :)
I did a quick Check and Qt Creator cant find Files like QApplication and QWebView and even not QObject and QMainWindow. But the Files are in the Qt-Build Subfolders. Also if i load my Project it says "Unknown Module(s) in webkitwidgets". And in the UI Designer, the WebView Stuff is gone.
Seems i need to build this manually even as i have build Qt with the -ICU Paramter and the Webkit and Webkit-Examples Folders are in Place.
But i am not sure what i can do about the "Files not Found" - other than copy things from a to b.
For Building the Webkit i will try these Instructions
I hope after 1 Year that they are still valid.
And for the (not really) missing Files: "Playtime!"
I have come that far, now i want everything :)
I tried to make Webkit and was forced to rename \Gnuwin32\bin\flex.exe to win_flex.exe (WebKit is looking for win_flex.exe which leads to an error). And i need many many other things too like fonconfig, SQLite and so on,
This will take a while...
Compiling Webkit now with above Instructions.
Question: Is there a Parameter for mingw32-make (or the other build tools) to build the Webkit only?
Edit 01: Compiler Stops with Error 1: "Win_Flex unknown flag '-' and "[generated/glslang_lex.cpp] Error 1"
[quote author="MeerMusik" date="1386939965"]Question: Is there a Parameter for mingw32-make (or the other build tools) to build the Webkit only?[/quote]
Or in root dir:
[quote author="sierdzio" date="1386940283"][quote author="MeerMusik" date="1386939965"]Question: Is there a Parameter for mingw32-make (or the other build tools) to build the Webkit only?[/quote]
Or in root dir:
Thanks. Thats simpler than i thought.
I tried that and get "*** no rule to make target webkit. stop"
Time to clean things up - again.
Sorry its me again: I have run qmake and i get the configuration warning
"! Qt not configured to use system libjpeg, QImageDecoder will Decode JPEG images" and
! Qt not configured to use system libpng, QImageDecoder will Decode PNG images" <<-- Can ignore this or must i prepare my Apps in future some how?
Most probably you can ignore this.
I decided to build Qt 5.2 again - and this time Webkit got compiled and QWebview is shown in Designer.
But: Compiling Qt Creator 3.0:
I am back to that dumb Problem that qmake says
"Utils.pro -> Missing Module(s) in Qt: Script". No matter what i try.
Even when i check this QBS Stuff out with Git.
And when i do qmake without "-r", everything seems to be fine and MingW32-make builds the "AggregationSystemD.dll" "ExtensionSystemD.dll". But he crashs at "UtilsD.dll"
Get an Error when he tries to built:
"Unknown Module(s) in Qt: Script"
Well its Playtime again.
EDIT 01: Erased QtScript Folder and running mingw32-make again...
EDIT 02: QtScript compiled without Error but compiling Qt Creator still dont work
Hello and good morning Forum :)
Oh man I cant believe it: I have lost 1.5 Days for looking through the qt-project Forum, Google and many many other Sites.
And the Reason why i cant Compile Qt Creator ["Utils.pro -> Unknown Module(s) in Qt: Script"] is that simple (and also that dumb):
After successfully building Qt 5.2, make sure to run
"mingw32-make install" (just be sure everything is in Place) - i had some probs even with the Parameter "-developer-build".
to remove the temporary Files or you [well at least i ;)] cant compile Qt Creator.
One negative thing I have read about the Clean Parameter: It will also remove the Debugger Symbols and some People had to recompile Qt completely. Not sure if i can avoid this by putting the Release and Debug Libraries (or the whole Qt "Kit") into seperate Folders.
But this is something i will try in February 2014 when the 5.2.1 Final is (expected [planned to be]) released.
The noob is now going to waste more time for compiling Qt Creator ;)
Start compiling at 11:41AM GMT+1
Have a nice Day everyone :)
First Compilation Try failed ("-lqbscored1" error thingy). I have tried the Variant with "git clone --recursive" and it works. Now setting up the System. Will report back if i run into more Probs :)
Update 02: Anothing i have learnt: Dont be an Idiot like me and run "mingw32-make docs" and "mingw32-make translations" BEFORE You run "mingw32-make clean" or the Documentation for Qt and Creator cant be build. Luckily i did a Full Backup of the Qt Folder before i ran "mingw32-make clean".
My Steps for doing this Stuff in the Future:
1.) First compile Qt
2.) Run "mingw32-make"
When Qt is successfully compiled:
3.) Run "mingw32-make docs"
4.) Run "mingw32-make translations"
When its done witout Errors:
5.) Compile Qt Creator
6.) redo Steps 3 and 4 (but this time while being in the Qt Creator Folder of course)
7.) Start Qt Creator and Happy coding :)
I wish you all a peaceful Sunday evening and a wonderful start in the new Week.
The Noob aka Oliver ;)
Edit 03: Forget it. I ran into that long existing Bug, that i cant create the Documentation when i use "-prefix". Even i have used the Parameter "-developer-build". Trying to get things in order. Some how. Some Day. Maybe.