Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problem to get OpenGL support with Qt 5.3.2 embedded
QtWS25 Last Chance

Problem to get OpenGL support with Qt 5.3.2 embedded

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 4 Posters 3.7k Views
  • 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
    MorganeJ
    wrote on last edited by A Former User
    #1

    Hi,

    I'm having some problems with Qt and OpenGL.
    I am not able to compile Qt 5.3.2 with the OpenGL support flag. I'm having a "All the OpenGL functionality tests failed!".

    I'm on a Virtual Machine with Ubuntu 14.04 LTS 64bit.

    Here is my configure command:
    @./configure -prefix /usr/local/qt-embedded-5.3.2 -xplatform linux-arm-gnueabi-g++ -opensource -device-option CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-gcc -no-largefile -v -opengl -confirm-license@

    And here the errors related to OpenGL:
    @OpenGL auto-detection... ()
    arm-linux-gnueabihf-g++ -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -I/usr/include/GL -o opengldesktop.o opengldesktop.cpp
    opengldesktop.cpp:45:19: fatal error: GL/gl.h: No such file or directory
    #include <GL/gl.h>
    ^
    compilation terminated.
    make: *** [opengldesktop.o] Error 1
    OpenGL disabled.
    OpenGL ES 2.x auto-detection... ()
    arm-linux-gnueabihf-g++ -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o opengles2.o opengles2.cpp
    opengles2.cpp:45:25: fatal error: GLES2/gl2.h: No such file or directory
    #include <GLES2/gl2.h>
    ^
    compilation terminated.
    make: *** [opengles2.o] Error 1
    OpenGL ES 2.x disabled.
    All the OpenGL functionality tests failed!
    You might need to modify the include and library search paths by editing
    QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in
    /home/myuser/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/linux-arm-gnueabi-g++.
    @

    Here my qmake.config file:
    @#

    qmake configuration for building with arm-linux-gnueabihf-g++

    MAKEFILE_GENERATOR = UNIX
    CONFIG += incremental
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)

    #include openGL libraries
    QMAKE_INCDIR_OPENGL = /usr/arm-linux-gnueabihf/include/GL
    QMAKE_LIBDIR_OPENGL = /usr/arm-linux-gnueabihf/lib
    QMAKE_LIBS_OPENGL = -lGLU -lGL
    QMAKE_LIBDIR_X11 = /usr/arm-linux-gnueabihf/lib

    modifications to g++.conf

    QMAKE_CC = arm-linux-gnueabihf-gcc
    QMAKE_CXX = arm-linux-gnueabihf-g++
    QMAKE_LINK = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++

    modifications to linux.conf

    QMAKE_AR = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy
    QMAKE_NM = arm-linux-gnueabihf-nm -P
    QMAKE_STRIP = arm-linux-gnueabihf-strip
    load(qt_config)@

    Inside my /usr/arm-linux-gnueabihf/include/GL, I have the gl.h file.

    I tried without the flag -opengl but Qt does not recognize the QT += opengl getting this error "Project ERROR: Unknown module(s) in QT: opengl" on Qt Creator.

    I also tried using :
    @QMAKE_INCDIR_OPENGL = /usr/include/GL
    QMAKE_LIBDIR_OPENGL = /usr/lib
    QMAKE_LIBS_OPENGL = /usr/lib@

    What am I doing wrong ? What am I missing ?
    I tried a lot of things but I never get it work and I was not able to find an answer to this kind of question on internet.

    Thank you for your help.

    Morgane

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuschky
      wrote on last edited by
      #2

      Did you try to add the path inside the .pro file on the follwoing way?

      @
      INCLUDEPATH += /usr/arm-linux-gnueabihf/include/GL
      @

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

        [quote author="kuschky" date="1418995567"]Did you try to add the path inside the .pro file on the follwoing way?

        @
        INCLUDEPATH += /usr/arm-linux-gnueabihf/include/GL
        @[/quote]

        Hi,

        Thank you for your help! I added this INCLUDEPATH to my opengldesktop.pro and it is compiling now.
        I needed to copy some libraries from my target system into my host system but your solution is working!

        Thank you a lot!

        Morgane

        small_birdS 1 Reply Last reply
        0
        • samapolloS Offline
          samapolloS Offline
          samapollo
          wrote on last edited by
          #4

          @MorganeJ
          You have this in your Qmake.conf file:

          QMAKE_INCDIR_OPENGL = /usr/arm-linux-gnueabihf/include/GL
          QMAKE_LIBDIR_OPENGL = /usr/arm-linux-gnueabihf/lib
          QMAKE_LIBS_OPENGL = -lGLU -lGL
          QMAKE_LIBDIR_X11 = /usr/arm-linux-gnueabihf/lib

          Where did you get these files? What are they? I am having some issues compiling myself, and dont really understand that part.

          1 Reply Last reply
          0
          • M MorganeJ

            [quote author="kuschky" date="1418995567"]Did you try to add the path inside the .pro file on the follwoing way?

            @
            INCLUDEPATH += /usr/arm-linux-gnueabihf/include/GL
            @[/quote]

            Hi,

            Thank you for your help! I added this INCLUDEPATH to my opengldesktop.pro and it is compiling now.
            I needed to copy some libraries from my target system into my host system but your solution is working!

            Thank you a lot!

            Morgane

            small_birdS Offline
            small_birdS Offline
            small_bird
            wrote on last edited by
            #5

            @MorganeJ Hi, I wonder how you can cross compile qt5 using a desktop-opengl? Should it be opengl es2? Cound the opengl edition you compiled work well on your embedded board? Thanks in advance!

            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