[QT5] How do I build pile of this dog shit?!



  • Excuse me for my french, but can somebody give normal instructions on how to build QT5 with WebKit?! EVERYTHING SO FAR WAS WASTE OF TIME, nothing does the job right.

    Why suddenly QT5 does not provide vs2008 builds?! Wouldn't be a big deal if I could build it myself (I had to build QT4 myself anyways because of some bugs here and there in official releases that for some reason miss some exports). Let me guess... it was decided to drop vs2008 in QT5 because QT people weren't able to build it with 2008 themselves? Am I right?

    SO, I was following 50 (maybe 55, I lost the count, sorry) different readmes all over the web and all kinds of links on QT sites. After wasting a day of my life finally I was able to compile QT5.0.2 with vs2008.... ooooh, suddenly, now it doesn't build WebKit anymore... ok, there are some supper random BS readmes on how to build it... QT readme reffers to http://trac.webkit.org/wiki/BuildingQtOnWindows which has some random confusing BS, and one part tells to check out trunk... I thought that if it tells to check it out, then I need to do it, since I never checked out WebKit source which I probably need to be able to build it. After wasting 5 hours (I've never seen anything worse than WebKit svn - it just aborts every 5-10 minutes, and I virtually have unlimited speed connection)... after wasting hours of time... I noticed that qt-everywhere-opensource-src-5.0.2.zip actually had WebKit source! WTF is that, why are these random guides tell to check out trunk?! Ok, after I wasted 5 hours trying to check out webkit, I deleted 2GB of webkit crap and was set to build it from qt distribution source... after wasting time here and there it seem that I've build release version so far and debug build is on it's way. Honestly... it's worst frustrating experience dealing with QT builds (4.8.4 was just awesome compared to that pile of crap that QT5 became).

    Here I'll list some of my findings...

    http://qt-project.org/wiki/Building-Qt-5-from-Git: pile of BS.
    First command after cloning it FAILS:
    @C:\Qt\qt5>perl init-repository

    • git submodule init
      No submodule mapping found in .gitmodules for path 'qlalr'
      git submodule init exited with status 256 at init-repository line 300.@

    So, pretty much my attempts building from GIT were finished right here. Obviosuly, it's abandoned and unmaintained way of building QT5, why isn't this page tells readers not to follow these instructions if they don't want to waste time?. That Building-Qt-5-from-Git should be taken down so that people don't get confused. Weird, that page was updated two weeks ago, but it just doesn't work completely!

    So, I started building from qt-everywhere-opensource-src-5.0.2.zip. My first negative impression: why is that generation of Visual Studio project files was removed (even though configure for some reason tells that it's possible with -vcproj option which simply does not work). Is it influenced by Nokia or what? I'm sorry, but I don't know any better way to browse source code and see what's going on and search find references etc... For 4.8.4 all I had to do was to open C:\Qt\qt-everywhere-opensource-src-4.8.4\projects.sln that's all, I didn't need to memorize any structure or location of files, I didn't need to click 20 different folders and search for files. Can you please fix this MAJOR REGRESSION!?

    1. Ok... VS project generation is broken, whatever, I still needed to build. I need QtWebKit with OpenSSL. Here I wasted hours of bulding/cleaning/reconfiguring and everytime I was getting link errors related to SSL but the link errors weren't even related to OpenSSL! It appeares that broken configure somehow enables OpenSSL only partially: some files weren't included in the build and as a result I was always getting error in unresolved QSslCertificate::operator== or something like that. Only when I browsed to that folder (in explorer instead of VS becase of broken VS project generation) I looked into qtbase\src\network\ssl\ssl.pri only there on line 23 there were proper instructions on how to enable OpenSSL linking. Looks like broken configure enables OpenSSL, but doesn't include actuall ssl related source becuase it wasn't able to properly sniff OpenSSL libs that I had in my include/lib paths. Only when I added extra params as mentioned in ssl.pri I was FINALLY alble to make first build of qt5 with VS 2008. I admit that I'm probably stupid that I didn't look into that qtbase\src\network\ssl\ssl.pri before reading readmes and trying to build, it's probably so obvious that this file needs to tbe consulted beforehand that nothing even mentions that, it's probably one of those must haves like check that your computer connected to power source before attempting to build QT5!

    Here was my cmd line:
    @configure -prefix C:\Qt\5.0.2 -debug-and-release -no-ltcg -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -platform win32-msvc2008 -vcproj -opensource -confirm-license -openssl -openssl-linked -I C:\QT\OpenSSL-Win32\include -L C:\QT\OpenSSL-Win32\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD" -icu -I C:\Qt\icu\dist\include -L C:\Qt\icu\dist\lib -nomake tests -nomake examples -make-tool jom@

    and I don't mention minor fixes that I had to do here and there to fix compilation/linking. I had to add missing math.h because one file was using fabsf which gave errors. There were some random errors in building dbus-related code, but I think it was some example that was breaking build and after I disabled test and examples with "-nomake tests -nomake examples" I was able to finally build this pile of crap.



  • 4)So, I'm back to building WebKit which doesn't build anymore the way it used to with QT4. Why would it, serisously?! Why on earth would anybody need to build WebKit?!..
    After reading 30 or so useless confusing instruction writeouts I was able to finally start building it:
    @
    cd qtwebkit
    perl Tools\Scripts\build-webkit --qt --release
    @
    NOOO way, that would be too easy! Oh, it's ok, off course it doesn't build as usual, I was getting worried already that I must have done something wrong. So, back to digging in windows explorer all that chinese-like code mess with QT-webkit trying to figure out why setWindowFlags on line 65 inside qtwebkit\Tools\MiniBrowser\qt\raw\View.cpp makes compilation error. It would probably take me 10 times less effort if vs projects were generated, but what ever, I don't mind already... After digging for a while I found magic solution: I had to compile without webkit2... off course, why didn't I figure it out right a way! So, here' the ultimate recipie:
    @
    perl Tools\Scripts\build-webkit --qt --release --no-webkit2
    @
    which worked after a few fails and cleans.

    So, now I need to build debug version of WebKit... that must be easy:
    @
    perl Tools\Scripts\build-webkit --qt --debug --no-webkit2
    @
    Obviously I'm getting usueal QT5-style errors here:
    @
    LINK : fatal error LNK1104: cannot open file 'C:/Qt/qt-everywhere-opensource-src-5.0.2/qtwebkit/WebKitBuild/Release/lib\Qt5WebKitd.lib'
    @
    Ah, I'm probably stupid and forgot to copy
    C:/Qt/qt-everywhere-opensource-src-5.0.2/qtwebkit/WebKitBuild/DEBUG/lib\Qt5WebKitd.lib
    to
    C:/Qt/qt-everywhere-opensource-src-5.0.2/qtwebkit/WebKitBuild/RELEASE/lib\Qt5WebKitd.lib
    Same step needs to be repeated for missing Release/lib/Qt5WebKitWidgetsd.lib after one more failed build attempt
    Offcourse, that was it, nothing nowhere tells about this step, because it's so obvious that no need to even mention that.

    WebKit is built, I simply need to manually copy some files to installation folder becuase qt-WebKit doesn't believe that somebody will come to installation phase because of proken build. Anyways, I'll probably figure out where I need to copy all these dlls and libs etc.

    I agree that Windows-8 is a failure for MS so far, but I think it's too early to abandon windows support in QT in favore some doomed symbian or s60.
    Also, I want to tell thank you for giving me a reason to have ruby installed on my windows box. You should also find some use for tcl and QT5 officially will be pimping.
    I understand, asking for something that builds is too much, expecially that now I can add star particles to my apps, why would I want to build it if I can have star particles now!?
    !http://qt-project.org/doc/qt-5.0/qtdoc/images/qt5_particles.jpg(star particles)!

    Serious questions:
    VS project generation: why? Is it political decision, or qt-shop internally uses some better code development tools than VS?
    Why vs2008 isn't supported (unless you failed to build it yourself?)

    can you profide clear guidelines that tell how to make this conversion: qt-everywhere-opensource-src-5.0.2.zip -> qt-windows-opensource-5.0.2-msvc2010_32-x86-offline.exe
    it would be useful for people to be able to replicate exact builds that are distributed by QT. It would be way easier for others to swap for vs2008 in that case and generate proper installer.

    And the last one... should I simply stick with 4.8.4 which works perfectly (aside from extremely unnoying QOledrag-related bugs that crash my app). QT5 is beta (or gamma, whatever commes before betta) now and shouldn't be used in production for now and all these missing and broken parts will be fixed eventually?


  • Moderators

    If you want to talk about this with Qt developers, use the development mailing list - that is where your voice will be heard.

    I won't address most of your options, as I don't care for Windows or WebKit too much, and on Linux I have not had any issues since an early beta release more than 1 year ago. Just some small pointers:

    • Qt has no control over Ruby dependency - it's WebKit that requires both Python and Ruby to be built. If you want that changed, you are asking in a wrong place
    • any C++98 compiler can compile Qt (although I'm not sure about webkit). You don't have MSVC2008 prebuilds because of maintenance burden and the fact that it's old - I think ;)
    • problems in build from git - just try another SHA... there is a lot going on in Qt source code, sometimes things don't work. Usually simply picking an older commit (or waiting for a new one) helps


  • Maybe I wrote too much crying, but experience with QT5 was outright horrible. Just about anything that doesn't work is completely fcuked.
    I agree about building from git: I was probably unlucky that some retard committed something new shit that breaks building from the GIT.
    Not a big deal about ruby also: it's ok if somebody is more comfortable to use whatever tools that do the job.
    Regarding Vs2008: I don't think it's old. It's possibly most widely used VS as of today. We've never switched to vs2010 because of some incompatibilities (mainly totally different file format for custom tool rules) and because new visual studio dropped support for WinCE/WinMobile, but only new visual studio support metro and new Windows Phone. So far we didn't need much requirement for new windows phone/metro, and therefore no need to switch to newer VS.

    There is also an important point that I forgot to mention: I got the impression that I shouldn't try to port code from QT4 to QT5. Folders got renamed. WHY?! Somebody was feeling that names weren't right and suddenly millions of people will have to go and modify their code breaking compatibility with older QT at the same time?
    Then some stuff was removed/changed and there is no freaking way on this earth for me to figure out what I need to do to build my shit with new QT5. I didn't write our app, I simply need to update it to use qt5. Some changes are straightforward (where I needed to add missing includes or modify paths), but there is a few changes that I simply have no clue how to do.
    QPlastiqueStyle, QCleanlooksStyle (and others are removed). After digging the web it looks like I need to use QProxyStyle, but there is no way on earth me to simply guess how I could get functionality of these different styles using only that one QProxyStyle. In our app at different places we use different styles, so, I need to be able to have that functionality with QT5 as well.


  • Moderators

    I agree with you that some decisions made in Qt5 are not so convenient, even when there was a clear benefit seen in introducing them.

    On with the show:

    • Cleanlooks and Plastique are old and were deprecated, but not removed. Plus, Fusion was introduced as a replacement. Read more about it "here":http://blog.qt.digia.com/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/
    • By "folders got renamed" I assume you mean the change from QtGui to QtWidgets? Depending on how your code is written, this either requires no changes in code at all (if you use #include <QClass>) or just a simple rename (if you use #include <QtModule/QClass>). There is a script in Qt5's tools folder that will do this automatically for you. So that is not really a groundbreaking change + there is plenty of guides on how to do it "in the docs":http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html

    As for MSVC2008 prebuild again - you can ask Digia to provide it, or even (if you have the means) offer a server to mirror it for the whole community. For a while, MinGW build was provided by community, while Digia was preparing to host it themselves.



  • Qt5.3-configure does create vcproj-files. You have to add '-fully-process' at the cmd line (or inside .cache-file).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.