This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3517 QT Build(make) Error

I'm OMAP35x_Graphics_SDK_3_01_00_06 installed & builded and QT4.7 building then Error.

Please, Help me.

* Reference : http://processors.wiki.ti.com/index.php/Building_Qt_for_OMAP35xx_with_OpenGL_ES_accelerated_by_SGX

[Error Message]

/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/GLES/gl.h:727: error: declaration of C function 'void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)' conflicts with
/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/GLES2/gl2.h:576: error: previous declaration 'void glTexImage2D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*)' here
make[1]: *** [.obj/release-shared-emb-arm/qegl.o] Error 1
make[1]: Leaving directory `/home/jhkang/qt/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2

=======================================================================================================

[configure_omap3]

#!/bin/sh

#------------------------------------------------------------------------------
# Configuration Settings
#
# *** YOU MUST MODIFY THE FOLLOWING SETTINGS FOR YOUR SYSTEM ***
#------------------------------------------------------------------------------
#
# QT_TARGET_DIR   : Target-relative location of Qt Installation
# CSTOOL_DIR      : Location of CodeSourcery 2008q1 Toolset
# GFX_SDK_DIR     : Location of your graphics SDK directory
# GFX_ES_DIR      : Graphics SDK sub-directory that contains your OpenGL
#                   libraries.  This should be "gfx_rel" if you have ES 3.x
#                   silicon, and "gfx_rel_es2.x" if you have ES 2.x silicon.
QT_TARGET_DIR=/opt/qt-embedded
#CSTOOL_DIR=${HOME}/arm-2008q1
CSTOOL_DIR=/opt/codesourcery
#GFX_SDK_DIR=${HOME}/OMAP35x_Graphics_SDK_3_00_00_09
GFX_SDK_DIR=${HOME}/OMAP35x_Graphics_SDK_3_01_00_06
#GFX_ES_DIR=gfx_rel_es2.x
GFX_ES_DIR=gfx_rel_es3.x

# Configure the qmake.conf file
#    NOTE:  The only reason we need to set QMAKE_CXX here is because the
#    configure script does a version check on the compiler, and it doesn't
#    evaluate qmake variables, so we need to set the absolute path here.
echo "Configuring linux-omap3-g++/qmake.conf for your system..."
OMAP3_SPEC=mkspecs/qws/linux-omap3-g++/qmake.conf
sed -i "s#^QMAKE_CSTOOL_DIR  =.*\$#QMAKE_CSTOOL_DIR  = ${CSTOOL_DIR}#"  ${OMAP3_SPEC}
sed -i "s#^QMAKE_GFX_SDK_DIR =.*\$#QMAKE_GFX_SDK_DIR = ${GFX_SDK_DIR}#" ${OMAP3_SPEC}
sed -i "s#^QMAKE_GFX_ES_DIR  =.*\$#QMAKE_GFX_ES_DIR  = ${GFX_ES_DIR}#"  ${OMAP3_SPEC}
sed -i "s#^QMAKE_CXX        =.*\$#QMAKE_CXX        = ${CSTOOL_DIR}/bin/arm-none-linux-gnueabi-g++#" ${OMAP3_SPEC}

# Run configure
echo "Running configure..."
exec ./configure -prefix ${QT_TARGET_DIR} -embedded arm -little-endian -fast -D QT_NO_QWS_CURSOR  -D QT_QWS_CLIENTBLIT -depths 16,24,32 -platform linux-g++ -xplatform qws/linux-omap3-g++ -arch arm -opengl es2 -openvg -plugin-gfx-powervr -no-openssl -no-cups -no-largefile -qt-mouse-pc -plugin-mouse-pc -no-webkit -no-script -qt-gfx-vnc -R ${GFX_SDK_DIR}/${GFX_ES_DIR} $*

=================================================================================================

[mkspecs/qws/linux-omap3-q++/qmake.conf]

#
# qmake configuration for building with linux-omap3-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

#------------------------------------------------------------------------------
# Configuration Settings
#
# *** YOU MUST MODIFY THE FOLLOWING SETTINGS FOR YOUR SYSTEM ***
#
# By default, these settings read their values from environment variables.
# You may choose to set the relevant environment variables prior to running
# "make" instead of setting them here.
#------------------------------------------------------------------------------
#
# QMAKE_CSTOOL_DIR  : Location of CodeSourcery 2008q1 Toolset
# QMAKE_GFX_SDK_DIR : Location of your graphics SDK directory
# QMAKE_GFX_ES_DIR  : Graphics SDK sub-directory that contains your OpenGL
#                     libraries.  This should be "gfx_rel" if you have ES 3.x
#                     silicon, and "gfx_rel_es2.x" if you have ES 2.x silicon.
#
QMAKE_CSTOOL_DIR  = /opt/codesourcery
QMAKE_GFX_SDK_DIR = /home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06
QMAKE_GFX_ES_DIR  = gfx_rel_es3.x

#------------------------------------------------------------------------------
# Modifications to g++.conf
#------------------------------------------------------------------------------
# Compiler Flags to take advantage of the ARM Cortex-A8 architecture
#
# Change the next two lines to efficiently compile Qt for ARM generation if it
#     is other than Cortex-A8
#
QMAKE_CFLAGS_RELEASE   = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

#------------------------------------------------------------------------------
# It should be ok to leave the remaining settings unmodified
#------------------------------------------------------------------------------

# Toolchain
QMAKE_CSTOOL_BIN = $$QMAKE_CSTOOL_DIR/bin

QMAKE_CC         = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-gcc
QMAKE_CXX        = /opt/codesourcery/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK       = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-g++
QMAKE_AR         = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY    = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-objcopy
QMAKE_STRIP      = $$QMAKE_CSTOOL_BIN/arm-none-linux-gnueabi-strip

# Search Paths
QMAKE_INCDIR  = $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include
QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include
QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include
QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/include
QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include
QMAKE_LIBDIR  = $$QMAKE_GFX_SDK_DIR/$$QMAKE_GFX_ES_DIR

# Specify additional libraries to link
QMAKE_LIBS_EGL          = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL_ES1   = $$QMAKE_LIBS_EGL -lGLES_CM
QMAKE_LIBS_OPENGL_ES1CL = $$QMAKE_LIBS_OPENGL_ES1
QMAKE_LIBS_OPENGL_ES2   = $$QMAKE_LIBS_EGL -lGLESv2
QMAKE_LIBS_OPENVG       = $$QMAKE_LIBS_EGL -lOpenVG -lOpenVGU

load(qt_config)

  • If you are enabling gles2.0, comment out the second line below in the config and do a clean make

    QMAKE_INCDIR  = $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include
    QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include

     


  • Thankful to you for your help.

    I use enabling gles2.0, coment out the second line below in the qmake.conf

    QMAKE_INCDIR  = $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include
    #QMAKE_INCDIR += $$QMAKE_GFX_SDK_DIR/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include

    and perform - 'make confclean', './configure_omap3', 'make' - then another error detected.

    Please, help one more time, Thanks.

    [Error Message]

    /opt/codesourcery/bin/arm-none-linux-gnueabi-gcc -c -pipe -fno-exceptions -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W -fPIC -DQT_NO_QWS_CURSOR -DQT_QWS_CLIENTBLIT -I../../../../../mkspecs/qws/linux-omap3-g++ -I. -I/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include -I/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include -I/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/include -I/home/jhkang/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include -o .obj/release-shared-emb-arm/pvrqwswsegl.o pvrqwswsegl.c
    pvrqwswsegl.c:42:27: error: GLES/egltypes.h: No such file or directory
    pvrqwswsegl.c:43:19: error: wsegl.h: No such file or directory
    pvrqwswsegl.c:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
    pvrqwswsegl.c:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglDisplayConfigs'
    pvrqwswsegl.c:75: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglIsDisplayValid'
    pvrqwswsegl.c:85: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglInitializeDisplay'
    pvrqwswsegl.c:128: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglCloseDisplay'
    pvrqwswsegl.c:135: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglRotationValue'
    pvrqwswsegl.c:146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglCreateWindowDrawable'
    pvrqwswsegl.c:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglCreatePixmapDrawable'
    pvrqwswsegl.c:200: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglDeleteDrawable'
    pvrqwswsegl.c:212: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglSwapDrawable'
    pvrqwswsegl.c:224: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglSwapControlInterval'
    pvrqwswsegl.c:237: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglWaitNative'
    pvrqwswsegl.c:248: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglCopyFromDrawable'
    pvrqwswsegl.c:289: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglCopyFromPBuffer'
    pvrqwswsegl.c:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wseglGetDrawableParameters'
    pvrqwswsegl.c:381: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
    pvrqwswsegl.c:398: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    make[4]: *** [.obj/release-shared-emb-arm/pvrqwswsegl.o] Error 1
    make[4]: Leaving directory `/home/jhkang/qt/src/plugins/gfxdrivers/powervr/QWSWSEGL'
    make[3]: *** [sub-QWSWSEGL-make_default-ordered] Error 2
    make[3]: Leaving directory `/home/jhkang/qt/src/plugins/gfxdrivers/powervr'
    make[2]: *** [sub-powervr-make_default] Error 2
    make[2]: Leaving directory `/home/jhkang/qt/src/plugins/gfxdrivers'
    make[1]: *** [sub-gfxdrivers-make_default] Error 2
    make[1]: Leaving directory `/home/jhkang/qt/src/plugins'
    make: *** [sub-plugins-make_default-ordered] Error 2

  • 1. For first error - Please change below file

    src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c

    in the line from

    #include <GLES/egltypes.h>

    to -->

    #include <GLES2/egltypes.h>

    2. For second error - please refer to attached thread

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/48698.aspx

     

  • I undersand sencond error's measure.

    but do not fully understand first error's measure.

    because, 'egltypes.h' file is existent only in GLES directory. - non-existent in GLES2 directory. 

    This mean copy GLES/egltypes.h to GLES2/egltypes.h?

    Thanks.

  • All files required for Qt build with GLES2 (for a working build) are included below. You can put it in the Graphics SDK GLES2 include path (GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2).

    https://gforge.ti.com/gf/download/docmanfileversion/262/4309/GLES2_Include.tar.gz

     

  • Thank you very much for your help.

    Best regards.