Building Qt on Windows went find, but I'm having some issues on building it on Linux Mint 18. I downloaded qt-everywhere-opensource-src-5.7.0.tar.gz and extracted it to /home/user/Qt-Static/Qt5.7.0/. I then ran configure with the below command:
./configure -platform linux-g++-32 -prefix /home/user/Qt-Static/Qt5.7.0 -static -opensource -confirm-license -opengl desktop -make libs
Initially I got an error:
fatal error: bits/c++config.h: No such file or directory
Searching online I found the solution to this was to install gcc-multilib and g++-multilib. After this when I run configure I get the below output, which contains the error "The OpenGL functionality test failed!"
Creating qmake...
.........................................................................................Done.
Running configuration tests...
checking for C++11... yes.
checking for C++14... yes.
checking for C++1z... yes.
checking for default C++ standard edition... yes.
checking for 64-bit std::atomic... yes.
checking for sse2... yes.
checking for sse3... yes.
checking for ssse3... yes.
checking for sse4_1... yes.
checking for sse4_2... yes.
checking for avx... yes.
checking for avx2... yes.
checking for avx512f... yes.
checking for avx512er... yes.
checking for avx512cd... yes.
checking for avx512pf... yes.
checking for avx512dq... yes.
checking for avx512bw... yes.
checking for avx512vl... yes.
checking for avx512ifma... yes.
checking for avx512vbmi... yes.
checking for ipc_sysv... yes.
checking for zlib... no.
checking for mtdev... no.
checking for libjpeg... no.
checking for libpng... no.
checking for libdl... yes.
checking for DB2... no.
checking for InterBase... no.
checking for MySQL (thread-safe)... no.
checking for MySQL (thread-unsafe)... no.
checking for OCI... no.
checking for ODBC... no.
checking for iODBC... no.
checking for PostgreSQL... no.
checking for SQLite2... no.
checking for TDS... no.
checking for NIS... yes.
checking for Cups... no.
checking for POSIX iconv... yes.
checking for D-Bus... no.
checking for libproxy... no.
checking for Glib... no.
checking for ICU... no.
checking for PulseAudio... no.
checking for OpenGL... no.
The OpenGL functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
/home/user/Qt-Static/Qt5.7.0/qtbase/mkspecs/linux-g++-32.
After this no makefile is generated. Searching for this error I found a number of questions with the same problem, and various suggested solutions, but I couldn't find anything that worked.
I'm completely clueless when it comes to Linux. It appears that I have to set QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL, but I'm not actually sure what to set them to.
Could somebody help me out with this?