I'm trying to compile a QT from the source code under Windows using the script from the official instructions. (https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW)
cmd /c "configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir `
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -no-openssl -opensource -confirm-license `
-make libs -nomake tools -nomake examples -nomake tests"
mingw32-make -k -j4
mingw32-make -k install
In the result I got two problems:
1) build options:
OpenGL:
ANGLE ................................ no
Desktop OpenGL ....................... no
Dynamic OpenGL ....................... no
OpenGL ES 2.0 ........................ yes
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
OpenGL ES 3.2 ........................ no
Vulkan ................................. no
2) fatal error: GLES2/gl2.h: No such file or directory
I tried to set all possible options for the "-opengl" parameter, none worked.
I have installed the directive which is required for ANGLE and the paths in PATH are written, but the installation still does not find it. Also, in the source directory, next to each file that requires GLES2, there are all necessary headers.
I tried to manually download the ANGLE library and write a path to it in PATH, but this did not work.
The same problems were describe in
http://www.qtcentre.org/threads/53752-Error-compiling-qt5-01-on-indovs
https://bugreports.qt.io/browse/QTBUG-59996
but the solutions did not help me.
Search for missing files in the qt folder, copy their parent folders such as GLES2 or KHR to MinGW\x86_64-w64-mingw32\include. It's just brutal force.
Related
My Qt5.7 is statically built with VS2015 in windows 10. The building configurations are as follows:
configure -static -debug-and-release -platform win32-msvc2015
-qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop
-qt-sql-sqlite -qt-sql-odbc -no-openssl -opensource -confirm-license
-make libs -nomake tools -nomake examples -nomake tests
It is found that the built Qt has no QtSVG module after I type QT += svg in a .pro file. Does the building process build all Qt modules? I obtained the Qt source from here[qt official releases][1]
I want to add the QtSvg module, but do not want to rebuild the whole Qt, which is too time-consuming. Is there any simple way to add the module?
That is to install the module to the qtbase include folder, more specifically, C:\Qt\5.7.0\qtbase\include\QtSvg.
I try to build Qt 5.4 from scratch including WebKit with ICU/Unicode support for Windows using VS2013. According to Qt's manuals I'm first setting the environment variables to point to the 32 bit binaries of ICU as downloaded from their webpage:
SET INCLUDE=D:\Qt\icu\include;%INCLUDE%
SET LIB=D:\Qt\icu\lib;%LIB%
SET PATH=D:\Qt\icu\include;D:\Qt\icu\lib;%PATH%
Next I'm doing a configure
configure.bat -commercial -confirm-license -debug-and-release -release -force-debug-info
-nomake tests -nomake examples -qt-zlib -qt-libjpeg -qt-libpng -plugin-sql-sqlite
-no-openssl -opengl dynamic -icu -I D:\Qt\icu\include -L D:\Qt\icu\lib
-prefix D:\Qt\Qt5.4.1\install\
This results in folllowing outputs:
Third Party Libraries:
...
ICU support.............yes
Additional libraries........-LD:\Qt\icu\lib
But after doing "nmake" and "nmake install" I end up with Webkit-DLL's that do not depend on ICU and therefore fail to display my webpages containing Unicode.
So...any idea what is wrong here and why Qt does not make use of ICU although it recognises it correctly and does not show any build/link errors?
Thanks!
I am new in Qt and Yocto. I used Poky toolchain to cross-compile Qt5 on Ubuntu 12.04.LTS.
I installed and configure Qt5 following these instructions for Building Qt5 using yocto on Wandboard.
/configure v -dont-process -opensource -confirm-license -device imx6 -device-option CROSS_COMPILE=/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi -sysroot /fsl-community-bsp/buildcoreimage/tmp/sysroots/imx6qsabreauto -prefix ~/qt5arm -platform linux-g++ -shared -no-pch -no-rpath -pkg-config -no-accessibility -no-dbus -no-icu -no-directfb -evdev -no-fontconfig -no-opengl -opengl es2 -eglfs -no-glib -no-gtkstyle -no-iconv -system-libjpeg -no-kms -system-libpng -no-linuxfb -no-mitshm -no-nis -openssl -qt-pcre -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake tests -tslib -libudev -widgets -no-xcb -no-xcursor -no-xfixes -no-xinerama -no-xinput -no-xinput2 -no-xkb -no-xrandr -no-xrender -no-xshape -no-xsync -no-xvideo -system-zlib
When i tried to build my project with qmake I got the following error:
hmi_ph2$ /home/abc/qt5arm/bin/qmake
Project ERROR: Unknown module(s) in QT: webkitwidgets webkit
so I did
sudo apt-get upgrade libqt5webkit5-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
in my .pro file:
QT += qml quick xml network widgets webkit webkitwidgets xmlpatterns multimedia multimediawidgets
You just need to link against webkit, not webkitwidgets : http://qt-project.org/doc/qt-5/qtwebkitwidgets-index.html
So in your case you have to remove webkitwidgets from the line QT += ....
EDIT : As pointed out by Laszlo Papp, the problem is not there. After looking at the configure option for Qt (from the 4.8 doc : http://qt-project.org/doc/qt-4.8/configure-options.html), there is a -webkit option. I do not know if this option still exist for Qt5 as I couldn't find the full option list in Qt5 Doc (http://qt-project.org/doc/qt-5/configure-options.html), but if you try configure -help you 'll see if it exist. If that is the case then it might be your missing piece.
I'm running Qt Creator 2.4.1 under Windows 7. It works fine with the .dll libraries shipped with the SDK under C:\QtSDK
Recently, I built 4.8.2 libraries from source under C:\qt-source like this:
configure -platform win32-g++ -no-phonon -no-phonon-backend -no-webkit \
-fast -debug -opensource -shared -no-qt3support -no-sql-sqlite \
-no-openvg -no-gif -no-libpng -no-libmng -no-libtiff -no-libjpeg \
-no-script -no-scripttools -nomake examples -nomake demos -no-xmlpatterns
mingw32-make
To link against the new libraries, I added Manual Qt 4.8.2 C:\qt-source\4.8.2\bin\qmake.exe under Tools > Options > Build & Run > Qt Versions. However, Qt Creator still seems to pick up .dll libs from C:\QtSDK
My head will explode soon... I want to compile qt with -openssl-linked so the openssl libraries get linked into the qt libraries. I already tried many options and my output when compiling is always:
ssl/qsslcertificate_openssl.cpp: In function ‘uint qHash(const QSslCertificate&, uint)’:
ssl/qsslcertificate_openssl.cpp:63:30: error: invalid use of incomplete type ‘X509 {aka struct x509_st}’
return qHashBits(x509->sha1_hash, SHA_DIGEST_LENGTH, seed);
^
In file included from /usr/local/include/openssl/crypto.h:131:0,
from /usr/local/include/openssl/comp.h:59,
from /usr/local/include/openssl/ssl.h:148,
from ../../include/QtNetwork/5.5.1/QtNetwork/private/../../../../../src/network/ssl/qsslcontext_openssl_p.h:53,
from ../../include/QtNetwork/5.5.1/QtNetwork/private/qsslcontext_openssl_p.h:1,
from ssl/qsslsocket_p.h:55,
from ssl/qsslsocket_openssl_p.h:63,
from ssl/qsslsocket_openssl_symbols_p.h:64,
from ssl/qsslcertificate_openssl.cpp:35:
/usr/local/include/openssl/ossl_typ.h:160:16: note: forward declaration of ‘X509 {aka struct x509_st}’
typedef struct x509_st X509;
I compiled openssl and tried compiling qt passing my compiled libraries:
OPENSSL_LIBS='-L/opt/openssl_build/lib -lssl -lcrypto' ./configure -prefix /opt/qt5.5.1_linux_staticssl -opensource -confirm-license -release -nomake examples -nomake tests -static -openssl -no-opengl -no-libpng -no-pulseaudio -no-linuxfb -no-gif -no-gstreamer -no-gtkstyle -no-directfb -no-gui -no-eglfs -no-glib -I /opt/openssl_build/include/openssl -L /opt/openssl_build/lib -no-xcb
I know the error seems to be loading the old openssl libraries but I already tried changing that path so it can't find them and force it to load the new ones.
I don't know what else to do. The Qt version is 5.5.1 openssl 1.0.1 and g++ 5.2.
I had to build Qt with the openssl version 1.0.1, don't know if it work with the 1.0.2. I had to change the path of the system's openssl libraries so that Qt was forced to use the ones I made.
Lines to compile openssl running at the source's directory:
./config --prefix=/opt/openssl_build_stable -shared
make
make test
sudo make install
My conf line for Qt:
OPENSSL_LIBS='-L/opt/openssl_build_stable/lib -lssl -lcrypto' ./configure -prefix /opt/qt5.5.1_linux_staticssl -opensource -confirm-license -release -nomake examples -nomake tests -static -openssl-linked -I /opt/openssl_build_stable/include/openssl -L /opt/openssl_build_stable/lib
Thanks to simon-warta
Try ./configure -no-openssl
to bypass openssl altogether, in case you don't need your paraView to talk to another machine.