Installing On Centos 7



  • Hello I am trying to install QT but I am having a very difficult time doing so. These are the steps I have taken.

    yum install mesa-libGL-devel mesa-libGLU-devel
    yum install qt
    yum install qt-creator

    Then i installed the link below with all default options.
    http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-online.run

    When I go to open up a project I get several error message once I compile. (the project is 100% qt generated code with no modifications)

    :-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../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

    I think this has to do with 64/32 bit but I am not sure what to do here.

    Any help would be greatly appreciated!


  • Lifetime Qt Champion

    Hi,

    For what architecture is your CentOS installed ?



  • @SGaist

    I am on 64 bit centos 7


  • Lifetime Qt Champion

    What does
    file /lib/libGL.so
    return ?



  • [localhost ~]$ file /lib/libGL.so
    /lib/libGL.so: symbolic link to `libGL.so.1'

    [localhost ~]$ file /lib/libGL.so.1
    /lib/libGL.so.1: symbolic link to `libGL.so.346.47'

    [localhost ~]$ file /lib/libGL.so.346.47
    /lib/libGL.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

    also this may help
    [localhost ~]$ uname -r
    3.10.0-123.el7.x86_64


  • Lifetime Qt Champion

    That's a bit puzzling since the installed OpenGL library is 32 bit...



  • You've installed the 32 bit version.



  • It seems that people that install the nvidia driver have this problem with qt.
    The lsymbolic link is pointed to the wrong architecture i think. I found this thread https://www.centos.org/forums/viewtopic.php?f=48&t=48128

    I removed /usr/lib/libGL.so
    and the created
    ln -s libGL.so.1 libGL.so in /usr/lib
    but it still would not compile.


  • Lifetime Qt Champion

    Did you check the architecture of that lib ?



  • @SGaist

    I do appreciate your patients in helping me, I am very new to linux. The best I can tell they are 32 bit targets?

    [localhost lib]$ readelf -h libGL.so.1
    ELF Header:
    Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF32
    Data: 2's complement, little endian
    Version: 1 (current)
    OS/ABI: UNIX - System V
    ABI Version: 0
    Type: DYN (Shared object file)
    Machine: Intel 80386
    Version: 0x1
    Entry point address: 0x4c4b0
    Start of program headers: 52 (bytes into file)
    Start of section headers: 1111752 (bytes into file)
    Flags: 0x0
    Size of this header: 52 (bytes)
    Size of program headers: 32 (bytes)
    Number of program headers: 4
    Size of section headers: 40 (bytes)
    Number of section headers: 15
    Section header string table index: 14


    [localhost lib]$ readelf -h libGL.so
    ELF Header:
    Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF32
    Data: 2's complement, little endian
    Version: 1 (current)
    OS/ABI: UNIX - System V
    ABI Version: 0
    Type: DYN (Shared object file)
    Machine: Intel 80386
    Version: 0x1
    Entry point address: 0x4c4b0
    Start of program headers: 52 (bytes into file)
    Start of section headers: 1111752 (bytes into file)
    Flags: 0x0
    Size of this header: 52 (bytes)
    Size of program headers: 32 (bytes)
    Number of program headers: 4
    Size of section headers: 40 (bytes)
    Number of section headers: 15
    Section header string table index: 14


  • Lifetime Qt Champion

    It really looks like you are running the 32bit version. You can either update your OS with a more recent version or try the 32bit installer.



  • I know I am using 64 bit kernel.
    [localhost]$ uname -m
    x86_64

    But I think the problem is the nvidia driver (which I also installed 64 bit) and it asked me during installation if i wanted to also install the 32bit binaries which i said yes. One of these is has to be the right lib.

    [localhost ~]$ cd /usr/lib
    [localhost lib]$ ls -l libG*
    lrwxrwxrwx. 1 root root 17 Feb 28 13:38 libGLESv1_CM.so -> libGLESv1_CM.so.1
    lrwxrwxrwx. 1 root root 22 Feb 28 13:38 libGLESv1_CM.so.1 -> libGLESv1_CM.so.346.47
    -rwxr-xr-x. 1 root root 43696 Feb 28 13:38 libGLESv1_CM.so.346.47
    lrwxrwxrwx. 1 root root 14 Feb 28 13:38 libGLESv2.so -> libGLESv2.so.2
    lrwxrwxrwx. 1 root root 19 Feb 28 13:38 libGLESv2.so.2 -> libGLESv2.so.346.47
    -rwxr-xr-x. 1 root root 68524 Feb 28 13:38 libGLESv2.so.346.47
    -rw-r--r--. 1 root root 651 Feb 28 13:38 libGL.la
    lrwxrwxrwx. 1 root root 10 Mar 18 13:56 libGL.so -> libGL.so.1
    lrwxrwxrwx. 1 root root 15 Feb 28 13:38 libGL.so.1 -> libGL.so.346.47
    -rwxr-xr-x. 1 root root 1112352 Feb 28 13:38 libGL.so.346.47
    [localhost lib]$

    would the 64bit libGL be called something else? All of these seem to be 32bit.

    [localhost lib]$ file libGLESv1_CM.so.1
    libGLESv1_CM.so.1: symbolic link to libGLESv1_CM.so.346.47' [localhost lib]$ file libGLESv1_CM.so.346.47 libGLESv1_CM.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped [localhost lib]$ file libGLESv1_CM.so.346.47 libGLESv1_CM.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped [localhost lib]$ file libGLESv2.so.2 libGLESv2.so.2: symbolic link tolibGLESv2.so.346.47'
    [localhost lib]$ file libGLESv2.so.346.47
    libGLESv2.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
    [localhost lib]$ file libGLESv2.so.346.47
    libGLESv2.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
    [localhost lib]$ file libGLESv2.so.346.47
    libGLESv2.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
    [localhost lib]$ file libGL.la
    libGL.la: libtool library file, ASCII text
    [localhost lib]$ file libGL.so.1
    libGL.so.1: symbolic link to `libGL.so.346.47'
    [localhost lib]$ file libGL.so.346.47
    libGL.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
    [localhost lib]$ file libGL.so.346.47
    libGL.so.346.47: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped


  • Lifetime Qt Champion

    Generally the libraries have the same name but are located in different folders



  • i see that there is a /usr/lib64 folder

    [localhost lib64]$ ls -l libG*
    lrwxrwxrwx. 1 root root 17 Feb 28 13:38 libGLESv1_CM.so -> libGLESv1_CM.so.1
    lrwxrwxrwx. 1 root root 22 Feb 28 13:38 libGLESv1_CM.so.1 -> libGLESv1_CM.so.346.47
    -rwxr-xr-x. 1 root root 51096 Feb 28 13:38 libGLESv1_CM.so.346.47
    lrwxrwxrwx. 1 root root 14 Feb 28 13:38 libGLESv2.so -> libGLESv2.so.2
    lrwxrwxrwx. 1 root root 19 Mar 1 05:46 libGLESv2.so.2 -> libGLESv2.so.346.47
    -rwxr-xr-x. 1 root root 32920 Sep 25 10:31 libGLESv2.so.2.0.0
    -rwxr-xr-x. 1 root root 75416 Feb 28 13:38 libGLESv2.so.346.47
    -rw-r--r--. 1 root root 656 Feb 28 13:38 libGL.la
    lrwxrwxrwx. 1 root root 14 Feb 28 13:55 libGL.so -> libGL.so.1.2.0
    lrwxrwxrwx. 1 root root 15 Feb 28 13:38 libGL.so.1 -> libGL.so.346.47
    -rwxr-xr-x. 1 root root 1317432 Feb 28 13:38 libGL.so.346.47
    lrwxrwxrwx. 1 root root 15 Mar 1 05:40 libGLU.so -> libGLU.so.1.3.1
    lrwxrwxrwx. 1 root root 15 Feb 28 12:41 libGLU.so.1 -> libGLU.so.1.3.1
    -rwxr-xr-x. 1 root root 524464 Jun 10 2014 libGLU.so.1.3.1

    Is the problem QT config does not know about the 64 bit folder or is the problem the symbolic link in the 32 bit folder?


  • Lifetime Qt Champion

    Good question, but what puzzles is that your system looks like in reverse logic


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.