QtDBus linkage error - qt

I built Qt on Windows with WinDBus. Qt itself built OK, but QDbus examples build fails with message
moc_car_adaptor_p.obj : error LNK2001: unresolved external
symbol "public: static struct QMetaObject const
QDBusAbstractAdaptor::staticMetaObject"
(?staticMetaObject#QDBusAbstractAdaptor##2UQMetaObject##B)
Folder E:\qt\4.6.4\msvc2008\lib contains QtDBus4.dll QtDBus4.lib QtDBusd4.dll and QtDBusd4.lib. All contains 'staticMetaObject#QDBusAbstractAdaptor##2UQMetaObject##B' string.
How to fix it?
Beforehand thankful, Ilya.
UPD:
All .PRO files are from DBus examples, I have not changed anything. For example:
######################################################################
# Automatically generated by qmake (2.01a) Mon Aug 28 19:50:14 2006
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += qdbus
# Input
# DBUS_ADAPTORS += car.xml
HEADERS += car.h car_adaptor_p.h
SOURCES += car.cpp main.cpp car_adaptor.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xml
sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
UPD2:
Command line that QtCreator produces:
... moc.exe and cl.exe calls...
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189
-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_THREAD_SUPPORT -I"..\..\..\..\msvc2008\include\QtCore" -I"..\..\..\..\msvc2008
\include\QtGui" -I"..\..\..\..\msvc2008\include" -I"..\..\..\..\msvc2008\include
\QtDBus" -I"..\car" -I"debug" -I"..\..\..\..\msvc2008\include\ActiveQt" -I"."
-I"..\..\..\..\msvc2008\mkspecs\win32-msvc2008"
-Fodebug\ #C:\DOCUME~1\resu\LOCALS~1\Temp\moc_car_adaptor_p.obj.432.2453.jom
moc_car_adaptor_p.cpp
link /LIBPATH:"e:\qt\4.6.4\msvc2008\lib" /NOLOGO /DEBUG /MANIFEST
/MANIFESTFILE:"debug\car.intermediate.manifest" /SUBSYSTEM:WINDOWS
/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*'
processorArchitecture='*'" /OUT:debug\car.exe #C:\DOCUME~1\resu\LOCALS~1
\Temp\car.exe.432.3734.jom
Options I built Qt with:
configure.exe -platform win32-msvc2008 -shared -debug-and-release -dbus -dbus-linked
-qt-sql-sqlite -qt-sql-psql -no-qt3support -qt-zlib -qt-gif -qt-libpng -qt-libmng
-qt-libtiff -qt-libjpeg -openssl-linked -confirm-license -opensource -phonon -phonon-
backend -nomake demos -nomake examples OPENSSL_LIBS="-lssleay32MD -llibeay32MD"
-I "C:\OpenSSL-Win32\include" -I "C:\Progra~1\PostgreSQL\8.4\include"
-I E:\qt\4.6.4\msvc2008\src\dbus" -I E:\qt\4.6.4\msvc2008\src\dbus\dbus"
-L "C:\Progra~1\PostgreSQL\8.4\lib" -L "C:\OpenSSL-Win32\lib\VC\static"
-l ws2_32 -l gdi32 -l user32 -l crypt32 -l advapi32

The problem was in qdbusmacros.h:
#if defined(QDBUS_MAKEDLL)
# define QDBUS_EXPORT Q_DECL_EXPORT
#elif defined(QT_SHARED)
# define QDBUS_EXPORT Q_DECL_IMPORT
#else
# define QDBUS_EXPORT
#endif
QT_SHARED was not declared in application, and QDBUS_EXPORT becames nothing.
Adding
CONFIG += QT_SHARED
solved the problem.
Note: in Qt 4.8.4 all works fine (previously I used 4.6.4)

Related

unrecognized command-line option "-mfloat-abi=softfp" | Qt Cross Compilation for Raspberry Pi 4 | Debian 11 aarch64

I've installed Debian Bullseye from this page:
https://raspi.debian.net/daily-images/
on a Raspberry Pi 4 machine and prepared the required libraries and packages following these guides:
https://www.interelectronix.com/qt-515-cross-compilation-raspberry-compute-module-4-ubuntu-20-lts.html
https://github.com/abhiTronix/raspberry-pi-cross-compilers/blob/master/QT_build_instructions.md
This is the compiler I'm using: https://snapshots.linaro.org/gnu-toolchain/12.0-2021.10-1/aarch64-linux-gnu/gcc-linaro-12.0.0-2021.10-x86_64_aarch64-linux-gnu.tar.xz
from this page: https://snapshots.linaro.org/gnu-toolchain/12.0-2021.10-1/aarch64-linux-gnu/
issue description
When I run ./configure... after some processing the compiler throws an error:
aarch64-linux-gnu-g++: error: unrecognized command-line option -mfloat-abi=softfp
Meanwhile, Linaro or official ARM compilers do not support VFP, FPU, etc. so I had to change the qmake.conf to try to remove that command-line option from the compiler flags.
QMAKE_CFLAGS -= -mfloat-abi=softfp
QMAKE_CFLAGS_RELEASE -= -mfloat-abi=softfp
QMAKE_CXXFLAGS -= -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE -= -mfloat-abi=softfp
I've tried every solution listed on: Qmake: how to remove compiler flag for a certain project, without changing qmake.conf?
But still had no luck! That command-line magically appears again!
Have you had any luck compiling for aarch64?
How can I resolve this issue?
UPDATE
my configure command:
~/Qt/5.15.2/Src/configure -release -device linux-rasp-pi4-v3d-g++ \
-device-option CROSS_COMPILE=~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/tools/gcc-linaro-12.0.0-2021.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- \
-sysroot ~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot -prefix /usr/local/qt5.15.2 \
-extprefix ~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/qt5.15.2 \
-opensource -confirm-license -skip qtscript -skip qtwayland -skip qtwebengine \
-nomake tests -make libs -pkg-config -no-use-gold-linker -v -recheck \
-L~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/lib/aarch64-linux-gnu \
-I~/Documents/Qt-CrossCompile-RaspberryPi/raspberrypi4/sysroot/usr/include/aarch64-linux-gnu
I edited qmake.conf in linux-rasp-pi4-v3d-g++ folder:
include(../common/linux_device_pre.conf)
#QMAKE_LIBS_EGL += -lEGL
#QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
#QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a72 -mfpu=crypto-neon-fp-armv8
QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a72
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
#DISTRO_OPTS += hard-float
DISTRO_OPTS += deb-multi-arch
#EGLFS_DEVICE_INTEGRATION = eglfs_kms
include(../common/linux_arm_device_post.conf)
QMAKE_CFLAGS = $$replace(QMAKE_CFLAGS, "-mfloat-abi=softfp", "")
QMAKE_CFLAGS_RELEASE = $$replace(QMAKE_CFLAGS_RELEASE, "-mfloat-abi=softfp", "")
QMAKE_CXXFLAGS = $$replace(QMAKE_CXXFLAGS, "-mfloat-abi=softfp", "")
QMAKE_CXXFLAGS_RELEASE = $$replace(QMAKE_CXXFLAGS_RELEASE, "-mfloat-abi=softfp", "")
COMPILER_FLAGS = $$replace(COMPILER_FLAGS, "-mfloat-abi=softfp", "")
load(qt_config)
fixed this by editing the qmake.conf
used linux_device_post instead of linux_arm_device_post
include(../common/linux_device_pre.conf)
QT_QPA_DEFAULT_PLATFORM =
QMAKE_CFLAGS = -march=armv8-a -mtune=cortex-a72
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
DISTRO_OPTS += deb-multi-arch
include(../common/linux_device_post.conf)
load(qt_config)

Qt using "mingw32-make" in command line with .exe file generation error

I have used qmake -project and qmake in command line so far with the configuration of .pro file, Makefile.Debug and Makefile.Release has been worked out. But error happens when I try to use mingw32-make in command line to generate .exe for my project.
Errors imply that in line:
64 ****missing separator ...Stop
But in this case, I've set all the environment variables well for both mingw32-make.exe and qmake.exe.
Someone says I should add a Tab instead of a space in makefile.release at where the error happens(the error place only has a "<<"), but other errors happen when I make the change. And I think since the Makefiles are all generated automatically by the qmake command, so maybe that's not the real problem...
Here's the Error info and part of the Makefile.Release file for reference
:
Setting up environment for Qt usage...
Remember to call vcvarsall.bat to complete environment setup!
D:\qt5.10\5.9.2\msvc2017_64>cd D:\qtProgramme\helloworld
D:\qtProgramme\helloworld>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'D:/qtProgramme/helloworld'
Makefile.Release:64: *** missing separator. Stop.
mingw32-make[1]: Leaving directory 'D:/qtProgramme/helloworld'
Makefile:36: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
D:\qtProgramme\helloworld>
And here is the Makefile.Release:
#############################################################################
# Makefile for building: helloworld
# Generated by qmake (3.1) (Qt 5.9.2)
# Project: helloworld.pro
# Template: app
#############################################################################
MAKEFILE = Makefile.Release
####### Compiler, tools and options
CC = cl
CXX = cl
DEFINES = -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG
CFLAGS = -nologo -Zc:wchar_t -FS -Zc:strictStrings -O2 -MD -W3 -w44456 -w44457 -w44458 $(DEFINES)
CXXFLAGS = -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc $(DEFINES)
INCPATH = -I. -I. -I..\..\qt5.10\5.9.2\msvc2017_64\include -I..\..\qt5.10\5.9.2\msvc2017_64\include\QtWidgets -I..\..\qt5.10\5.9.2\msvc2017_64\include\QtGui -I..\..\qt5.10\5.9.2\msvc2017_64\include\QtANGLE -I..\..\qt5.10\5.9.2\msvc2017_64\include\QtCore -Irelease -I..\..\qt5.10\5.9.2\msvc2017_64\mkspecs\win32-msvc
LINKER = link
LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'"
LIBS = /LIBPATH:D:\qt5.10\5.9.2\msvc2017_64\lib D:\qt5.10\5.9.2\msvc2017_64\lib\qtmain.lib /LIBPATH:C:\utils\my_sql\my_sql\lib /LIBPATH:C:\utils\postgresql\pgsql\lib shell32.lib D:\qt5.10\5.9.2\msvc2017_64\lib\Qt5Widgets.lib D:\qt5.10\5.9.2\msvc2017_64\lib\Qt5Gui.lib D:\qt5.10\5.9.2\msvc2017_64\lib\Qt5Core.lib
QMAKE = D:\qt5.10\5.9.2\msvc2017_64\bin\qmake.exe
IDC = idc
IDL = midl /NOLOGO
ZIP = zip -r -9
DEF_FILE =
RES_FILE =
COPY = copy /y
SED = $(QMAKE) -install sed
COPY_FILE = copy /y
COPY_DIR = xcopy /s /q /y /i
DEL_FILE = del
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
INSTALL_FILE = copy /y
INSTALL_PROGRAM = copy /y
INSTALL_DIR = xcopy /s /q /y /i
QINSTALL = D:\qt5.10\5.9.2\msvc2017_64\bin\qmake.exe -install qinstall
QINSTALL_PROGRAM = D:\qt5.10\5.9.2\msvc2017_64\bin\qmake.exe -install qinstall -exe
####### Output directory
OBJECTS_DIR = release
####### Files
SOURCES = main.cpp
OBJECTS = release\main.obj
DIST = main.cpp
QMAKE_TARGET = helloworld
DESTDIR = release\ #avoid trailing-slash linebreak
TARGET = helloworld.exe
DESTDIR_TARGET = release\helloworld.exe
####### Implicit rules
.SUFFIXES: .c .cpp .cc .cxx
{.}.cpp{release\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Forelease\ #<<
$<
<<
{.}.cc{release\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Forelease\ #<<
$<
<<
{.}.cxx{release\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Forelease\ #<<
$<
<<
{.}.c{release\}.obj::
$(CC) -c $(CFLAGS) $(INCPATH) -Forelease\ #<<
$<
<<
####### Build rules
first: all
all: Makefile.Release $(DESTDIR_TARGET)
$(DESTDIR_TARGET): $(OBJECTS)
$(LINKER) $(LFLAGS) /MANIFEST:embed /OUT:$(DESTDIR_TARGET) #<<
release\main.obj
$(LIBS)
<<
qmake: FORCE
#$(QMAKE) -o Makefile.Release helloworld.pro
qmake_all: FORCE
You are using a MSVC build of Qt. That can be deduced by the installation path (D:\qt5.10\5.9.2\msvc2017_64) and the output "Remember to call vcvarsall.bat to complete environment setup!".
QMake from an MSVC build of Qt produces MSVC-compatible makefiles (by default at least).
Install the MinGW build of Qt, and you can use the MinGW toolchain for your project.

Build QT Source with OpenSSL and MSVC2017

I managed to compile openssl-1.0.2o (using nasm-2.13.03) like shown here:
https://wiki.qt.io/Building_Qt_Desktop_for_Windows_with_MSVC
However trying to build the Qt-Source already fails when trying to configure using the following command (it works without ssl/openssl):
C:/qt-everywhere-src-5.11.1/configure -platform win32-msvc2017 -prefix win32-msvc2017 -opensource -confirm-license -debug-and-release -force-debug-info -nomake examples -nomake tests -skip qtwebengine -skip qt3d -I C:\openssl-1.0.2o\out32dll -L C:\openssl-1.0.2o\out32dll -ssl -openssl
with the following Error in command line:
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
ERROR: Feature 'openssl' was enabled, but the pre-condition '!features.securetransport && (features.openssl-linked || libs.openssl_headers)' failed.
ERROR: Feature 'ssl' was enabled, but the pre-condition 'config.winrt || features.securetransport || features.openssl' failed.
the config.log reveals it fails because of an "alloca.h"
Command line: -platform win32-msvc2017 -prefix win32-msvc -opensource -confirm-license -debug-and-release -force-debug-info -nomake examples -nomake tests -skip qtwebengine -skip qt3d -I C:\openssl-1.0.2o\out32dll -L C:\openssl-1.0.2o\out32dll -ssl -openssl
loaded result for config test config.qtbase.tests.verifyspec
+ cd /d C:\qt_build\config.tests\verifyspec && C:\qt_build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\openssl-1.0.2o\\out32dll" "INCLUDEPATH += C:\\openssl-1.0.2o\\out32dll" C:/Entwicklung/qt-everywhere-src-5.11.1/qtbase/config.tests/verifyspec
+ cd /d C:\qt_build\config.tests\verifyspec && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
> jom 1.1.2 - empower your cores
> del verifyspec.obj
> del verifyspec.exp verifyspec.vc.pdb verifyspec.ilk verifyspec.idb
> C:\qt_build\config.tests\verifyspec\verifyspec.exp konnte nicht gefunden werden
> jom 1.1.2 - empower your cores
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zi -MDd -W0 -EHsc /Fdverifyspec.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -IC:\qt-everywhere-src-5.11.1\qtbase\config.tests\verifyspec -I. -IC:\openssl-1.0.2o\out32dll -IC:\qt-everywhere-src-5.11.1\qtbase\mkspecs\win32-msvc -Fo #C:\Users\msrei\AppData\Local\Temp\verifyspec.obj.5420.0.jom
> verifyspec.cpp
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:verifyspec.exe #C:\Users\msrei\AppData\Local\Temp\verifyspec.exe.5420.328.jom
test config.qtbase.tests.verifyspec succeeded
loaded result for config test config.qtbase.tests.architecture
+ cd /d C:\qt_build\config.tests\arch && C:\qt_build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\openssl-1.0.2o\\out32dll" "INCLUDEPATH += C:\\openssl-1.0.2o\\out32dll" C:/Entwicklung/qt-everywhere-src-5.11.1/qtbase/config.tests/arch
+ cd /d C:\qt_build\config.tests\arch && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
> jom 1.1.2 - empower your cores
> del arch.obj
> del arch.exp arch.vc.pdb arch.ilk arch.idb
> C:\qt_build\config.tests\arch\arch.exp konnte nicht gefunden werden
> jom 1.1.2 - empower your cores
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zi -MDd -W0 -EHsc /Fdarch.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -IC:\qt-everywhere-src-5.11.1\qtbase\config.tests\arch -I. -IC:\openssl-1.0.2o\out32dll -IC:\qt-everywhere-src-5.11.1\qtbase\mkspecs\win32-msvc -Fo #C:\Users\msrei\AppData\Local\Temp\arch.obj.12860.0.jom
> arch.cpp
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:arch.exe #C:\Users\msrei\AppData\Local\Temp\arch.exe.12860.94.jom
Detected architecture: i386 (sse sse2)
test config.qtbase.tests.architecture gave result i386
loaded result for config test config.qtbase.tests.sse2
+ cd /d C:\qt_build\config.tests\x86_simd && C:\qt_build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\openssl-1.0.2o\\out32dll" "INCLUDEPATH += C:\\openssl-1.0.2o\\out32dll" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=sse2" C:/Entwicklung/qt-everywhere-src-5.11.1/qtbase/config.tests/x86_simd
+ cd /d C:\qt_build\config.tests\x86_simd && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
> jom 1.1.2 - empower your cores
> del main.obj
> del x86_simd.exp x86_simd.vc.pdb x86_simd.ilk x86_simd.idb
> C:\qt_build\config.tests\x86_simd\x86_simd.exp konnte nicht gefunden werden
> jom 1.1.2 - empower your cores
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -arch:SSE2 -Zi -MDd -W0 -EHsc /Fdx86_simd.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_SSE2 -IC:\qt-everywhere-src-5.11.1\qtbase\config.tests\x86_simd -I. -IC:\openssl-1.0.2o\out32dll -IC:\qt-everywhere-src-5.11.1\qtbase\mkspecs\win32-msvc -Fo #C:\Users\msrei\AppData\Local\Temp\main.obj.11032.0.jom
> main.cpp
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:x86_simd.exe #C:\Users\msrei\AppData\Local\Temp\x86_simd.exe.11032.109.jom
test config.qtbase.tests.sse2 succeeded
loaded result for config test config.qtbase.tests.aesni
+ cd /d C:\qt_build\config.tests\x86_simd && C:\qt_build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\openssl-1.0.2o\\out32dll" "INCLUDEPATH += C:\\openssl-1.0.2o\\out32dll" "CONFIG+=add_cflags" "DEFINES+=NO_ATTRIBUTE" "SIMD=aesni" C:/Entwicklung/qt-everywhere-src-5.11.1/qtbase/config.tests/x86_simd
+ cd /d C:\qt_build\config.tests\x86_simd && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
> jom 1.1.2 - empower your cores
> del main.obj
> del x86_simd.exp x86_simd.vc.pdb x86_simd.ilk x86_simd.idb
> jom 1.1.2 - empower your cores
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -arch:SSE2 -Zi -MDd -W0 -EHsc /Fdx86_simd.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -DNO_ATTRIBUTE -DQT_COMPILER_SUPPORTS_AESNI -IC:\qt-everywhere-src-5.11.1\qtbase\config.tests\x86_simd -I. -IC:\openssl-1.0.2o\out32dll -IC:\qt-everywhere-src-5.11.1\qtbase\mkspecs\win32-msvc -Fo #C:\Users\msrei\AppData\Local\Temp\main.obj.16356.0.jom
> main.cpp
> link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:x86_simd.exe #C:\Users\msrei\AppData\Local\Temp\x86_simd.exe.16356.93.jom
test config.qtbase.tests.aesni succeeded
loaded result for config test config.qtbase.tests.alloca_h
+ cd /d C:\qt_build\config.tests\alloca_h && C:\qt_build\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\openssl-1.0.2o\\out32dll" "INCLUDEPATH += C:\\openssl-1.0.2o\\out32dll" C:/Entwicklung/qt_build/config.tests/alloca_h
+ cd /d C:\qt_build\config.tests\alloca_h && set MAKEFLAGS=& jom clean && set MAKEFLAGS=& jom
> jom 1.1.2 - empower your cores
> del main.obj
> C:\qt_build\config.tests\alloca_h\main.obj konnte nicht gefunden werden
> del alloca_h.exp alloca_h.vc.pdb alloca_h.ilk alloca_h.idb
> C:\qt_build\config.tests\alloca_h\alloca_h.exp konnte nicht gefunden werden
> jom 1.1.2 - empower your cores
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zi -MDd -W0 -EHsc /Fdalloca_h.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -I. -IC:\openssl-1.0.2o\out32dll -IC:\qt-everywhere-src-5.11.1\qtbase\mkspecs\win32-msvc -Fo #C:\Users\msrei\AppData\Local\Temp\main.obj.14548.0.jom
> main.cpp
> main.cpp(2): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "alloca.h": No such file or directory
> jom: C:\qt_build\config.tests\alloca_h\Makefile [main.obj] Error 2
test config.qtbase.tests.alloca_h FAILED
It worked using openssl 1.0.2 configured like this:
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86
perl Configure VC-WIN32 --prefix=C:/openssl
nmake -f ms/ntdll.mak
nmake -f ms/ntdll.mak install
and this configure:
D:/qt-everywhere-src-5.10.0/configure -platform win32-msvc2017 -prefix win32-msvc2017 -opensource -confirm-license -debug-and-release -force-debug-info -nomake examples -nomake tests -skip qtwebengine -skip qt3d -ssl -openssl-linked OPENSSL_PREFIX=C:\openssl
for using it in a Qt-Project with MSVC2017 add this to your projects .pro file
win32-msvc* {
LIBS += -LC:/openssl/lib/ -llibeay32
LIBS += -LC:/openssl/lib/ -lssleay32
INCLUDEPATH += C:/openssl/include
}
I don't know about Qt 5.10, but for 5.11.1, the following works - open a CMD prompt and run vcvarsall first, of course.
build-openssl.bat
#set SRC=openssl-1.0.2o
#if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
#set BITS=32
#set DST=OpenSSL-Win32
#set CONFIG=VC-WIN32
#set SETUP=ms\do_nasm
) else if "%VSCMD_ARG_TGT_ARCH%"=="x64" (
#set BITS=64
#set DST=OpenSSL-Win64
#set CONFIG=VC-WIN64A
#set SETUP=ms\do_win64a
) else goto no_vscmd
#echo Building %SRC% for %BITS% bits.
#echo - Downloading
#perl ^
-e "use LWP::Simple;" ^
-e "mirror('https://www.openssl.org/source/%SRC%.tar.gz', '%SRC%.tar.gz');"
#echo - Decompressing
#if not exist %SRC%.tar.gz goto no_archive
#rmdir /S /Q %SRC% %DST% 2>NUL
#7z x -bsp2 -y %SRC%.tar.gz >NUL && ^
7z x -bsp2 -y %SRC%.tar >NUL && ^
del %SRC%.tar
#if errorlevel 1 goto unpack_failed
#if not exist %SRC% goto no_source
#echo - Building
#pushd %SRC%
#perl Configure %CONFIG% --prefix=%~dp0..\%DST% && ^
call %SETUP% && ^
nmake -f ms\nt.mak init && ^
jom -f ms\nt.mak "CC=cl /FS" && ^
jom -f ms\nt.mak test && ^
nmake -f ms\nt.mak install || goto build_failed
#popd
#rmdir /S /Q %SRC%
#echo Build has succeeded.
#goto :eof
:no_archive
#echo Error: can't find %SRC%.tar.gz - the download has failed :(
#exit /b 1
:unpack_failed
#echo Error: unpacking has failed.
#exit /b %errorlevel%
:no_source
#echo Error: can't find %SRC%\
#exit /b 1
:build_failed
#echo The build had failed.
#popd
#exit /b 2
:no_vscmd
#echo Use vcvars-32 or vcvars-64 to set up the Visual Studio
#echo build environment first.
#exit /b 100
Then, to build Qt 5.11.1, I use the following configuration:
-opensource
-confirm-license
-force-debug-info
-debug-and-release
-ltcg
-openssl
-qt-zlib
-qt-libpng
-qt-libjpeg
-plugin-sql-sqlite
-mp
OPENSSL_PREFIX="c:\foo\OpenSSL-Win32"
-nomake examples
-make-tool jom
-platform win32-msvc
-opengl dynamic
-no-iconv
-no-dbus
Where foo is whatever folder you happened to run build-openssl.bat in.
Ensure that you have jom in the path, otherwise you'll hate the whole process. The latest jom is at: http://download.qt.io/official_releases/jom/jom.zip
The script to add all the tools into your path (so that you don't have to set it globally):
toolpaths.bat
#set V_7ZIP=%ProgramFiles%\7-Zip
#set V_PERL64=C:\Perl64
#set V_PERL32=C:\Perl
#set V_PYTHON27=C:\Python27
#set V_NASM=%ProgramFiles%\NASM
#set V_NASM32=%ProgramFiles(x86)%\NASM
#set V_SMARTGIT32=%ProgramFiles(x86)%\SmartGit
#set V_SMARTGIT=%ProgramFiles%\SmartGit
#set V_CMAKE=%ProgramFiles%\CMake
#set V_CMAKE32=%ProgramFiles(x86)%\CMake
#set V_VS2015=2015
#set V_VS2015COMNTOOLS=%VS140COMNTOOLS%
#set V_VS2017COMNTOOLS=%VS150COMNTOOLS%
#if not exist "%V_7ZIP%\7z.exe" goto no_7zip
#call :append_path "%V_7ZIP%"
#goto has_7zip
:no_7zip
#echo Warning: 7-Zip not installed. OpenSSL will not build.
:has_7zip
#if not exist "%V_PERL64%\bin" goto no_perl64
#if not exist "%V_PERL64%\site\bin" goto no_perl_site64
#call :append_path "%V_PERL64%\site\bin"
:no_perl_site64
#call :append_path "%V_PERL64%\bin"
#goto has_perl
:no_perl64
#if not exist "%V_PERL32%\bin" goto no_perl
#if not exist "%V_PERL32%\site\bin" goto no_perl_site32
#call :append_path "%V_PERL32%\site\bin"
:no_perl_site32
#call :append_path "%V_PERL32%\bin"
#goto has_perl
:no_perl
#echo Warning: Perl not installed. Qt will not build.
:has_perl
#if not exist "%V_PYTHON27%" goto no_python
#call :append_path "%V_PYTHON27%"
#goto has_python
:no_python
#echo Warning: Python 2.7 not installed. Qt will not build.
:has_python
:check_nasm
#if not exist "%V_NASM%\nasm.exe" goto check_nasm32
#call :append_path "%V_NASM%"
#goto has_nasm
:check_nasm32
#if not exist "%V_NASM32%\nasm.exe" goto no_nasm
#call :append_path "%V_NASM32%"
#goto has_nasm
:no_nasm
#echo Warning: NASM not installed. OpenSSL will not build.
:has_nasm
:check_git
#if not exist "%V_SMARTGIT%\git\bin" goto check_git32
#call :append_path "%V_SMARTGIT%\git\bin"
#goto has_git
:check_git32
#if not exist "%V_SMARTGIT32%\git\bin" goto no_git
#call :append_path "%V_SMARTGIT32%\git\bin"
#goto has_git
:no_git
#echo Warning: SmartGit not installed. Qt WebEngine might not build.
:has_git
:check_cmake
#if not exist "%V_CMAKE%\bin\cmake.exe" goto check_cmake32
#call :append_path "%V_CMAKE%\bin"
#goto has_cmake
:check_cmake32
#if not exist "%V_CMAKE32%\bin\cmake.exe" goto no_cmake
#call :append_path "%V_CMAKE32%\bin"
#goto has_cmake
:no_cmake
#echo Info: CMake not installed. This is without consequences.
:has_cmake
:: configure gyp overrides for msvs 2017 express
#if not exist "%VS150COMNTOOLS%\VsDevCmd.bat" goto no_vs2017gyp
#call :set_path V_VS2017 "%VS150COMNTOOLS%\..\.."
#echo Info: Found MSVS 2017 at "%V_VS2017%"
#set GYP_MSVS_VERSION=2017
#set GYP_MSVS_OVERRIDE_PATH=%V_VS2017%
#goto no_vs2015gyp
:no_vs2017gyp
:: configure gyp overrides for msvs 2015 express
#if not exist "%VS140COMNTOOLS%\..\IDE\WDExpress.exe" goto no_vs2015gyp
#call :set_path V_VS2015 "%VS140COMNTOOLS%\..\.."
#echo Info: Found MSVS Express 2015 at "%V_VS2015%"
#set GYP_MSVS_VERSION=2015
#set GYP_MSVS_OVERRIDE_PATH=%V_VS2015%
:no_vs2015gyp
#exit /b
:append_path
#echo %PATH%|find "%~1">nul || PATH %PATH%;%~1
#goto :eof
:set_path
#set %1=%~f2
#goto :eof
Here's what I've done today to solve this particular problem and build Qt 5.11.1 shared libraries with OpenSSL and MySQL support:
Download OpenSSL 1.0.2L precompiled binaries from npcglib.org, make sure to choose the version suited for your specific MS compiler (VS 2017);
Install MySQL Connector/C v6.1.6 (v6.1.11 is more recent, but I haven't tried it);
After extracting the OpenSSL package to c:\openssl, the following commands ran successfully:
set OPENSSL_CONF=C:\openssl\ssl\openssl.cnf
configure -shared -debug-and-release -opensource -confirm-license -sql-mysql -opengl dynamic -platform win32-msvc2017 -prefix C:\Qt\qt5.11.1-msvc2017-shared -nomake tests -nomake examples -I "C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1\include" -L "C:\Program Files (x86)\MySQL\MySQL Connector.C 6.1\lib" -ssl -openssl -I "C:\openssl\include" -L "C:\openssl\lib"
nmake
nmake install
I recommend building Qt sources from the Github repository, simply because if things go wrong and you need to clean the build directory, nmake clean is super super slow. To properly clean the building directory and do it fast when building from the git repository, you can get rid of all temporary files with:
rm config.cache
git submodule foreach --recursive "git clean -dfx"
And your system should be ready to execute another configure.

Building a project under Windows including Rcpp and RInside

Here's a compilation problem.
The project works on Linux and OS X and must be ported to Windows. It uses RInside and Rcpp librairies.
To do so, I installed R, Cygwin and RTools and compiled the R librairies. It worked fine.
Now the problem:
The QMake step happens with no error, but the building exits with an error. I get this :
error: [1]: No such file or directory
error: Rcpp:::CxxFlags(): Invalid argument
error: [1]: No such file or directory
error: RInside:::CxxFlags(): Invalid argument
Long version:
17:18:36: Débute : "C:\Qt\Qt5.7.0\Tools\mingw530_32\bin\mingw32-make.exe"
C:/Qt/Qt5.7.0/5.7/mingw53_32/bin/qmake.exe -spec win32-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../IHM/Rpp-IHM.pro
C:/Qt/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/Henri/Desktop/rpp/src/build-Rpp-IHM-Desktop_Qt_5_7_0_MinGW_32bit-Debug'
g++ -c -pipe -fno-keep-inline-dllexport -Wno-unused-parameter -IC:/Progz/R-3.3.2/include -IC:/Progz/R-3.3.2/include/x64 [1] "Rcpp:::CxxFlags()" [1] "RInside:::CxxFlags()" -g -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../IHM -I. -I../computer/RppUtils -I../computer/RppEngine -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtSvg -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtWidgets -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtANGLE -IC:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore -Idebug -IC:/Qt/Qt5.7.0/5.7/mingw53_32/mkspecs/win32-g++ -o debug/WrapperRppR.o ../IHM/WrapperRppR.cpp
g++.exe: error: [1]: No such file or directory
g++.exe: error: Rcpp:::CxxFlags(): Invalid argument
g++.exe: error: [1]: No such file or directory
g++.exe: error: RInside:::CxxFlags(): Invalid argument
Makefile.Debug:2914: recipe for target 'debug/WrapperRppR.o' failed
mingw32-make[1]: *** [debug/WrapperRppR.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/Henri/Desktop/rpp/src/build-Rpp-IHM-Desktop_Qt_5_7_0_MinGW_32bit-Debug'
Makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
17:18:40: Le processus "C:\Qt\Qt5.7.0\Tools\mingw530_32\bin\mingw32-make.exe" s'est terminé avec le code 2.
Erreur lors de la compilation/déploiement du projet Rpp-IHM (kit : Desktop Qt 5.7.0 MinGW 32bit)
When executing step "Make"
In fact, it seems that it doesn't find RInside.h, in spite of the fact that the R_HOM variable is set to the directory of R (here : C:/Progz/R-3.3.2/).
Here's a part of the .pro file:
QT += core gui svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Rpp-IHM
TEMPLATE = app
CONFIG += c++11
CONFIG += -v
## comment this out if you need a different version of R,
## and set set R_HOME accordingly as an environment variable
## R_HOM = $$system($$R_HOME)
win32 {
#A specifier
R_HOM = "C:/Progz/R-3.3.2/"
}
unix:!macx {
# WORKING
R_HOM = "/usr/lib/R/"
}
macx {
# WORKING
R_HOM = "/Library/Frameworks/R.framework/Resources/"
}
## include headers and libraries for R
RCPPFLAGS = $$system($$R_HOM/bin/R CMD config --cppflags)
RLDFLAGS = $$system($$R_HOM/bin/R CMD config --ldflags)
RBLAS = $$system($$R_HOM/bin/R CMD config BLAS_LIBS)
RLAPACK = $$system($$R_HOM/bin/R CMD config LAPACK_LIBS)
## if you need to set an rpath to R itself, also uncomment
RRPATH = -Wl,-rpath,R_HOME/lib
## include headers and libraries for Rcpp interface classes
RCPPINCL = $$system($$R_HOM/bin/Rscript -e \'Rcpp:::CxxFlags\(\)\')
RCPPLIBS = $$system($$R_HOM/bin/Rscript -e \'Rcpp:::LdFlags\(\)\')
## for some reason when building with Qt we get this each time
## so we turn unused parameter warnings off
RCPPWARNING = -Wno-unused-parameter
## include headers and libraries for RInside embedding classes
RINSIDEINCL = $$system($$R_HOM/bin/Rscript -e \'RInside:::CxxFlags\(\)\')
RINSIDELIBS = $$system($$R_HOM/bin/Rscript -e \'RInside:::LdFlags\(\)\')
INCLUDEPATH = ../computer/RppUtils
INCLUDEPATH += ../computer/RppEngine
## compiler etc settings used in default make rules
QMAKE_CXXFLAGS += $$RCPPWARNING $$RCPPFLAGS $$RCPPINCL $$RINSIDEINCL
QMAKE_LFLAGS += $$RLDFLAGS $$RBLAS $$RLAPACK $$RCPPLIBS $$RINSIDELIBS
QMAKE_CXXFLAGS_WARN_OFF += -Wunused-parameter
What did I miss?

Compiling Qt 5.3 for arm with OpenGL ES 2.0 support gives "cannot find -lGLESv2"

I am compiling Qt 5.3 for ARM with following qmake.conf :
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
load(device_config)
QT_QPA_DEFAULT_PLATFORM = eglfs
# modifications to g++.conf
QMAKE_CC = $${CROSS_COMPILE}gcc
QMAKE_CXX = $${CROSS_COMPILE}g++
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
# modifications to linux.conf
QMAKE_AR = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip
COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp
#modifications to gcc-base.conf
QMAKE_CFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_LIBS += -lrt -lpthread -ldl
# Extra stuff (OpenGL, DirectFB, ...)
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include:/usr/arm-linux-gnueabi/include/
QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib:/usr/arm-linux-gnueabi/lib/:/usr/lib/x86_64-linux-gnu/
QMAKE_INCDIR_OPENGL = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENGL = $${QMAKE_LIBDIR_EGL}
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL}
QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}
# Sanity check
deviceSanityCheckCompiler()
load(qt_config)
I have OpenGL ES dev packages installed
ii libgles2-mesa:amd64 10.3.0~git20140618.88b887fa-0ubuntu0ricotz~trusty amd64 free implementation of the OpenGL|ES 2.x API -- runtime
ii libgles2-mesa-dbg:amd64 10.3.0~git20140618.88b887fa-0ubuntu0ricotz~trusty amd64 free implementation of the OpenGL|ES 2.x API -- debugging symbols
ii libgles2-mesa-dev 10.3.0~git20140618.88b887fa-0ubuntu0ricotz~trusty amd64 free implementation of the OpenGL|ES 2.x API -- development files
After running my configure :
configure -opengl es2 -skip qtwebkit -skip qtdeclarative -no-sse4.2 -no-sse4.1 -no-sse3 -no-sse2 -no-cups -no-openssl -no-kms -no-nis -no-pch -no-mips_dspr2 -no-mips_dsp -no-accessibility -opensource -confirm-license -device-option CROSS_COMPILE=arm-linux-gnueabi- -no-xcb -qt-zlib -qt-libjpeg -qt-libpng -prefix ~/programming/tools/qt/qt-arm-5.3 -platform linux-g++ -xplatform linux-arm-gnueabi-g++ -device linux-arm-cortex9-mine-g++ -v
I get the following in the end :
OpenGL ES 2.x auto-detection... ()
arm-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -O2 -O3 -Wall -W -fPIE -I/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/mkspecs/devices/linux-arm-cortex9-mine-g++ -I/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/config.tests/unix/opengles2 -I/usr/include:/usr/arm-linux-gnueabi/include/ -I. -o opengles2.o /home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/config.tests/unix/opengles2/opengles2.cpp
arm-linux-gnueabi-g++ -Wl,-O1 -o opengles2 opengles2.o -lrt -lpthread -ldl -lGLESv2 -lEGL -lIMGegl -lsrv_um
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lGLESv2
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lEGL
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lIMGegl
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lsrv_um
collect2: error: ld returned 1 exit status
make: *** [opengles2] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/USER/programming/tools/qt/qt-everywhere-opensource-src-5.3.0/qtbase/mkspecs/devices/linux-arm-cortex9-mine-g++.
My libs are located in here (I think that is what it is looking for) :
$ ll /usr/lib/x86_64-linux-gnu/libGLESv2.so
lrwxrwxrwx 1 root root 21 cze 18 08:38 /usr/lib/x86_64-linux-gnu/libGLESv2.so -> mesa-egl/libGLESv2.so
I was trying to link x86 libraries for my ARM build and in my own ignorance I didn't know that OpenGL is just a standard therefore there are only headers available.
So the solution for my problem would be to compile some OpenGL ES implementation e.g. mesa3d for ARM and then link those binaries to Qt.

Resources