Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Qt on CentOS 7 not working
QtWS25 Last Chance

Qt on CentOS 7 not working

Scheduled Pinned Locked Moved Solved C++ Gurus
8 Posts 2 Posters 4.0k 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.
  • D Offline
    D Offline
    Dino
    wrote on last edited by
    #1

    Dear all,
    I have installed Qt Creator on a CentOS 7 machine but whenever I try to build a program, even the examples one I get the following errors:

    :-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

    :-1: error: skipping incompatible /lib/libGL.so when searching for -lGL

    :-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL

    :-1: error: cannot find -lGL

    :-1: error: collect2: error: ld returned 1 exit status

    Can you please help? It is driving me mad.

    jsulmJ 1 Reply Last reply
    0
    • D Dino

      Dear all,
      I have installed Qt Creator on a CentOS 7 machine but whenever I try to build a program, even the examples one I get the following errors:

      :-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

      :-1: error: skipping incompatible /lib/libGL.so when searching for -lGL

      :-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL

      :-1: error: cannot find -lGL

      :-1: error: collect2: error: ld returned 1 exit status

      Can you please help? It is driving me mad.

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

      @Dino What is the exact Qt version (not QtCreator!) you installed? Is it x86?
      Also, you should execute

      file /lib/libGL.so
      file /usr/lib/libGL.so
      

      and post the output here. It looks like you're mixing x86 and x86_64.

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

      D 1 Reply Last reply
      1
      • D Offline
        D Offline
        Dino
        wrote on last edited by
        #3

        First of all, thank you for your help, jsulm.

        This is the version I have installed: qt-opensource-linux-x64-5.9.0

        And the following is the output requested:

        [root@nelson bin]# file /usr/lib/libGL.so
        /usr/lib/libGL.so: symbolic link to `libGL.so.1'

        [root@nelson bin]# file /usr/lib/libGL.so
        /usr/lib/libGL.so: symbolic link to `libGL.so.1'

        jsulmJ 1 Reply Last reply
        1
        • jsulmJ jsulm

          @Dino What is the exact Qt version (not QtCreator!) you installed? Is it x86?
          Also, you should execute

          file /lib/libGL.so
          file /usr/lib/libGL.so
          

          and post the output here. It looks like you're mixing x86 and x86_64.

          D Offline
          D Offline
          Dino
          wrote on last edited by
          #4

          following the chain...

          [root@nelson bin]# file /usr/lib/libGL.so.1
          /usr/lib/libGL.so.1: symbolic link to `libGL.so.1.0.0'

          file /usr/lib/libGL.so.1.0.0
          /usr/lib/libGL.so.1.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

          indeed is look like I am mixing 32-bit and 64-bit but I do not know how to fix the problem. I am a novice on using Qt and CentOS 7

          1 Reply Last reply
          0
          • D Dino

            First of all, thank you for your help, jsulm.

            This is the version I have installed: qt-opensource-linux-x64-5.9.0

            And the following is the output requested:

            [root@nelson bin]# file /usr/lib/libGL.so
            /usr/lib/libGL.so: symbolic link to `libGL.so.1'

            [root@nelson bin]# file /usr/lib/libGL.so
            /usr/lib/libGL.so: symbolic link to `libGL.so.1'

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

            @Dino You need to install the x64 OpenGL packages.

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

            1 Reply Last reply
            1
            • D Offline
              D Offline
              Dino
              wrote on last edited by
              #6

              Dear jsulm,

              I have listed installed packages and find out I have already the right OpenGL installed:

              mesa-dri-drivers.x86_64 11.2.2-2.20160614.el7 @base
              mesa-filesystem.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libEGL.i686 11.2.2-2.20160614.el7 @base
              mesa-libEGL.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libEGL-devel.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libGL.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libGL-devel.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libGLES.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libGLU.x86_64 9.0.0-4.el7 @anaconda
              mesa-libGLU-devel.x86_64 9.0.0-4.el7 @base
              mesa-libgbm.i686 11.2.2-2.20160614.el7 @base
              mesa-libgbm.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libglapi.x86_64 11.2.2-2.20160614.el7 @base
              mesa-libxatracker.x86_64 11.2.2-2.20160614.el7 @base
              mesa-private-llvm.x86_64

              I have removed the 32-bit ones that also were in the system but I still get the compiler error. It looks like is skipping the files refusing to use them:

              :-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

              Is there a way to 'force' Qt to use them?

              jsulmJ 1 Reply Last reply
              0
              • D Dino

                Dear jsulm,

                I have listed installed packages and find out I have already the right OpenGL installed:

                mesa-dri-drivers.x86_64 11.2.2-2.20160614.el7 @base
                mesa-filesystem.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libEGL.i686 11.2.2-2.20160614.el7 @base
                mesa-libEGL.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libEGL-devel.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libGL.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libGL-devel.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libGLES.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libGLU.x86_64 9.0.0-4.el7 @anaconda
                mesa-libGLU-devel.x86_64 9.0.0-4.el7 @base
                mesa-libgbm.i686 11.2.2-2.20160614.el7 @base
                mesa-libgbm.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libglapi.x86_64 11.2.2-2.20160614.el7 @base
                mesa-libxatracker.x86_64 11.2.2-2.20160614.el7 @base
                mesa-private-llvm.x86_64

                I have removed the 32-bit ones that also were in the system but I still get the compiler error. It looks like is skipping the files refusing to use them:

                :-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

                Is there a way to 'force' Qt to use them?

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

                @Dino Qt is not the problem here.
                Where are the x86_64 OpenGL libs located?

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

                1 Reply Last reply
                2
                • D Offline
                  D Offline
                  Dino
                  wrote on last edited by
                  #8

                  Dear jsulm,

                  In the end, it was indeed a mess with 32-bit and 64-bit libraries.

                  To fix my problems I have to uninstall all version of Qt on my machine and all OpenGL libraries. Then I have installed the latest version of Qt and the mesa-libGL-devel-11.2.2-2.20160614.el7.x86_64.rpm package.

                  Again thank you for your help.

                  Kind Regards,

                  Dino

                  1 Reply Last reply
                  1

                  • Login

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