Results 1 to 4 of 4

Thread: Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2018
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017

    I have been successfully using Qt 5.8 (from qt-opensource-windows-x86-msvc2015-5.8.0.exe) for several years.
    I fear that later versions of Qt will not become available in the future. For example, www.qt.io/download no longer contains links to pre-compiled versions (such as qt-opensource-windows-x86-msvc2015-5.8.0.exe)
    So, I decided to attempt to build Qt from source on Windows.
    I have successfully built many versions of Qt on Linux in the past, but I have never been able to build Qt on Windows.

    I am NOT able to build and install Qt 5.11.2 open source on Windows/MSVC 2015 due to problems with the QWebEngine compile failing. The QWebEngine compile absolutely requires a 64bit linker.
    So after much research I came to the conclusion that I needed to obtain MSVC2017 to get a build to work.

    Through much trial and error I found that the source and destination paths MUST be very short or I get "Path too long" build errors.
    But, I now have been able to build and install Qt 5.11.2 open source on Windows/MSVC 2017 using a 64_86 Visual Studio command prompt.

    I am able to create a new GUI project that builds and runs with it.
    But although I can also compile my huge existing code base, none of the applications run due to problems with DLL's (they load and immediately unload)
    I suspect problems with 64 vs 32 bit exec/dlls but cannot find any obvious issue. Depends shows several Windows 64 bit DLLs.

    NOTE: I require 32 bit executables due to hardware vendors only providing 32 bit driver interfaces.

    Here is the configure command used (where BUILD_INSTALL_DIR is 5.11.2:

    ..\qt5\configure -prefix C:\Qt\%BUILD_INSTALL_DIR% -verbose -debug-and-release -opensource -confirm-license -icu -opengl desktop -shared -plugin-sql-mysql -nomake examples -nomake tests -platform win32-msvc2017 -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\openssl\include -L C:\openssl\lib -I C:\MySQL\include -L C:\MySQL\lib ICU_PREFIX=C:\ICU -I C:\ICU\include -L C:\ICU\lib

    Are there new requirements for the project files? I looked at the test GUI project file and did not see anything special that is not in my project files.

    Any suggestions for further investigation would be appreciated

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017

    Quote Originally Posted by ForestDweller2 View Post
    I have been successfully using Qt 5.8 (from qt-opensource-windows-x86-msvc2015-5.8.0.exe) for several years.
    I fear that later versions of Qt will not become available in the future.
    What would the be gain of making Qt unaccessible to developers?

    Quote Originally Posted by ForestDweller2 View Post
    For example, www.qt.io/download no longer contains links to pre-compiled versions (such as qt-opensource-windows-x86-msvc2015-5.8.0.exe)
    Because it is a very old version and not one of the long-term-support ones.
    There are still downloads for 5.6 and 5.9 and obviously the most recent version.

    http://download.qt.io/official_releases/qt/


    Quote Originally Posted by ForestDweller2 View Post
    Through much trial and error I found that the source and destination paths MUST be very short or I get "Path too long" build errors.
    Yeah, Windows has weird restrictions on command line lengths.
    I think there are tools to map paths to new drive letters to reduce the length

    Quote Originally Posted by ForestDweller2 View Post
    NOTE: I require 32 bit executables due to hardware vendors only providing 32 bit driver interfaces.
    It is always annoying how backwards some vendors are.

    Quote Originally Posted by ForestDweller2 View Post
    ..\qt5\configure -prefix C:\Qt\%BUILD_INSTALL_DIR% -verbose -debug-and-release -opensource -confirm-license -icu -opengl desktop -shared -plugin-sql-mysql -nomake examples -nomake tests -platform win32-msvc2017 -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\openssl\include -L C:\openssl\lib -I C:\MySQL\include -L C:\MySQL\lib ICU_PREFIX=C:\ICU -I C:\ICU\include -L C:\ICU\lib
    That looks correct. Can you check if the resulting Qt DLLs are 32 bit?

    Quote Originally Posted by ForestDweller2 View Post
    Are there new requirements for the project files?
    No, if you run the correct qmake it should be enough.

    Since you can run new test applications the build itself seems to be OK.

    Cheers,
    _

  3. #3
    Join Date
    Jul 2018
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017

    Quote Originally Posted by anda_skoa View Post
    Since you can run new test applications the build itself seems to be OK.

    _
    It's now beginning to make sense. I downloaded qt-opensource-windows-x86-5.11.2.exe to see if it too produced the same outcome and wow, this installer actually includes MSVC 2015 32 bit, MSVC 2015 64 bit, MSVC 2017 64 bit, and a host of other platform installs, (not sure why it is called qt-opensource-windows-x86-5.11.2.exe). Further, there are a host of other optional 'modules' including Qt WebEngine with the note "On Windows, the module is only available under MSVC 2017 64 bit".

    So it seems that the problem I have been fighting is related to attempting to build a 32 bit version of Qt WebEngine...a very long story...(I already bought MSVC 2017 because I read that it was necessary to build Qt WebEngine).
    And this also means that I am either stuck at Qt 5.8 or convert all of my applications that depend on webenginewidgets to some other widgets(?) or move to 64 bit with radically reduced hardware support.

    Or perhaps, I could try (again) to use Qt 5.8 Qt WebEngine with Qt 5.11 or Qt 5.12 MSVC 2015 32 bit as outlined in https://doc.qt.io/qt-5/qtwebengine-platform-notes.html under "Using Earlier Qt Versions to Build Qt WebEngine" (which failed completely when I tried it).

    It seems that the direction (future) of Qt is 64 bit and it is time to just accept this.
    Of course, I could then argue that the Linux platform would be more of a possible option!

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems after building Qt 5.11.2 open source 32 bit with MSVC 2017

    Quote Originally Posted by ForestDweller2 View Post
    It's now beginning to make sense. I downloaded qt-opensource-windows-x86-5.11.2.exe to see if it too produced the same outcome and wow, this installer actually includes MSVC 2015 32 bit, MSVC 2015 64 bit, MSVC 2017 64 bit, and a host of other platform installs, (not sure why it is called qt-opensource-windows-x86-5.11.2.exe).
    Probably to just differentiate between architectures, i.e. "normal Intel", not IA64, not ARM, etc.

    Quote Originally Posted by ForestDweller2 View Post
    And this also means that I am either stuck at Qt 5.8 or convert all of my applications that depend on webenginewidgets to some other widgets(?) or move to 64 bit with radically reduced hardware support.
    You could check if the QtWebKit "forward port" can handle your needs and whether it is available in 32 bit
    https://github.com/annulen/webkit/wiki

    Quote Originally Posted by ForestDweller2 View Post
    It seems that the direction (future) of Qt is 64 bit and it is time to just accept this.
    This is unfortunately mostly a Google/Windows problem, i.e. Google not supporting this kind of build of the Blink Engine on Windows.
    Also the reason QtWebEngine can't be built on Windows with other compiler than MSVC.

    One option you could investigate is separating hardware access from UI.
    E.g. running a headless program (child program or service) in 32bit mode for accessing the hardware and running the UI with 64 bit.

    Cheers,
    _

Similar Threads

  1. Problems building Qt 5 static with MSVC 2010
    By prophetofreason in forum Installation and Deployment
    Replies: 1
    Last Post: 28th January 2013, 18:45
  2. Problem building open source SDK 2009.3.1
    By jmansion in forum Installation and Deployment
    Replies: 1
    Last Post: 16th September 2009, 11:48
  3. Open source dev on windows: MinGW vs MSVC
    By magland in forum Installation and Deployment
    Replies: 4
    Last Post: 29th December 2007, 09:20
  4. Qt Open source + MSVC++ 2008
    By TopFuel in forum Qt Programming
    Replies: 9
    Last Post: 6th October 2007, 20:09
  5. QT Open Source, Designer and MSVC++
    By bradcb212 in forum Qt Programming
    Replies: 1
    Last Post: 4th October 2007, 06:52

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.