If I try running make with CXXFLAGS="-std=c++98", it throws the error: "You must build your code with position independent code if Qt was built with -reduce-relocations." "Compile your code with -fPIC (-fPIE is not enough)."
If I try running make with CXXFLAGS="-std=c++98 -fPIC" , it can't locate numerous header files in the source tree (i.e. jpeglib.h), so that didn't help.
Compiling Qt 5.5.1 by the c++11 standard: make has been failing with error in the qtwebkit module: "invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive]"
There are a lot of people asking for help on this same problem on help forums, across platforms, with no useful answers. The problem is also mentioned for Qt 5.9. Some are claiming it is related to the release of ICU 59, some are posting about this in late 2017, or thereabouts (as in, International Components for Unicode for those like me who didn't know that). There are supposedly some bugfixes out there but the various links I found were all broken.
I found this from
http://site.icu-project.org/download/59:
"With the move to C++11, ICU4C has also moved to char16_t as the type for UTF-16 code units and string pointers.
This is a breaking change.
Why are we breaking your code?
With C++11 finally supported by all ICU platforms, this is the first time that a C++ standard type is available for UTF-16, together with u"syntax for string literals" which have type const char16_t *.
ICU's mission is to be the premier Unicode and i18n library, and we want ICU to “play nice” with the new standard C++ UTF-16 type and strings."
So basically Qt 5.5 uses 'const UChar*' declarations, which was compatible with ICU when it was released in 2015. But since ICU has changed to 'const char16_t*' declarations, breaking Qt 5.5. As far as I can tell. Maybe a real programmer out there can shine some light on this...
Maybe I can just do a massive "find and replace" from JChar* to UChar* on the entire source, but that's a lot of work :)