Build error: cannot find -lGL



  • Using Fedora 20 beta

    $ uname -a
    Linux vmf20 3.11.6-301.fc20.x86_64 #1 SMP Mon Oct 21 21:54:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    QtCreator 2.8.1 Based on Qt 5.1.1 (GCC 4.6.1)

    I successfully built this code on a Windows machine and uploaded it to SourceForge.

    Then I created the project on the Fedora 20 machine with ...
    New Project -> Import Project -> Git Repository Clone

    Here is the project file. I don't see anything problematic in there.

    @QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = bits
    TEMPLATE = app

    SOURCES += main.cpp
    hexedit.cpp
    bits.cpp
    bitfield.cpp
    BitButton.cpp
    shiftop.cpp
    formatgroup.cpp

    HEADERS +=
    controlgroup.h
    bits.ui.h
    bits.h
    bitfield.h
    BitButton.h
    hexedit.h
    shiftop.h
    formatgroup.h

    debug {
    DESTDIR = ../debug
    }

    release {
    DESTDIR = ../release
    }
    @


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    This question has been asked many many times on the forum. You are missing the OpenGL dev packages.



  • Yes, fixed the link problem, THANK YOU. And thanks for welcoming me aboard.

    For the benefit of others, the exact command for Fedora was ...
    @ yum install mesa-libGL-devel
    @

    Now, while Qt can now compile my project, I am still getting this complaint from the Qt linker.
    @
    Starting /home/tcamuso/projects/bits/release/bits...
    Gtk-Message: Failed to load module "pk-gtk-module"
    libGL error: failed to load driver: i965
    libGL error: Try again with LIBGL_DEBUG=verbose for more details.
    /home/tcamuso/projects/bits/release/bits exited with code 0
    @

    The build succeeds, but I'm afraid I may run into more problems lalter.

    The command "LIBGL_DEBUG=verbose glxinfo" gives me a lot of information, but here are the errors.
    @
    $ LIBGL_DEBUG=verbose glxinfo
    name of display: localhost:10.0
    libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
    libGL error: failed to open drm device: Permission denied
    libGL error: failed to load driver: i965
    libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
    libGL: Can't open configuration file /etc/drirc: No such file or directory.
    libGL: Can't open configuration file /home/tcamuso/.drirc: No such file or directory.
    @


  • Lifetime Qt Champion

    That error I don't know… You should maybe check directly with Fedora.

    Can you test with the system Qt ?



  • Can you test with the system Qt ?

    OK, what's happening is that I am logged in remotely to the Fedora 20 system that is running Qt. I've logged in with the following command:

    $ ssh -Y martincook@vmf20

    Then, from the console which is now logged into the remote F20 server, I invoke qtcreator.

    $ qtcreator &

    The F20 system then serves qtcreator to my laptop. Everything I do in that instance of qtcreator actually takes place on the F20 server, just that all the graphics will be served to my laptop instead of the graphics head of the server. I am also seeing this error when I remotely spawn other graphics applications, even a simple terminal.

    When I log into the graphics head of the server directly, I do NOT see the "Gtk-Message: Failed to load module "pk-gtk-module"" message.

    So Qt is working perfectly. It is my remote X setup that is missing something. I don't have this problem with other servers running X, so I suspect the F20 server is missing yet another X module.


  • Lifetime Qt Champion

    Or maybe a configuration of ssh X forwarding



  • Yes, something is funky, but not with Qt.
    :)

    I'll post when I find the answer.



  • Heh. Fun with Fedora.

    It's a bug in gnome-3 packaging, according to this.

    https://bugzilla.redhat.com/show_bug.cgi?id=747449

    The fix for “Gtk-Message: Failed to load module “pk-gtk-module”“ message is the following.

    yum install gnome-packagekit

    yum install PackageKit-gtk3-module

    However, I still get the following error, though it does not seem to adversely affect anything, and I only get it when ssh X forwarding.

    libGL error: failed to load driver: i965
    libGL error: Try again with LIBGL_DEBUG=verbose for more details.

    I will post when I have an answer fo rthat.


  • Lifetime Qt Champion

    You can also ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented) They might have know something about that


Log in to reply
 

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