Trying to build Qt 5.5.1 on Ubuntu 18.04
-
Hello everyone.
Sorry for the over-abused question but I'm not able to successfully build Qt 5.5.1 on my Ubuntu 18.04 laptop (I need this specific version because of dependencies with other software).
System configuration:
- Ubuntu 18.04.2 LTS bionic
- gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
- GNU Make 4.1 built for x86_64-pc-linux-gnu
- Postgres 9.6.2 (libs)
- Qt 5.5.1
- OpenSSL 1.0.2r
- No leveldb folder under qtwebkit/Tools/qmake/config.tests
- Using make -j4
- Python 2.7.15rc1 [GCC 7.3.0]
Configure settings:
./configure -opensource -confirm-license -qt-sql-psql -qt-sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -release -nomake examples -nomake tests -openssl -I /usr/local/ssl/include -L /usr/local/ssl/lib -I /usr/local/postgres/9.6.12/include -L /usr/local/postgres/9.6.12/lib -qt-xcb -no-use-gold-linker
Error:
API/JSStringRef.cpp: In function ‘OpaqueJSString* JSStringCreateWithCharacters(const JSChar*, size_t)’: API/JSStringRef.cpp:40:50: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive] return OpaqueJSString::create(chars, numChars).leakRef(); ^ In file included from API/JSStringRef.cpp:31:0: API/OpaqueJSString.h:49:39: note: initializing argument 1 of ‘static WTF::PassRefPtr<OpaqueJSString> OpaqueJSString::create(const UChar*, unsigned int)’ static PassRefPtr<OpaqueJSString> create(const UChar* characters, unsigned length) ^~~~~~ API/JSStringRef.cpp: In function ‘OpaqueJSString* JSStringCreateWithCharactersNoCopy(const JSChar*, size_t)’: API/JSStringRef.cpp:65:125: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive] return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef(); ^ In file included from ../WTF/wtf/text/WTFString.h:29:0, from API/OpaqueJSString.h:30, from API/JSStringRef.cpp:31: ../WTF/wtf/text/StringImpl.h:431:57: note: initializing argument 1 of ‘static WTF::PassRefPtr<WTF::StringImpl> WTF::StringImpl::createWithoutCopying(const UChar*, unsigned int, WTF::HasTerminatingNullCharacter)’ WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> createWithoutCopying(const UChar* characters, unsigned length, HasTerminatingNullCharacter); ^~~~~~~~~~~~~~~~~~~~ API/JSStringRef.cpp: In function ‘const JSChar* JSStringGetCharactersPtr(JSStringRef)’: API/JSStringRef.cpp:86:30: error: invalid conversion from ‘const UChar* {aka const char16_t*}’ to ‘const JSChar* {aka const short unsigned int*}’ [-fpermissive] return string->characters(); ~~~~~~~~~~~~~~~~~~^~ make[3]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit/Source/JavaScriptCore' Makefile.JavaScriptCore:98: recipe for target 'sub-Target-pri-make_first-ordered' failed make[2]: *** [sub-Target-pri-make_first-ordered] Error 2 make[2]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit/Source/JavaScriptCore' Makefile:93: recipe for target 'sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered' failed make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered] Error 2 make[1]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1-8/qtwebkit' Makefile:490: recipe for target 'module-qtwebkit-make_first' failed make: *** [module-qtwebkit-make_first] Error 2
Extra question(s): are there any know issues by using make -jX? can warnings be disabled? (using -w does nothing)
I'm out of ideas, any thoughts?
Thanks in advance.
Further investigations:
#1 Maybe it's something related to ICU but I'm still not sure.
#2 Applied patch found in QTBUG-35971 to no avail
#3 Applied patch found here.. testing
#4 Compiled with no errors with the aforementioned patch, but getting errors on install (see post) -
Hi and welcome to the forums
Yes. Seems to something with ICU
https://bugreports.qt.io/browse/QTBUG-35971
and webkit -
Hi and welcome to devnet,
Before losing too much time with it, do you really need to build QtWebkit ?
-
Hi, yes, I need QtWebkit. :(
Small update: I applied the patch mentioned in the original post and it compiled with no errors.
Unfortunately after launching make install I get the following errors
compiler_version.py failed to execute: c++ -dumpversion 'NoneType' object has no attribute 'group' Exception: Failed to extract compiler version for args: ['host', 'compiler'] Traceback (most recent call last): File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 484, in CallLoadTargetBuildFile includes, depth, check, False) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 399, in LoadTargetBuildFile build_file_data, PHASE_EARLY, variables, build_file_path) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1193, in ProcessVariablesAndConditionsInDict variables, build_file, 'variables') File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict ProcessConditionsInDict(the_dict, phase, variables, build_file) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict variables, build_file) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1245, in ProcessVariablesAndConditionsInDict ProcessConditionsInDict(the_dict, phase, variables, build_file) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1124, in ProcessConditionsInDict variables, build_file) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 1200, in ProcessVariablesAndConditionsInDict expanded = ExpandVariables(value, phase, variables, build_file) File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/tools/gyp/pylib/gyp/input.py", line 897, in ExpandVariables replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip() File "/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/3rdparty/chromium/build/compiler_version.py", line 122, in DoMain raise Exception("Failed to extract compiler version for args: %s" % args) Exception: Failed to extract compiler version for args: ['host', 'compiler'] Project ERROR: -- running gyp_qtwebengine failed -- Makefile:71: recipe for target 'sub-gyp_run-pro-install_subtargets' failed make[3]: *** [sub-gyp_run-pro-install_subtargets] Error 3 make[3]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src/core' Makefile:60: recipe for target 'sub-core-install_subtargets' failed make[2]: *** [sub-core-install_subtargets] Error 2 make[2]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine/src' Makefile:56: recipe for target 'sub-src-install_subtargets' failed make[1]: *** [sub-src-install_subtargets] Error 2 make[1]: Leaving directory '/home/mastroj/Desktop/src/qt-src-5.5.1p-16/qtwebengine' Makefile:815: recipe for target 'module-qtwebengine-install_subtargets' failed make: *** [module-qtwebengine-install_subtargets] Error 2
Seems something related to Python. For reference I'm using Python 2.7.15rc1 [GCC 7.3.0].
-
That's QtWebEngine that is failing. Which module do you need ? QtWebkit or QtWebEngine ?
-
@mastroj I met similar issue when building CEF(Chromium Embedded Framework). It uses
compiler_version.py
, too.
In my case, near line 54, the below source codes exist:def GetVersion(compiler, tool): tool_output = tool_error = None cache_key = (compiler, tool) cached_version = compiler_version_cache.get(cache_key) if cached_version: return cached_version try: # Note that compiler could be something tricky like "distcc g++". if tool == "compiler": compiler = compiler + " -dumpversion" # 4.6 version_re = re.compile(r"(\d+)\.(\d+)")
Maybe, from g++(or gcc) version 7,
-dumpversion
option shows only major version such as7
, so that the regular expression ofcompiler_version.py
raises an exception because it expects the version including minor one.
So, I modified the option from-dumpversion
to-dumpfullversion
, and then it works well.