Qt 5.1 + MinGW64 + MSYS



  • My name is Giovanni and I'm new to this forum. I'm a Java developer but I'm playing with C++ in my spare time,

    I recently succeded to compile Qt 5.1 on Windows 7 in both 32 and 64 bits using MingW and MSYS.
    I haven't compile WebKit yet, but it's on the way.

    If anybody is interested all instructions are here: http://www.kineticsystem.org/mingw

    I hope you find it useful.

    Cheers,

    Giovanni



  • I added instructions to compile OpenSSL, ICU, gperf to compile Qt 5.1 WebKit under MSYS.

    Giovanni


  • Moderators

    welcome to devnet

    Thanks for sharing your information. Hope you were aware of "this wiki entry":http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MinGW
    Yes, it is based on Qt 4 (mainly 4.7 but checked also with 4.8). I would assume that is quite close to what you need for Qt 5.1. Please have a look to this wiki entry, if you have not done yet. Possibly you can add some additional comments where appropriate. As long as your link above is non-commercial and open to everybody you can probably also add it to the list of references.
    However, just to note, this last statement might be overruled by someone in charge of devnet. I am merely a simple user.

    Probably most people will have a look to the wiki pages first for some guide lines. Within the forum it might lost/hidden because of many posts.



  • Yes, I'm aware of the wiki page but there are many non trivial differences between 4.8 and 5.1. I also had to apply few patches to the mingw 32 toolchain and to the Qt 5.1 that are not mentioned there.

    As per your question the website is not commercial. I've been working on that how-to page for two years so far and I thought somebody developing on Windows 32 or 64 bits may find it useful. It contains a lot if little issues that a newby (like me) may come accross.

    It is just my contribution to Qt and other open source sofwares, nothing more than that.

    Cheers,

    Giovanni


  • Moderators

    That is great. Certainly of use for a lot of people now and in the future.
    If there are too many differences, you may want to start a new guide Qt 5 in the wiki. You could use most of the information you have already posted on your page. Certainly you can reference your webpage as the original information.
    From an awareness point of view, you will probably getting the broader audience on the wiki, but also make people aware of your webpage.



  • In the same link I added detailed instructions to compile Qt Creator for both 32 and 64 architectures on Windows 7 64 bits using MSYS.
    http://www.kineticsystem.org/mingw

    I did few tests using Qt Creator compiling some unrelated Qt projects and both 32 and 64 versions seem to work well.

    These are detailed instructions that I wrote for myself during my learning process while compiling several libraries other than Qt, that's why I do not feel like starting a new page on the forum, it would be a double work.

    But, if there is interest and it doesn't break any license, I can provide the full toolchain in a zip file (600MB) including perl, ruby, python, patches, compilation scripts and all source code. It is a self contained toolchain that can be unzipped under "c:\MinGW" and ready to go. Ideally it would be nice to put it somewhere where people can download it and compile all code themselves.

    I'm not sure if this is going to break some license, otherwise let me know what you think.

    Cheers,

    Giovanni



  • I am working through your instructions. My platform is a Windows 8 machine with an Intel i7 3770 and 32 Gig of RAM. I am having a couple of problems. I am only doing the 64 bit side right now.
    I have gotten as far as the ImageMagick build.
    I used the latest version of ImageMagick (6.8.6-8) because that was the only one available on the download site I chose.
    ImageMagick would not build with quantum depth 8. It had a problem with the fftw library files.

    @*** Warning: This system can not link to static lib archive C:/MinGW/local64/dst/fftw/lib/libfftw3.la.
    *** I have the capability to make that library automatically link in when
    *** you link to this library. But I can only do this if you have a
    *** shared version of the library, which you do not appear to have.@

    Here is the top of /local64/dst/fftw/lib/libfftw3.la.

    @# libfftw3.la - a libtool library file

    Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1

    Please DO NOT delete this file!

    It is necessary for linking the library.

    The name that we can dlopen(3).

    dlname=''

    Names of this library.

    library_names=''

    The name of the static archive.

    old_library='libfftw3.a'@

    Notice the value for dlname and library_names. Compare these values to the same values in /local64/dst/libjpeg/lib/libjpeg.la.

    @# libjpeg.la - a libtool library file

    Generated by libtool (GNU libtool) 2.4.2

    Please DO NOT delete this file!

    It is necessary for linking the library.

    The name that we can dlopen(3).

    dlname='../bin/libjpeg-9.dll'

    Names of this library.

    library_names='libjpeg.dll.a'

    The name of the static archive.

    old_library='libjpeg.a'@

    There were no .dll files installed in /local64/dst/libfftw/bin .
    I abandoned ImageMagick for now.

    I then tried to do something with Python, which had appeared to install correctly, although I had found that if Python 3.3.2 is already installed at C:\Python33 then the first run of the msi installer will force you to uninstall the existing version and then run the installer again to install at C:\MinGW\opt\python .

    After reinstalling Python the MSYS PATH environment variable has not been modified yet so an absolute path to the python executable is required to check the installation (/opt/python/python –version). This had worked as expected.

    After giving up on ImageMagick I tried to launch a python shell and had problems. Typing '/opt/python/python' at the command prompt hangs the MSYS Shell. Ctrl-C and Ctrl-Z did not help. Tried Ctrl-Break and that worked. Later found out that Ctrl-C would work to unhang, but not if I had already tried Ctrl-Z. If I used Windows File Explorer to navigate to C:\MinGW\opt\python and double-clicked on python.exe I did get a python shell in a Windows CMD window. I've decided to uninstall 3.3 in /opt and reinstall as it was before in C:\Python33. Typing /c/Python33/python after the second reinstallation has the same negative effect, the MSYS shell hangs.



  • Let me apologize for not thanking you for you efforts in the previous post. I have been looking for a toolchain like this. I hope I can get it working.

    If I can't I do have a fallback. I have a VirtualBox installation of Kubuntu Linux on my machine and I could do cross compiling in there and drop the binaries into a common directory. But I am stubborn and my goal is to have open source development tools on Windows 8.



  • Hi Sdewey,

    regarding ImageMagick unfortunately I had problem myself compiling the latest version that's why I'm using this version.
    I would suggest you to try with an older version from SourceForge first:
    http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/

    What I can do for you is sharing my whole toolchain so it will be easier to compare possible differences.
    Unless there is a way to contact a user privately using this forum, please contact me here and I'll send you the link (700MB):
    http://www.kineticsystem.org/contact

    If anybody offer some space where to leave the toolchain so that other people can download it, it would be really nice.

    I'm not sure about Python actually... Do you have any antivirus enabled that could interfere?

    Giovanni



  • This is the top of FFTW in my install directory. I think there may be something wrong in the way the FFTW library is compiled in your toolchain.

    But, even if you figure out this problem, you will still face additional troubles in compiling the latest version of Image Magick.

    @# libfftw3.la - a libtool library file

    Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1

    Please DO NOT delete this file!

    It is necessary for linking the library.

    The name that we can dlopen(3).

    dlname='../bin/libfftw3-3.dll'

    Names of this library.

    library_names='libfftw3.dll.a'@



  • Too anyone considering using Giovanni's build technique I want you to know I solved all issues on Windows 8 and now have a working MinGW development stack.
    On my platform (see earlier post) I found it necessary to remove all '-j8' options in his instructions.
    Also, if you include the Botan crypto library you might need to add this argument to the call to configure.py:
    @--link-method=copy@

    Here is the full command:
    @python configure.py --prefix=$BOTAN_PREFIX --cc=gcc --os=mingw --cpu=i386 --link-method=copy@

    Thanks to Giovanni for the fine work.


Log in to reply
 

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