Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot Build Qt5.14 from Git on Centos7.9
Qt 6.12 LTS is out! See what's new in the release blog

Cannot Build Qt5.14 from Git on Centos7.9

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 3 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K kimi.raikkonen

    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)

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @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.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    K 1 Reply Last reply
    0
    • jsulmJ jsulm

      @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.

      K Offline
      K Offline
      kimi.raikkonen
      wrote on last edited by
      #3

      @jsulm It is 4096 MB.

      jsulmJ 1 Reply Last reply
      0
      • K kimi.raikkonen

        @jsulm It is 4096 MB.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:

        It is 4096 MB.

        I would try with more if possible.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        K 1 Reply Last reply
        0
        • JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #5

          what is your gcc version?
          gcc --version

          K 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            what is your gcc version?
            gcc --version

            K Offline
            K Offline
            kimi.raikkonen
            wrote on last edited by
            #6

            @JoeCFD I followed the document, hence it is 7.3.1.

            1 Reply Last reply
            0
            • jsulmJ jsulm

              @kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:

              It is 4096 MB.

              I would try with more if possible.

              K Offline
              K Offline
              kimi.raikkonen
              wrote on last edited by
              #7

              @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.

              jsulmJ 1 Reply Last reply
              0
              • K kimi.raikkonen

                @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.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:

                I get different errors

                Internal compiler errors or something else?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                K 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @kimi-raikkonen said in Cannot Build Qt5.14 from Git on Centos7.9:

                  I get different errors

                  Internal compiler errors or something else?

                  K Offline
                  K Offline
                  kimi.raikkonen
                  wrote on last edited by
                  #9

                  @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
                  
                  jsulmJ 1 Reply Last reply
                  0
                  • K kimi.raikkonen

                    @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
                    
                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @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?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kimi.raikkonen
                      wrote on last edited by
                      #11

                      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
                      
                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt
                      • Unsolved