Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiling Qt 5.9 - 5.11 on centos 6
QtWS25 Last Chance

Compiling Qt 5.9 - 5.11 on centos 6

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 4.4k 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.
  • Z Offline
    Z Offline
    zaazu
    wrote on 5 Apr 2018, 12:57 last edited by
    #1

    Hello all,
    I have a requirement to use any of Qt 5.9 - 5.11 on Centos 6 and SUSE 11. I have tried to run the precompiled versions on these OSes but, seems that the glibc on these OSes are too old.
    I ended up compiling my own gcc on these machines and then trying to compile Qt, but there are build errors. The dependencies seem to be too new in Qt.

    Has anyone had any luck in doing so? If so, can anyone post the steps here?

    Any help is greatly appreciated.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 5 Apr 2018, 16:20 last edited by
      #2

      Hi
      So the old way for Qt do not work for newer version ?
      https://wiki.qt.io/How_to_Install_Qt_5_and_Qwt_on_CentOS_6

      Also, its very hard to help without the actual build errors.

      Anyway, do you need to RUN a Qt app on centOS or do you need
      to actual develop on the Cent ?

      1 Reply Last reply
      2
      • Z Offline
        Z Offline
        zaazu
        wrote on 6 Apr 2018, 13:23 last edited by zaazu 4 Jun 2018, 14:35
        #3

        I am trying to build Qt again with scl developer toolset with gcc 6.x, shall report all the errors that I encounter.

        I want to develop on the newer distributions and deploy on the oldest possible.

        Steps:

        sudo yum install centos-release-scl automake autoconf gettext
        sudo yum install devtoolset-6
        scl enable devtoolset-6 bash
        
        sudo yum install gtkglext-devel gtkglext-libs mesa-libGLw
        
        su - -c "yum --enablerepo=updates install libxcb libxcb-devel xcb-util xcb-util-devel xcb-util-*-devel libX11-devel libXrender-devel libXi-devel"
        
        sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel
        su - -c "yum install flex bison gperf libicu-devel libxslt-devel ruby"
        sudo yum install libgcrypt-devel libgcrypt pciutils-devel nss-devel libXtst-devel gperf cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby gcc-c++ dbus libXrandr-devel libXcomposite-devel libXcursor-devel dbus-devel fontconfig-devel
        
        git clone git://gitorious.org/qt/qt5.git qt5
        cd qt5
        git checkout 5.11
        perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine 
        ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license
        make -j 2
        

        Error (compiling qt 5.11, gcc 6)

        qevdevgamepadbackend.cpp: In member function ‘void QEvdevGamepadDevice::resetConfiguration()’:
        qevdevgamepadbackend.cpp:270:18: error: ‘BTN_TRIGGER_HAPPY1’ was not declared in this scope
             m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft;
                          ^~~~~~~~~~~~~~~~~~
        qevdevgamepadbackend.cpp:271:18: error: ‘BTN_TRIGGER_HAPPY2’ was not declared in this scope
             m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight;
                          ^~~~~~~~~~~~~~~~~~
        qevdevgamepadbackend.cpp:272:18: error: ‘BTN_TRIGGER_HAPPY3’ was not declared in this scope
             m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp;
                          ^~~~~~~~~~~~~~~~~~
        qevdevgamepadbackend.cpp:273:18: error: ‘BTN_TRIGGER_HAPPY4’ was not declared in this scope
             m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown;
                          ^~~~~~~~~~~~~~~~~~
        
        

        Build env:

        gcc version 6.3.1 20170216 (Red Hat 6.3.1-3) (GCC)
        git version 2.17.0
        cmake version 3.11.0-rc3
        perl, v5.10.1 
        Python 2.6.6
        
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 6 Apr 2018, 20:40 last edited by
          #4

          Hi and welcome to devnet,

          Looks like what is talked in this mailing list thread.

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

          Z 1 Reply Last reply 11 Apr 2018, 15:11
          3
          • Z Offline
            Z Offline
            zaazu
            wrote on 9 Apr 2018, 07:11 last edited by
            #5

            Thanks.. I shall try building without gamepad support and report.

            1 Reply Last reply
            0
            • S SGaist
              6 Apr 2018, 20:40

              Hi and welcome to devnet,

              Looks like what is talked in this mailing list thread.

              Z Offline
              Z Offline
              zaazu
              wrote on 11 Apr 2018, 15:11 last edited by
              #6

              @SGaist
              so, I tried further and had some glitches with gamepad module. I removed it from build.
              Not I am having the following problem:

              make[3]: Entering directory '/DATA/qt5.11_build/qtremoteobjects/src/remoteobjects'
              rm -f libQt5RemoteObjects.so.5.11.0 libQt5RemoteObjects.so libQt5RemoteObjects.so.5 libQt5RemoteObjects.so.5.11
              g++ -Wl,--no-undefined -Wl,--version-script,QtRemoteObjects.version -fuse-ld=gold -Wl,--enable-new-dtags -Wl,--gdb-index -Wl,-z,origin -Wl,-rpath,\$ORIGIN -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5RemoteObjects.so.5 -o libQt5RemoteObjects.so.5.11.0 .obj/qconnectionfactories.o .obj/qconnection_local_backend.o .obj/qconnection_tcpip_backend.o .obj/qremoteobjectabstractitemmodeladapter.o .obj/qremoteobjectabstractitemmodelreplica.o .obj/qremoteobjectdynamicreplica.o .obj/qremoteobjectnode.o .obj/qremoteobjectpacket.o .obj/qremoteobjectpendingcall.o .obj/qremoteobjectregistry.o .obj/qremoteobjectregistrysource.o .obj/qremoteobjectreplica.o .obj/qremoteobjectsettingsstore.o .obj/qremoteobjectsource.o .obj/qremoteobjectsourceio.o .obj/qtremoteobjectglobal.o .obj/moc_qremoteobjectabstractitemmodelreplica.o .obj/moc_qremoteobjectregistry.o .obj/moc_qremoteobjectreplica.o .obj/moc_qtremoteobjectglobal.o .obj/moc_qconnectionfactories_p.o .obj/moc_qconnection_local_backend_p.o .obj/moc_qconnection_tcpip_backend_p.o .obj/moc_qremoteobjectabstractitemmodeladapter_p.o .obj/moc_qremoteobjectabstractitemmodelreplica_p.o .obj/moc_qremoteobjectpendingcall_p.o .obj/moc_qremoteobjectregistrysource_p.o .obj/moc_qremoteobjectsettingsstore.o .obj/moc_qremoteobjectsourceio_p.o  -L/DATA/qt5.11_build/qtbase/lib -lQt5Network -lQt5Core -lpthread  
              /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld.gold: error: QtRemoteObjects.version:1:1: syntax error, unexpected $end, expecting STRING or QUOTED_STRING or '{'
              /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld.gold: fatal error: unable to parse version script file QtRemoteObjects.version
              collect2: error: ld returned 1 exit status
              
              

              Any help is appreciated.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 11 Apr 2018, 15:33 last edited by
                #7

                Hi
                You could also skip that too
                Qt RemoteObjects is new module and if you dont need it,
                you wont be missing any features in rest of Qt.

                1 Reply Last reply
                3
                • M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 11 Apr 2018, 18:04 last edited by
                  #8

                  @zaazu said in Compiling Qt 5.9 - 5.11 on centos 6:

                  I want to develop on the newer distributions and deploy on the oldest possible.

                  Oh, just as a note.
                  Im running Qt app on extremely old knoppix. (2003)
                  by simply using the
                  export LD_LIBRARY_PATH
                  http://doc.qt.io/qt-5/linux-deployment.html
                  "trick" and gave it some newer system SO files needed
                  that was way to old in the distro.
                  That was Qt5.5 though. Not sure if Qt5.10 is as easy to get running
                  by simply throwing missing stuff at it.
                  Note that my use case is single user, and as far as i know
                  LD_LIBRARY_PATH export is sub optimal on real user systems in regards to
                  update and maintenance.

                  The app was build in a pretty new linux mint and it was just to test Qt with my old runtime and there might have issues i didnt see :)

                  1 Reply Last reply
                  1
                  • Z Offline
                    Z Offline
                    zaazu
                    wrote on 12 Apr 2018, 12:55 last edited by zaazu 4 Dec 2018, 12:58
                    #9

                    Thanks all,
                    Have been able to compile qt with qml after I removed the following modules (pasting my configure options here..)

                    ./configure -opensource -nomake examples -nomake tests -confirm-license -skip qtgamepad -skip qtcanvas3d -skip qtdatavis3d -skip qtlocation  -skip qtmultimedia  -skip qtpurchasing  -skip qtscript -skip qtsensors   -skip qtserialbus -skip qtserialport -skip qtspeech  -skip qtvirtualkeyboard  -skip qtwinextras  -skip remoteobjects -skip qtscxml  -skip qtwebsockets  -prefix /usr/local/qt
                    

                    Shall try to run apps and find out if the compiled binaries run at all. Tried to open designer, that opens well though.

                    @mrjj, my approach would be to add LD_LIBRARY_PATH, QT_LIB_PATH etc in the startup script of the application.
                    A second approach is to set the rpaths, but as far as I have read online, setting only rpaths dont work.

                    1 Reply Last reply
                    0

                    8/9

                    11 Apr 2018, 18:04

                    • Login

                    • Login or register to search.
                    8 out of 9
                    • First post
                      8/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved