qt5.9 build failed for Mac OSX Sierra
-
I try to build qt5.9 from source code using -developer-build option. I keep getting the following error:
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
ld: can't map file, errno=22 file '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
when running: g++ -Lbuild /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -o ninja build/ninja.o -lninja
Traceback (most recent call last):
File "/Users/edpack/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 529, in <module>
variables=[('libs', libs)])
File "/Users/edpack/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 160, in build
self._run_command(self._expand(cmd, local_vars))
File "/Users/edpack/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 185, in _run_command
subprocess.check_call(cmdline, shell=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'g++ -Lbuild /usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -o ninja build/ninja.o -lninja' returned non-zero exit status 1
Project ERROR: NINJA build error!
make[3]: *** [sub-ninja-pro-install_subtargets] Error 3
make[2]: *** [sub-buildtools-install_subtargets] Error 2
make[1]: *** [sub-src-install_subtargets] Error 2
make: *** [module-qtwebengine-install_subtargets] Error 2 -
Hi edpack,
Seems similar to this QTBUG-60146
There is a patch attached, so worth having a look there.
-
After I applied the patches, I got even more errors. I don't think the patches are for MAC OSX.
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
./src/clparser.cc:56:53: error: expected expression
transform(path.begin(), path.end(), path.begin(), [](const char c) { r...
^
./src/clparser.cc:64:53: error: expected expression
transform(line.begin(), line.end(), line.begin(), [](const char c) { r...
^
2 errors generated.
when running: g++ -MMD -MT build/clparser.o -MF build/clparser.o.d -g -Wall -Wextra -Wno-deprecated -Wno-missing-field-initializers -Wno-unused-parameter -fno-rtti -fno-exceptions -fvisibility=hidden -pipe '-DNINJA_PYTHON="python"' -O2 -DNDEBUG -fdiagnostics-color -DNINJA_HAVE_BROWSE -I. -c ./src/clparser.cc -o build/clparser.o
Traceback (most recent call last):
File "/Users/xikalin/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 496, in <module>
objs += cxx(name)
File "/Users/xikalin/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 278, in cxx
return n.build(built(name + objext), 'cxx', src(name + '.cc'), **kwargs)
File "/Users/xikalin/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 160, in build
self._run_command(self._expand(cmd, local_vars))
File "/Users/xikalin/Downloads/qt-build/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/ninja/configure.py", line 185, in _run_command
subprocess.check_call(cmdline, shell=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'g++ -MMD -MT build/clparser.o -MF build/clparser.o.d -g -Wall -Wextra -Wno-deprecated -Wno-missing-field-initializers -Wno-unused-parameter -fno-rtti -fno-exceptions -fvisibility=hidden -pipe '-DNINJA_PYTHON="python"' -O2 -DNDEBUG -fdiagnostics-color -DNINJA_HAVE_BROWSE -I. -c ./src/clparser.cc -o build/clparser.o' returned non-zero exit status 1
Project ERROR: NINJA build error!
make[3]: *** [sub-ninja-pro-make_first] Error 3
make[2]: *** [sub-buildtools-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtwebengine-make_first] Error 2