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. [solved] [, well in a way] Can't compile a thing!
Forum Updated to NodeBB v4.3 + New Features

[solved] [, well in a way] Can't compile a thing!

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 3 Posters 11.1k 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.
  • K Offline
    K Offline
    Kysymys
    wrote on last edited by
    #1

    Hi there,

    yesterday (27.03) I've downloaded the
    Qt 5.0.1 for Linux 32-bit (388 MB)
    and run the setup.
    That looked okay.

    But whatever I compile (even the samples) lead to exact the same error messages. The error seems to be in an #ifdef block that wraps code for apple. That's odd since I am pretty sure I am running Ubuntu 12.10.

    Anyone an idea?
    It's a bit of an urgent issue for me, since I am blocked until I get the Qt Creator IDE into an working state.

    Thanks in advance.


    21:12:12: Führe Schritte für Projekt Test aus...
    21:12:12: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
    21:12:12: Starte "/usr/bin/make" -w
    make: Entering directory /home/Kysymys/Dev/QT/Test/Test-build-Desktop_Qt_5_0_1_GCC_32bit-Debug' g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/mkspecs/linux-g++ -I../Test -I../Test/qtquick2applicationviewer -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQml -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtNetwork -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -o main.o ../Test/main.cpp In file included from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/qquickwindow.h:47:0, from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/qquickview.h:45, from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/QQuickView:1, from ../Test/qtquick2applicationviewer/qtquick2applicationviewer.h:14, from ../Test/main.cpp:2: /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui/qopengl.h:99:21: fatal error: GL/gl.h: No such file or directory compilation terminated. make: Leaving directory /home/Kysymys/Dev/QT/Test/Test-build-Desktop_Qt_5_0_1_GCC_32bit-Debug'
    make: *** [main.o] Error 1
    21:12:13: Der Prozess "/usr/bin/make" wurde mit dem Rückgabewert 2 beendet.
    Error while building/deploying project Test (kit: Desktop Qt 5.0.1 GCC 32bit)
    Bei der Ausführung von Schritt 'Make'

    \o/ \o/ Kudos ...

    Paholaisen Kysymys

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

      Hi,

      It seems that you don't have the OpenGL dev lib installed (hinted by the fatal error GL/gl.h missing)

      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
      • K Offline
        K Offline
        Kysymys
        wrote on last edited by
        #3

        Okay I guess that "you don't have the OpenGL dev lib installed" somehow contains the information how to solve the problem. But as I am as new to linux as I am to QML, it does not.
        Could you please elaborate?

        [quote author="SGaist" date="1364508162"]Hi,

        It seems that you don't have the OpenGL dev lib installed (hinted by the fatal error GL/gl.h missing)[/quote]

        \o/ \o/ Kudos ...

        Paholaisen Kysymys

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

          Sure:

          It's not QML that is at fault right now.

          [quote author="Kysymys" date="1364502362"]Hi there,

          /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui/qopengl.h:99:21: fatal error: GL/gl.h: No such file or directory
          compilation terminated.

          [/quote]

          This means that the compiler can't find gl.h that should be located in a folder name GL, on linux usually /usr/local/include.

          Header files for development are usually found in ***-dev package on Ubuntu. In your case, IIRC it should be in mesa-common-dev. So you have to do something like:
          @sudo apt-get install mesa-common-dev@
          Or use the graphical package manager that comes with Ubuntu

          Hope it helps

          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
          • K Offline
            K Offline
            Kysymys
            wrote on last edited by
            #5

            Great! That helped.

            But now it's the linker complaining:
            :-1: Error:cannot find -lGL

            Is there a list of stuff I have to install to get Qt 5 in a working state? Maybe even a package?

            \o/ \o/ Kudos ...

            Paholaisen Kysymys

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kysymys
              wrote on last edited by
              #6

              So now I've randomly installed some stuff that looked GL isch. One of which seems to have done the trick.

              I am pretty sure that there has to be a better way to get Qt 5.0 running, than just hitting install on anything that says "mesa".

              There has to be a thingy hidden somewhere, that installs a functioning version of Qt 5.0 ( meaning download, install, run qt-creator, actually run the samples, no hassle )
              So if someone finds that, please inform me.

              @SGaist: Thanks again.

              \o/ \o/ Kudos ...

              Paholaisen Kysymys

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

                You're welcome !

                I must say I'm surprised that libGL wasn't already installed on your system. IIRC it's a common library.

                Most dependencies needed for Qt are described in the compilation/installation guide for "Qt 5 from git":http://qt-project.org/wiki/Building_Qt_5_from_Git

                The goal of the installer is to provide the experience you want. I think you where a victim of bad luck.

                Since you found a solution to your problem, could you update the threads title to solved so that other forum users know that you succeeded ?

                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
                • K Offline
                  K Offline
                  Kysymys
                  wrote on last edited by
                  #8

                  Updated to [solved]

                  ... will be back with more noobish stuff ...

                  \o/ \o/ Kudos ...

                  Paholaisen Kysymys

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mikan
                    wrote on last edited by
                    #9

                    I had the same issue with Mint14 (32bit). Using Software Manager and installing "libgl1-mesa-dev" fixed the issue. Examples are now building and running fine

                    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