Qt5 (Fedora 18) - Cannot find -lGL



  • Hi all,

    Today I downloaded and installed the latest Qt5.0.2 on a fresh Fedora 18 system. I am currently attempting to build and run the "camera" example application and am getting the following error:

    @g++ -m64 -Wl,-rpath,/home/njozwiak/Qt5.0.2/5.0.2/gcc_64 -Wl,-rpath,/home/njozwiak/Qt5.0.2/5.0.2/gcc_64/lib -Wl,-rpath-link,/home/njozwiak/Qt5.0.2/5.0.2/gcc_64/lib -o camera main.o camera.o imagesettings.o videosettings.o moc_camera.o moc_imagesettings.o moc_videosettings.o -L/usr/X11R6/lib64 -L/home/njozwiak/Qt5.0.2/5.0.2/gcc_64/lib -lQt5MultimediaWidgets -lQt5Multimedia -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [camera] Error 1
    17:33:30: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project camera (kit: Desktop Qt 5.0.2 GCC 64bit)
    When executing step 'Make'@

    As this is a brand new machine I ran an initial:

    @sudo yum groupinstall "Development Tools"@

    Then I attempted to install all relevant OpenGL packages. Here is what I have installed:

    @Package mesa-libGL-9.1-3.fc18.x86_64 already installed and latest version
    Package mesa-libGLU-9.0.0-1.fc18.x86_64 already installed and latest version
    Package mesa-libGLw-6.5.1-13.fc18.x86_64 already installed and latest version
    Package mesa-libOSMesa-9.1-3.fc18.x86_64 already installed and latest version
    Package mesa-libGL-devel-9.1-3.fc18.x86_64 already installed and latest version--
    Package mesa-libGLU-devel-9.0.0-1.fc18.x86_64 already installed and latest version
    Package mesa-libGLw-devel-6.5.1-13.fc18.x86_64 already installed and latest version
    Package mesa-libOSMesa-devel-9.1-3.fc18.x86_64 already installed and latest version
    Package libxcb-1.9-1.fc18.x86_64 already installed and latest version
    Package libxcb-devel-1.9-1.fc18.x86_64 already installed and latest version
    Package xcb-util-0.3.8-3.fc18.x86_64 already installed and latest version
    Package xcb-util-devel-0.3.8-3.fc18.x86_64 already installed and latest version
    Package xcb-util-keysyms-devel-0.3.8-4.fc18.x86_64 already installed and latest version
    Package xcb-util-renderutil-devel-0.3.8-2.fc18.x86_64 already installed and latest version
    Package xcb-util-image-devel-0.3.8-4.fc18.x86_64 already installed and latest version
    Package xcb-util-wm-devel-0.3.8-3.fc18.x86_64 already installed and latest version
    Package flex-2.5.36-1.fc18.x86_64 already installed and latest version
    Package bison-2.6.1-1.fc18.x86_64 already installed and latest version
    Package gperf-3.0.4-5.fc18.x86_64 already installed and latest version
    Package libicu-devel-49.1.1-8.fc18.x86_64 already installed and latest version
    Package libxslt-devel-1.1.28-1.fc18.x86_64 already installed and latest version
    Package ruby-1.9.3.392-29.fc18.x86_64 already installed and latest version
    Package alsa-lib-1.0.26-2.fc18.x86_64 already installed and latest version
    Package gstreamer-0.10.36-2.fc18.x86_64 already installed and latest version@

    Any and all libGL* and libGL*-devel packages I can think of... I know I have to be missing something required, but I'm just not sure what. There is a similar post here: http://qt-project.org/forums/viewthread/22848. But the author never says what fixes it... and I have everything installed that pitonyak suggested for running in Fedora 18.

    People keep saying installing the "libglu1-mesa-dev" package resolves this issue for them. But I do not see this package available in Fedora.

    Any help would be appreciated.

    Thanks,
    Nate



  • I use FC18, but have not specifically tried the application you mention.

    I assume that the first thing that you did was "yum whatprovides libGL"

    Notice that I have both 64-bit and 32-bit versions of some of the libraries.

    Don't know if it will help, but:

    @[andy@pitonyak ~]$ rpm -qa | grep -i libGL
    mesa-libglapi-9.1-3.fc18.i686
    mesa-libGLU-devel-9.0.0-1.fc18.x86_64
    mesa-libGL-devel-9.1-3.fc18.x86_64
    mesa-libGLU-9.0.0-1.fc18.x86_64
    mesa-libGLU-9.0.0-1.fc18.i686
    mesa-libGL-devel-9.1-3.fc18.i686
    libglade2-devel-2.6.4-8.fc18.x86_64
    pygtk2-libglade-2.24.0-5.fc18.x86_64
    libgle-3.1.0-7.fc18.x86_64
    libglade2-2.6.4-8.fc18.x86_64
    libGLEW-1.7.0-3.fc18.x86_64
    libglademm24-2.6.7-7.fc18.x86_64
    mesa-libglapi-9.1-3.fc18.x86_64
    libglade2-2.6.4-8.fc18.i686
    mesa-libGLES-9.1-3.fc18.x86_64
    mesa-libGL-9.1-3.fc18.i686
    mesa-libGL-9.1-3.fc18.x86_64@

    Similarly:

    @[andy@pitonyak ~]$ rpm -qa | grep -i mesa
    mesa-libglapi-9.1-3.fc18.i686
    mesa-dri-filesystem-9.1-3.fc18.i686
    mesa-libGLU-devel-9.0.0-1.fc18.x86_64
    mesa-libGL-devel-9.1-3.fc18.x86_64
    mesa-libgbm-9.1-3.fc18.x86_64
    mesa-dri-drivers-9.1-3.fc18.x86_64
    mesa-libGLU-9.0.0-1.fc18.x86_64
    mesa-libGLU-9.0.0-1.fc18.i686
    mesa-libGL-devel-9.1-3.fc18.i686
    mesa-libgbm-9.1-3.fc18.i686
    mesa-libEGL-devel-9.1-3.fc18.x86_64
    mesa-libxatracker-9.1-3.fc18.x86_64
    mesa-dri-filesystem-9.1-3.fc18.x86_64
    mesa-libglapi-9.1-3.fc18.x86_64
    mesa-dri-drivers-9.1-3.fc18.i686
    mesa-libGLES-9.1-3.fc18.x86_64
    mesa-libGL-9.1-3.fc18.i686
    mesa-libGL-9.1-3.fc18.x86_64
    mesa-libEGL-9.1-3.fc18.i686
    mesa-libEGL-9.1-3.fc18.x86_64@



  • The error is caused because although they put a GL library in the /lib directory they forgot to aim a generic link at it.

    For instance, if you have a libGL.so.1.2.0 in your /lib directory, then point a libGL.so symbolic link to it also in the /lib directory.


Log in to reply
 

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