Results 1 to 14 of 14

Thread: Cannot build Qt with gcc 5.1 on Windows 8.1.

  1. #1
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Cannot build Qt with gcc 5.1 on Windows 8.1.

    I'm getting error msg:
    zconf.h is missing.
    After providing path to that file, in mkspec:

    Qt Code:
    1. QMAKE_INCDIR = "C:\qt5_5_0\qt-everywhere-opensource-src-5.5.0\qtbase\include\QtZlib"
    To copy to clipboard, switch view to plain text mode 

    it compiles but doesn't link, gives following error:


    Qt Code:
    1. C:/qt5_5_0/qt-everywhere-opensource-src-5.5.0/qtbase/lib/libQt5Bootstrap.a(qbyte
    2. array.o):qbytearray.cpp:(.text$_Z11qUncompressPKhi+0x8f): undefined reference to `z_uncompress'
    3. C:/qt5_5_0/qt-everywhere-opensource-src-5.5.0/qtbase/lib/libQt5Bootstrap.a(qbytearray.o):qbytearray.cpp:(.text$_Z9qCompressPKhii+0xbb): undefined reference to `z_compress2'
    4. collect2.exe: error: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 

    Any ideas how to fix it so I can build it?
    Another question, when will there be available QT build for windows build with GCC5.2?

    Thank you.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    The linker cannot find the library. How have you told the Qt configure where to find zlib? What version have you provided? You should not need to directly modify any build file to use the internal or an external zlib.
    Qt Code:
    1. Configure ... -qt-zlib
    To copy to clipboard, switch view to plain text mode 
    http://doc.qt.io/qt-5/windows-buildi...ment-variables
    http://doc.qt.io/qt-5/configure-opti...arty-libraries

    You already have the source code to build Qt with with any suitably recent GCC suite. What are you waiting for?

  3. #3
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    Hi Chris,
    So you're saying that I should've provide that -qt-zlib option to configure?
    If I do not modify mkspec for g++ on windows I'll get error:
    zconf.h cannot be found.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    You either use the zlib that is bundled with Qt (-qt-zlib), or you provide your own (-system-zlib) and tell configure where to find it from the command line (-I and -L options). The first option is easier, the second looks like this:
    Qt Code:
    1. configure -system-zlib -I c:\zlib\include -L c:\zlib\lib
    To copy to clipboard, switch view to plain text mode 
    with suitable paths for the location you built/installed zlib. If you specify neither option then the configure (at least on Linux) defaults to system zlib.

    Either way, you should not need to edit any of the Qt sources.

  5. #5
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    When follow your instructions and tried to build qt with following options:

    configure.bat -release -platform win32-g++ -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -skip webkit -nomake examples -nomake tests

    and after running mingw32-make

    this is the error I'm getting:
    In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/initguid.h:8:0,
    from qaxscript.cpp:61:
    C:/TDM-GCC-64/x86_64-w64-mingw32/include/activscp.h:470:1: error: redefinition of 'const GUID IID_IActiveScriptSite' DEFINE_GUID(IID_IActiveScriptSite, 0xdb01a1e3, 0xa42b, 0x11cf, 0x8f,0x20, 0x00,0x80,0x5f,0x2c,0xd0,0x64);
    ^

    Any idea what to do with it?

    Thanks

  6. #6
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    So? No idea what to do next?

  7. #7
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,386
    Thanks
    247
    Thanked 687 Times in 677 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    Why don't you simply download the pre-built Qt 5.5.0 for Windows with mingw 4.9.2 from here? Why do you need to build it from source?

  8. #8
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    Un effing believable.
    ChrisW64 says:
    "You already have the source code to build Qt with with any suitably recent GCC suite. What are you waiting for? " - which I just shown that it cannot be built with GCC 5.1

    and you are saying:
    " why I don't simply download pre-built Qt 5.5.0 for Windows with mingw 4.9.2? "

    Because I want to try new functionality provided by GCC 5.1 which is absent in GCC 4.9.2. That's why.

  9. #9
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,386
    Thanks
    247
    Thanked 687 Times in 677 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    " why I don't simply download pre-built Qt 5.5.0 for Windows with mingw 4.9.2? "

    Because I want to try new functionality provided by GCC 5.1 which is absent in GCC 4.9.2. That's why.
    OK, so I missed that point.

    You want to live on the bleeding edge, you have to be prepared to shed some of your own blood, not expect the people who are trying to help you to do the bleeding for you. You respond with abuse, you don't get more help in the future. Easy as that.

  10. #10
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    Please grow up Marry.

    Not only you missed my point, you are also *unable* to help even if you wanted to, and you are like little girl who can't take the slightest criticism.
    I didn't get any help so far, only mumblings of so called "expert" - one contradicting the other. Is that what you call help?

    As a side note, how long was my original post and the consecutive ones that you missed my point? Do you have attention span of a fly?
    Last edited by smallB; 24th July 2015 at 20:09.

  11. #11
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    Quote Originally Posted by smallB View Post
    ...and after running mingw32-make

    this is the error I'm getting:
    In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/initguid.h:8:0,
    from qaxscript.cpp:61:
    C:/TDM-GCC-64/x86_64-w64-mingw32/include/activscp.h:470:1: error: redefinition of 'const GUID IID_IActiveScriptSite' DEFINE_GUID(IID_IActiveScriptSite, 0xdb01a1e3, 0xa42b, 0x11cf, 0x8f,0x20, 0x00,0x80,0x5f,0x2c,0xd0,0x64);
    ^

    Any idea what to do with it?
    If you don't need ActiveQt then configure it out of the build entirely. If you do need it then:
    http://code.qt.io/cgit/qt/qtactiveqt...f611d99a80b0ce
    http://sourceforge.net/p/mingw-w64/bugs/464/

    I predict that will not be the only issue. If you want to play with the latest toolchains and and a large library of sources (feature freeze 16th Feb 2015) that pre-date the compiler (released 22 Apr) then you have to accept that there might be small problems like this. Fixes might exist for them but they will not arrive by magic, you have to seek them out in the latest developer version of the library/compiler source or on the dev mailing lists/IRC channels. It really did not take much to find this exact problem, a Qt workaround, and a reference to the MinGW bug on the front page of the ActiveQt Git repo. The problem itself is not in Qt.

    BTW: Personal attacks will not help your cause, and might just get you banned.
    Last edited by ChrisW67; 24th July 2015 at 22:23.

  12. #12
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    @ChrisW67
    Thank you. I really appreciate your answer and I'm really grateful for it.
    As for personal attacks, just to point you out (and others who read this thread) that it was @d_stranz who actually attacked me personally and to which personal attack I've simply replied. It was not me who started attacking personally other members of this community.
    If you go through posts exchange between me and you, surely you don't see me attacking you or behaving in any other way unpleasantly towards you, am I right?

    And as a side note, although as much as I do appreciate your help, perhaps in the future instead of:

    "You already have the source code to build Qt with with any suitably recent GCC suite. What are you waiting for? "

    you should reply as you did in your last post, which occurred after I've pointed out that this^^^ is not really the case, so instead of the above you should rather say:

    "I predict that will not be the only issue."

    Thank you.
    Last edited by smallB; 25th July 2015 at 12:51.

  13. #13
    Join Date
    Jan 2013
    Posts
    10
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    @ChrisW67
    Hi, I've just managed to build qt with GCC 5.1. I do want to thank you for your help.
    The command line I've used:
    configure.bat -release -platform win32-g++ -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -skip webkit -nomake examples -nomake tests -no-accessibility -skip activeqt

    Thanks again.
    Peace man.

  14. #14
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,593
    Thanks
    13
    Thanked 1,587 Times in 1,516 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cannot build Qt with gcc 5.1 on Windows 8.1.

    I could only possibly respond as I did in my last after you provided information about how Qt was failing to build with GCC 5.1 (your post #5). Your earlier posts had to do with failing to configure the build to match your environment, to which I provided suitable guidance.

    D_Stranz asked why you were not using the ready-to-go build with the earlier GCC; a perfectly good question given you had not explained why you wanted a GCC 5.1/5.2 build and were clearly having difficulty. There's a wide range of reasons you might want to do that but not all of them justify the work. I don't think that question deserved anything other than a simple answer: "curiosity", " I need left-handed barbaz templating from GCC5.1 in other parts of the project", "I need ABI compatibility", or whatever.

    I am glad you got there in the end.

    As for your GCC 5.2 question: to provide a supported build the Qt team needs to establish a suitable continuous integration rig for MingW/GCC and then make the code go in a controlled way. I cannot remember seeing a commitment to do this in the near future. I would not expect it for at least a couple of Qt dot releases. Read/ask on the qt-dev mailing list for a reliable answer.

  15. The following user says thank you to ChrisW67 for this useful post:

    smallB (26th July 2015)

Similar Threads

  1. Replies: 2
    Last Post: 3rd October 2011, 23:04
  2. Can't build qwt in Windows
    By MattPhillips in forum Qwt
    Replies: 2
    Last Post: 26th December 2009, 16:18
  3. Replies: 3
    Last Post: 28th December 2007, 11:02
  4. Cant build exe in windows
    By drinu21 in forum Qt Programming
    Replies: 3
    Last Post: 13th November 2007, 16:11
  5. Replies: 10
    Last Post: 25th February 2007, 00:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.