Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build error: cannot find -lGL
Forum Updated to NodeBB v4.3 + New Features

Build error: cannot find -lGL

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 2 Posters 3.3k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    MartinCook
    wrote on last edited by
    #1

    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
    }
    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

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

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MartinCook
        wrote on last edited by
        #3

        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.
        @

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Can you test with the system Qt ?

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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MartinCook
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Or maybe a configuration of ssh X forwarding

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

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MartinCook
                wrote on last edited by
                #7

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

                I'll post when I find the answer.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MartinCook
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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

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

                    1 Reply Last reply
                    0

                    • Login

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