Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building v5.9.7 from source errors and fails.
Forum Updated to NodeBB v4.3 + New Features

Building v5.9.7 from source errors and fails.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 3 Posters 503 Views 2 Watching
  • 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.
  • P Offline
    P Offline
    Paidoo
    wrote on last edited by
    #1

    Hi,

    I am trying to build Qt5 v5.9.7 from source inside a Singularity container, under AlmaLinux 8.7.

    I am following the instructions here.

    Summary of the commands used:

    dnf install perl-version git gcc-c++ compat-openssl10 openssl-devel harfbuzz-devel double-conversion-devel libzstd-devel at-spi2-atk-devel dbus-devel mesa-libGL-devel xcb-util libxkbcommon-devel
    
    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout tags/v5.9.7 -b v5.9.7
    ./init-repository --module-subset=essential,addon,-qtwebengine
    
    mkdir /qt5_build && cd /qt5_build
    ../qt5/configure -developer-build -opensource -nomake examples -nomake tests --confirm-license
    
    make -j 18
    
    

    The build fails, giving me the following errors:

    /root/qt5/qtbase/src/gui/painting/qoutlinemapper.cpp: In member function 'QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)':
    /root/qt5/qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QPointF' from an array of 'const qreal' {aka 'const double'} [-Werror=class-memaccess]
                 memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));
                                                                                ^
    In file included from ../../include/QtCore/qpoint.h:1,
                     from ../../include/QtGui/../../../../qt5/qtbase/src/gui/kernel/qguiapplication.h:48,
                     from ../../include/QtGui/qguiapplication.h:1,
                     from /root/qt5/qtbase/src/gui/kernel/qt_gui_pch.h:68:
    ../../include/QtCore/../../../../qt5/qtbase/src/corelib/tools/qpoint.h:219:21: note: 'class QPointF' declared here
     class Q_CORE_EXPORT QPointF
                         ^~~~~~~
    
    /root/qt5/qtbase/src/gui/painting/qpainter.cpp: In member function 'void QPainterPrivate::drawGlyphs(const quint32*, QFixedPoint*, int, QFontEngine*, bool, bool, bool)':
    /root/qt5/qtbase/src/gui/painting/qpainter.cpp:5625:68: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type
    struct QFixed'; use assignment or value-initialization instead [-Werror=class-memaccess]
             memset(advances.data(), 0, advances.size() * sizeof(QFixed));
                                                                        ^
    In file included from ../../include/QtGui/5.9.7/QtGui/private/qfixed_p.h:1,
                     from ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/text/qfont_p.h:61,
                     from ../../include/QtGui/5.9.7/QtGui/private/qfont_p.h:1,
                     from ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/text/qtextengine_p.h:60,
                     from ../../include/QtGui/5.9.7/QtGui/private/qtextengine_p.h:1,
                     from ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/text/qfontengine_p.h:59,
                     from ../../include/QtGui/5.9.7/QtGui/private/qfontengine_p.h:1,
                     from /root/qt5/qtbase/src/gui/painting/qpainter.cpp:65:
    ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/painting/qfixed_p.h:61:8: note: 'struct QFixed' declared here
     struct QFixed {
            ^~~~~~
    /root/qt5/qtbase/src/gui/painting/qpainter.cpp:5626:103: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct QGlyphJustification'; use assignment or value-initialization instead [-Werror=class-memaccess]
             memset(glyphJustifications.data(), 0, glyphJustifications.size() * sizeof(QGlyphJustification));
                                                                                                           ^
    In file included from ../../include/QtGui/5.9.7/QtGui/private/qtextengine_p.h:1,
                     from ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/text/qfontengine_p.h:59,
                     from ../../include/QtGui/5.9.7/QtGui/private/qfontengine_p.h:1,
                     from /root/qt5/qtbase/src/gui/painting/qpainter.cpp:65:
    ../../include/QtGui/5.9.7/QtGui/private/../../../../../../../qt5/qtbase/src/gui/text/qtextengine_p.h:158:8: note: 'struct QGlyphJustification' declared here
     struct QGlyphJustification
            ^~~~~~~~~~~~~~~~~~~
    cc1plus: all warnings being treated as errors
    make[3]: *** [Makefile:66910: .obj/qpainter.o] Error 1
    make[3]: Leaving directory '/root/qt5_build/qtbase/src/gui'
    make[2]: *** [Makefile:500: sub-gui-make_first] Error 2
    make[2]: Leaving directory '/root/qt5_build/qtbase/src'
    make[1]: *** [Makefile:49: sub-src-make_first] Error 2
    make[1]: Leaving directory '/root/qt5_build/qtbase'
    make: *** [Makefile:79: module-qtbase-make_first] Error 2
    

    I have tried to search online, but been unable to find a solution. Any help would be deeply appreciated!


    In case context is helpful:

    I am trying to create a singularity container as a common development environment. In my case Qt5 is a dependency of Geant4, which is the application I ultimately need. Specifically: Qt5Core, Qt5Gui Qt5Widgets, Qt5OpenGL, and Qt5PrintSupport

    I need this container to be able to run on a CentOS7 cluster, which is running with the following kernel:

    uname -r
    3.10.0-1160.76.1.el7.x86_64
    

    When I try to run my compiled package (specifically on CentOS7) I receive the following error:

    error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
    

    libQt5Core.so.5 is in place, and the container works on 'more modern' hosts. Searching online I discovered that Qt5 v5.15, libQt5Core.so.5 requires linux kernel >v3.15.0.

    The CentOS7 host has Qt v5.9.7 installed, and therefore I am trying to build this from source in my container to impose compatibility with the v3.10 kernel.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Why not use the Qt development packages from that distribution ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      P 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Why not use the Qt development packages from that distribution ?

        P Offline
        P Offline
        Paidoo
        wrote on last edited by
        #3

        @SGaist thanks for your reply.

        Do you mean why not use the development packages available on AlmaLinux via dnf?

        If so, due to the bug I explain at the bottom of my post. I need an older version of Qt5 from before whenever the kernel dependency was introduced.

        If not, please excuse my density, and can I ask you to elaborate? :)

        SGaistS 1 Reply Last reply
        0
        • P Paidoo

          @SGaist thanks for your reply.

          Do you mean why not use the development packages available on AlmaLinux via dnf?

          If so, due to the bug I explain at the bottom of my post. I need an older version of Qt5 from before whenever the kernel dependency was introduced.

          If not, please excuse my density, and can I ask you to elaborate? :)

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Paidoo I may have misunderstood you. You want a CentOS based image to execute on Alma Linux using singularity ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          P 1 Reply Last reply
          0
          • SGaistS SGaist

            @Paidoo I may have misunderstood you. You want a CentOS based image to execute on Alma Linux using singularity ?

            P Offline
            P Offline
            Paidoo
            wrote on last edited by
            #5

            @SGaist Not quite, I am sorry for being unclear.

            I am trying to create a modern(-ish) development environment to be used on a cluster that is currently stuck on CentOS7 (that I have no control over).

            I have created a working image, but it uses Qt5-v5.15, as this is what is available on modern distributions. Qt5-v5.15 is incompatible with linux kernel <v3.15. The cluster has kernel v3.10.

            To try and get around this, I am attempting to compile Qt5-v5.9.7 inside my container (running AlmaLinux8), as I know this does not contain whatever change broke Qt5 on the old kernel.

            When trying to compile it, the compilation crashes with the errors given above and here I am.

            I hope this clarifies!

            Christian EhrlicherC 1 Reply Last reply
            0
            • P Paidoo

              @SGaist Not quite, I am sorry for being unclear.

              I am trying to create a modern(-ish) development environment to be used on a cluster that is currently stuck on CentOS7 (that I have no control over).

              I have created a working image, but it uses Qt5-v5.15, as this is what is available on modern distributions. Qt5-v5.15 is incompatible with linux kernel <v3.15. The cluster has kernel v3.10.

              To try and get around this, I am attempting to compile Qt5-v5.9.7 inside my container (running AlmaLinux8), as I know this does not contain whatever change broke Qt5 on the old kernel.

              When trying to compile it, the compilation crashes with the errors given above and here I am.

              I hope this clarifies!

              Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I would guess the gcc is to new for this.
              Either downgrade gcc or look at the git history of the affected sources to see if there is a fix for this which you can apply to 5.9

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              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 Extensions
              • Unsolved