Cannot Build Qt5.14 from Git on Centos7.9
-
Hi everyone, I'm trying to build Qt5.14 on my new Centos7.9 virtual machine. To do that, I followed the instructions here. But at the building step (make -j$(nproc)), I got an error:
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_algo.h:60:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/algorithm:62, from ../../include/QtCore/../../../../qt5/qtbase/src/corelib/global/qglobal.h:142, from ../../include/QtCore/qglobal.h:1, from ../../include/QtGui/../../../../qt5/qtbase/src/gui/kernel/qtguiglobal.h:43, from ../../include/QtGui/qtguiglobal.h:1, from /home/myUsr/qt5/qtbase/src/gui/text/qabstracttextdocumentlayout.h:43: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/algorithmfwd.h:504:39: error: expected nested-name-specifier before ‘_Compare’ template<typename _RAIter, typename _Compare> ^~~~~~~~ In file included from /home/myUsr/qt5/qtbase/src/gui/text/qabstracttextdocumentlayout.h:1:0: Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. The bug is not reproducible, so it is likely a hardware or OS problem.
I have already done this:
$ export LLVM_INSTALL_DIR=/usr/llvm
and this:
$ ../qt5/configure -developer-build -opensource -nomake examples -nomake tests
I repeated the whole process from scratch (by make clean and than make again) but nothing worked.
I also tried gmake and make other than make -j$(nproc) -
Hi everyone, I'm trying to build Qt5.14 on my new Centos7.9 virtual machine. To do that, I followed the instructions here. But at the building step (make -j$(nproc)), I got an error:
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_algo.h:60:0, from /opt/rh/devtoolset-7/root/usr/include/c++/7/algorithm:62, from ../../include/QtCore/../../../../qt5/qtbase/src/corelib/global/qglobal.h:142, from ../../include/QtCore/qglobal.h:1, from ../../include/QtGui/../../../../qt5/qtbase/src/gui/kernel/qtguiglobal.h:43, from ../../include/QtGui/qtguiglobal.h:1, from /home/myUsr/qt5/qtbase/src/gui/text/qabstracttextdocumentlayout.h:43: /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/algorithmfwd.h:504:39: error: expected nested-name-specifier before ‘_Compare’ template<typename _RAIter, typename _Compare> ^~~~~~~~ In file included from /home/myUsr/qt5/qtbase/src/gui/text/qabstracttextdocumentlayout.h:1:0: Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. The bug is not reproducible, so it is likely a hardware or OS problem.
I have already done this:
$ export LLVM_INSTALL_DIR=/usr/llvm
and this:
$ ../qt5/configure -developer-build -opensource -nomake examples -nomake tests
I repeated the whole process from scratch (by make clean and than make again) but nothing worked.
I also tried gmake and make other than make -j$(nproc)@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
virtual machine
What is the RAM size of your virtual machine?
Internal compiler errors are often caused by out of RAM. -
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
virtual machine
What is the RAM size of your virtual machine?
Internal compiler errors are often caused by out of RAM.@jsulm It is 4096 MB.
-
@jsulm It is 4096 MB.
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
It is 4096 MB.
I would try with more if possible.
-
@JoeCFD I followed the document, hence it is 7.3.1.
-
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
It is 4096 MB.
I would try with more if possible.
@jsulm I just increased the memory but every time I try, I get different errors. So, it fails to build Qt. I ordered a new 8 GB RAM. It will be 16 GB in total. I will try again then with even more memory.
-
@jsulm I just increased the memory but every time I try, I get different errors. So, it fails to build Qt. I ordered a new 8 GB RAM. It will be 16 GB in total. I will try again then with even more memory.
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
I get different errors
Internal compiler errors or something else?
-
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
I get different errors
Internal compiler errors or something else?
@jsulm Yes, I do get internal compiler errors. But also other errors like this, a syntax error which is so weird.
In file included from ../../include/QtCore/qdebug.h:1:0, from ../../include/QtCore/QDebug:1, from /home/myUsr/qt5/qtbase/src/corelib/io/qfileselector.cpp:51: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:142:1: error: ‘har’ does not name a type; did you mean ‘char’? inline QDebug &operator<<(QChar t) { putUcs4(t.unicode()); return maybeSpace(); } ^ char ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h: In member function ‘QDebug& QDebug::operator<<(char16_t)’: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:148:58: error: ambiguous overload for ‘operator<<’ (operand types are ‘QDebug’ and ‘QChar’) inline QDebug &operator<<(char16_t t) { return *this << QChar(ushort(t)); } ~~~~~~^~~~~~~~~~~~~~~~~~~ ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:161:20: note: candidate: QDebug& QDebug::operator<<(const QString&) inline QDebug &operator<<(const QString & t) { putString(t.constData(), uint(t.length())); return maybeSpace(); } ^~~~~~~~ In file included from ../../include/QtCore/qvariant.h:1:0, from /home/myUsr/qt5/qtbase/src/corelib/global/qt_pch.h:70: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qvariant.h:901:22: note: candidate: QDebug operator<<(QDebug, const QVariant&) Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &); ^~~~~~~~ gmake[3]: *** [.obj/qfileselector.o] Error 1 gmake[3]: Leaving directory `/home/myUsr/qt5-build/qtbase/src/corelib' gmake[2]: *** [sub-corelib-make_first] Error 2 gmake[2]: Leaving directory `/home/myUsr/qt5-build/qtbase/src' gmake[1]: *** [sub-src-make_first] Error 2 gmake[1]: Leaving directory `/home/myUsr/qt5-build/qtbase' gmake: *** [module-qtbase-make_first] Error 2
-
@jsulm Yes, I do get internal compiler errors. But also other errors like this, a syntax error which is so weird.
In file included from ../../include/QtCore/qdebug.h:1:0, from ../../include/QtCore/QDebug:1, from /home/myUsr/qt5/qtbase/src/corelib/io/qfileselector.cpp:51: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:142:1: error: ‘har’ does not name a type; did you mean ‘char’? inline QDebug &operator<<(QChar t) { putUcs4(t.unicode()); return maybeSpace(); } ^ char ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h: In member function ‘QDebug& QDebug::operator<<(char16_t)’: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:148:58: error: ambiguous overload for ‘operator<<’ (operand types are ‘QDebug’ and ‘QChar’) inline QDebug &operator<<(char16_t t) { return *this << QChar(ushort(t)); } ~~~~~~^~~~~~~~~~~~~~~~~~~ ../../include/QtCore/../../../../qt5/qtbase/src/corelib/io/qdebug.h:161:20: note: candidate: QDebug& QDebug::operator<<(const QString&) inline QDebug &operator<<(const QString & t) { putString(t.constData(), uint(t.length())); return maybeSpace(); } ^~~~~~~~ In file included from ../../include/QtCore/qvariant.h:1:0, from /home/myUsr/qt5/qtbase/src/corelib/global/qt_pch.h:70: ../../include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qvariant.h:901:22: note: candidate: QDebug operator<<(QDebug, const QVariant&) Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant &); ^~~~~~~~ gmake[3]: *** [.obj/qfileselector.o] Error 1 gmake[3]: Leaving directory `/home/myUsr/qt5-build/qtbase/src/corelib' gmake[2]: *** [sub-corelib-make_first] Error 2 gmake[2]: Leaving directory `/home/myUsr/qt5-build/qtbase/src' gmake[1]: *** [sub-src-make_first] Error 2 gmake[1]: Leaving directory `/home/myUsr/qt5-build/qtbase' gmake: *** [module-qtbase-make_first] Error 2
@kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:
qdebug.h:142:1: error: ‘har’ does not name a type; did
This looks like a typo. You can check what is in line 142 in qdebug.h
How did you get Qt source code? -
First, I cloned Qt 5 git repo, then checked out the version (5.14) and finally did that:
$ perl init-repository --module-subset=default,-qtwebengine,-qtandroidextras,-qtmacextras,-qtpurchasing