×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    12

    Qt4.6 OpenGL ES 2.0 example

    Hi,

    I'm trying to build the Qt4.6 OpenGL ES 2.0 example for the ARMEL target with scratchbox, but after calling /opt/qt4-maemo5/bin/qmake at make following error occurs:


    [sbox-FREMANTLE_ARMEL: ~/workspace/opengl/hellogl_es2] > make
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o main.o main.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o glwidget.o glwidget.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o mainwindow.o mainwindow.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o bubble.o bubble.cpp
    /opt/qt4-maemo5/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. glwidget.h -o moc_glwidget.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o moc_glwidget.o moc_glwidget.cpp
    /opt/qt4-maemo5/bin/moc -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. mainwindow.h -o moc_mainwindow.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o moc_mainwindow.o moc_mainwindow.cpp
    /opt/qt4-maemo5/bin/rcc -name texture texture.qrc -o qrc_texture.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtOpenGL -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I/usr/X11R6/include -I. -o qrc_texture.o qrc_texture.cpp
    g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib -o hellogl_es2 main.o glwidget.o mainwindow.o bubble.o moc_glwidget.o moc_mainwindow.o qrc_texture.o -L/opt/qt4-maemo5/lib -L/usr/X11R6/lib -lQtOpenGL -L/opt/qt4-maemo5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGLESv2 -lpthread
    glwidget.o: In function `GLWidget::paintTexturedCube()':
    glwidget.cpp:(.text+0x150): undefined reference to `QGLShaderProgram::setAttributeArray(int, float const*, int, int)'
    glwidget.cpp:(.text+0x178): undefined reference to `QGLShaderProgram::setAttributeArray(int, float const*, int, int)'
    glwidget.cpp:(.text+0x1a0): undefined reference to `QGLShaderProgram::setAttributeArray(int, float const*, int, int)'
    glwidget.cpp:(.text+0x1b0): undefined reference to `QGLShaderProgram::setUniformValue(int, int)'
    glwidget.cpp:(.text+0x1bc): undefined reference to `QGLShaderProgram::enableAttributeArray(int)'
    glwidget.cpp:(.text+0x1c8): undefined reference to `QGLShaderProgram::enableAttributeArray(int)'
    glwidget.cpp:(.text+0x1d4): undefined reference to `QGLShaderProgram::enableAttributeArray(int)'
    glwidget.cpp:(.text+0x1f0): undefined reference to `QGLShaderProgram::disableAttributeArray(int)'
    glwidget.cpp:(.text+0x1fc): undefined reference to `QGLShaderProgram::disableAttributeArray(int)'
    glwidget.cpp:(.text+0x208): undefined reference to `QGLShaderProgram::disableAttributeArray(int)'
    glwidget.o: In function `GLWidget::paintQtLogo()':
    glwidget.cpp:(.text+0x230): undefined reference to `QGLShaderProgram::enableAttributeArray(int)'
    glwidget.cpp:(.text+0x23c): undefined reference to `QGLShaderProgram::enableAttributeArray(int)'
    glwidget.cpp:(.text+0x254): undefined reference to `QGLShaderProgram::setAttributeArray(int, QVector3D const*, int)'
    glwidget.cpp:(.text+0x26c): undefined reference to `QGLShaderProgram::setAttributeArray(int, QVector3D const*, int)'
    glwidget.cpp:(.text+0x28c): undefined reference to `QGLShaderProgram::disableAttributeArray(int)'
    glwidget.cpp:(.text+0x298): undefined reference to `QGLShaderProgram::disableAttributeArray(int)'
    glwidget.o: In function `GLWidget::paintGL()':
    glwidget.cpp:(.text+0x518): undefined reference to `QPainter::beginNativePainting()'
    glwidget.cpp:(.text+0x5e0): undefined reference to `QMatrix4x4::rotate(float, float, float, float)'

    ... and so on - shortened for maximum post length of 10000 chars ...

    glwidget.cpp:(.text._ZN7QVectorI9QVector3DE7reallocEii[QVector<QVector3D>::realloc(int, int)]+0x1ec): undefined reference to `qBadAlloc()'
    glwidget.o: In function `QList<Bubble*>::detach_helper()':
    glwidget.cpp:(.text._ZN5QListIP6BubbleE13detach_helperEv[QList<Bubble*>::detach_helper()]+0x20): undefined reference to `QListData::detach3()'
    bubble.o: In function `Bubble::updateBrush()':
    bubble.cpp:(.text+0x630): undefined reference to `QVectorData::free(QVectorData*, int)'
    bubble.cpp:(.text+0x67c): undefined reference to `QVectorData::free(QVectorData*, int)'
    collect2: ld returned 1 exit status
    make: *** [hellogl_es2] Error 1



    I installed the qt4.6 tech preview based on the information here: http://wiki.maemo.org/Qt4_Hildon#Usi...w_in_Fremantle
    The OpenGL example works well for the x86 target, but the OpenGL ES 2.0 example doesnt work for it, showing up this warning:

    make: warning: Clock skew detected. Your build may be incomplete.

    ... and after trying to run it nothing appears on the Xephyr but this error on scratchbox terminal:
    /usr/bin/run-standalone.sh: line 11: 27056 Segmentation fault (core dumped) "$@"
    [sbox-FREMANTLE_X86: ~/workspace/opengl/hellogl_es2] > hildon-desktop[25966]: GLIB WARNING ** ClutterX11 - Failed to get XImage of pixmap: e0004d, removing



    How can I build the examples for ARMEL (and for x86) to be able to deploy the application to the N900 in a next step?

    Thanks in advance,
    Chris

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt4.6 OpenGL ES 2.0 example

    Try to remove Qt packages (apt-get remove libqt4-maemo5-core
    ) and install them back. There is some issue with post-install script, it doesn't work properly in some cases.
    Also make sure that Qt 4.5.3 packages are not installed before reinstallation.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    12

    Re: Qt4.6 OpenGL ES 2.0 example

    Thanks a lot, that helped!

    Now I can build the ES 2.0 example for ARMEL and for x86 target

    Is there a possibility to run the example on the emulator, or can it only be tested on the device?

    I tried to run the Xephyr for x86 target where it quickly appears but then crashes with following error:
    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    /usr/bin/run-standalone.sh: line 11: 22299 Segmentation fault (core dumped) "$@"


    For the ARMEL target this error shows up:

    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20 (X_GetProperty)
    Resource id: 0xe00001
    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    QEglContext::defaultDisplay(): Cannot initialize EGL display: "Bad alloc (0x3003)"
    QGLContext::makeCurrent(): Cannot make invalid context current
    QEglContext::chooseConfig(): Could not find a suitable EGL configuration
    Requested: "type=es2 rgba=5,6,5,0 surface-type=window"
    Available:
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Qt4.6 OpenGL ES 2.0 example

    Quote Originally Posted by feldi13 View Post
    Thanks a lot, that helped!

    Now I can build the ES 2.0 example for ARMEL and for x86 target

    Is there a possibility to run the example on the emulator, or can it only be tested on the device?

    I tried to run the Xephyr for x86 target where it quickly appears but then crashes with following error:
    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    /usr/bin/run-standalone.sh: line 11: 22299 Segmentation fault (core dumped) "$@"


    For the ARMEL target this error shows up:

    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 20 (X_GetProperty)
    Resource id: 0xe00001
    Xlib: extension "Generic Event Extension" missing on display ":2.0".
    QEglContext::defaultDisplay(): Cannot initialize EGL display: "Bad alloc (0x3003)"
    QGLContext::makeCurrent(): Cannot make invalid context current
    QEglContext::chooseConfig(): Could not find a suitable EGL configuration
    Requested: "type=es2 rgba=5,6,5,0 surface-type=window"
    Available:
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    You can try it only in i386 target with Xephyr. If it crashes, then next step would be analyzing coredump bracktrace.

Similar Threads

  1. How to write text in an OpenGL ES game?
    By MobileVisuals in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-12-10, 08:13
  2. openGL ES 2.0
    By zzzx3 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2009-03-05, 08:54
  3. Possible OpenGL ES implementation bug
    By greatape in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2006-10-28, 18:02
  4. running OpenGL ES in N93
    By derBertl in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2006-10-10, 14:50
  5. Emulator supporting OpenGL ES 2.0?
    By vrs762 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-03-09, 20:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •