Compiling Qt5 for linux-arm-gnueabi-g++, configure fails to OpenGL ES test
-
Hi,
I'm trying to compile Qt5 for linux-arm-gnueabi-g++, because I'm building crosscompile env for arm. I'm using Ubuntu 12.10 as development platform.
When I run ./configure like this:
@./configure -opensource -confirm-license -developer-build -nomake examples -nomake tests -opengl es2 -xplatform linux-arm-gnueabi-g++ -device-option CROSS_COMPILE=arm-linux-gnueabi- -v@I get following error:
@OpenGL ES 2.x auto-detection... ()
arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o opengles2.o opengles2.cpp
arm-linux-gnueabi-g++ -Wl,-O1 -o opengles2 opengles2.o -lGLESv2
/usr/lib/gcc/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lGLESv2
collect2: error: ld returned 1 exit status
make: *** [opengles2] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/jompu/qt5/qtbase/mkspecs/linux-arm-gnueabi-g++.
*** qtbase/configure exited with non-zero status.@If I modify paths into qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf by adding lines:
@QMAKE_INCDIR_OPENGL_ES2 = /usr/include/GLES2
QMAKE_LIBDIR_OPENGL_ES2 = /usr/lib/x86_64-linux-gnu/libGLESv2.so
QMAKE_LIBS_OPENGL_ES2 =@I get following error with configure script:
@OpenGL ES 2.x auto-detection... ()
arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -I/usr/include/GLES2 -o opengles2.o opengles2.cpp
arm-linux-gnueabi-g++ -Wl,-O1 -o opengles2 opengles2.o -L/usr/lib/x86_64-linux-gnu/libGLESv2.so
opengles2.o: In functionmain': opengles2.cpp:(.text.startup+0xc): undefined reference to
glUniform1f'
opengles2.cpp:(.text.startup+0x14): undefined reference to `glClear'
collect2: error: ld returned 1 exit status
make: *** [opengles2] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/jompu/qt5/qtbase/mkspecs/linux-arm-gnueabi-g++.
*** qtbase/configure exited with non-zero status.@ -
Below is not right. The LIBDIR is to be pointed to the folder name, not the file name. Also you need to point it to the "ARM" binaries, not the x86 binaries. You might want to take a look at existing examples in Qt5 itself, or other configurations like in https://github.com/prabindh/qt-configs/tree/master/qt5_1.0_Dec12
QMAKE_LIBDIR_OPENGL_ES2 = /usr/lib/x86_64-linux-gnu/libGLESv2.so
-
Hello,
I tried to configure Qt5 using this command
./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -make libs -device imx6 -compile-examples -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /ltib_install/ltib/rootfs -no-gcc-sysroot -prefix /opt/qt5I am getting below error..
opengles2.cpp:45:25: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.
make: *** [opengles2.o] Error 1
OpenGL ES 2.x disabled.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/home/jigar/qt5/qtbase/mkspecs/devices/linux-imx6-g++. -
Hi,
Did you solve the problem? If so can you tell me how?
I am also getting the same issue.?
Thanks.
Rgds,
VIjay -
hi,
i have the same problem with qt 4.8 please contact me if there is anyone figure it out
thanks in advance.. -
You need to give a correct opengl_es2 arm paths to ./configure .
-
hi @Zola thanks for replying ...
yes i did it
./configure -prefix /media/rootf/usr/lib -embedded arm -platform qws/linux-x86_64-g++ -xplatform qws/linux-TIarmv7-sgx-g++ -opengl es2 -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT
in the linux-TIarmv7-sgx-g++ qmake.conf
# # qmake configuration for building with arm-linux-g++ # include(../../common/gcc-base.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) include(../../common/qws.conf) #User specific Path - To Be edited by User QT_INSTALL_DIR = /home/kamal/qt-everywhere-opensource-src-4.8.2 SGX_SDK_ROOT = /home/kamal/Graphics_SDK_4_09_00_01 TSLIB_INCDIR = TSLIB_LIBDIR = # modifications to g++.conf #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 QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp 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_STRIP = arm-linux-gnueabihf-strip # Prabu modified for Qt4.8 QMAKE_COPY = cp QMAKE_DEL_FILE = rm QMAKE_DEL_DIR = rm -r QMAKE_MOVE = mv QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p #Do not edit beyond this QMAKE_INCDIR_OPENGL_ES2 = /home/kamal/Graphics_SDK_4_09_00_01/include/OGLES QMAKE_LIBDIR_OPENGL_ES2 = /home/kamal/Graphics_SDK_4_09_00_01/gfx_dbg_es8.x QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lusc QMAKE_INCDIR_OPENGL += $QMAKE_INCDIR_OPENGL_ES2 QMAKE_LIBDIR_OPENGL = $QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR_OPENGL_QT = $QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um -lusc QMAKE_INCDIR_OPENVG = $QMAKE_INCDIR_OPENGL_ES2 QMAKE_LIBDIR_OPENVG = $QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBS_OPENVG = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um -lOpenVG -lOpenVGU QMAKE_INCDIR_EGL = $QMAKE_INCDIR_OPENGL_ES2 QMAKE_INCDIR_EGL += $QT_INSTALL_DIR/src/3rdparty/powervr/wsegl2 QMAKE_INCDIR_POWERVR = $QT_INSTALL_DIR/src/3rdparty/powervr/wsegl2 QMAKE_LIBDIR_EGL = $QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM -lusc QMAKE_INCDIR += $TSLIB_INCDIR QMAKE_INCDIR += $GLIB_INCDIR QMAKE_INCDIR += $GLIB_CONFIGINCLUDEDIR QMAKE_INCDIR += $GST_INCLUDEDIR QMAKE_INCDIR += $LIBXML_INCLUDEDIR QMAKE_INCDIR += $QMAKE_INCDIR_OPENGL_ES2 QMAKE_LIBDIR += $QMAKE_LIBDIR_OPENGL_ES2 QMAKE_LIBDIR += $TSLIB_LIBDIR #QMAKE_LIBS += $QMAKE_LIBS_OPENGL_ES2 -lts -lglib -lgthread-2.0 -lgstreamer-0.10 QMAKE_LIBS += $QMAKE_LIBS_OPENGL_ES2 load(qt_config)
when i run ./configure this is what i get:
Creating qmake. Please wait...
g++ -c -o option.o -pipe -m64 -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/home/kamal/qt-everywhere-opensource-src-4.8.2/include -I/home/kamal/qt-everywhere-opensource-src-4.8.2/include/QtCore -I/home/kamal/qt-everywhere-opensource-src-4.8.2/src/corelib/global -I/home/kamal/qt-everywhere-opensource-src-4.8.2/src/corelib/xml -I/home/kamal/qt-everywhere-opensource-src-4.8.2/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/kamal/qt-everywhere-opensource-src-4.8.2/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED option.cpp
g++ -o "/home/kamal/qt-everywhere-opensource-src-4.8.2/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o qfsfileengine_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o
The OpenGL ES 2.0 functionality test 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/kamal/qt-everywhere-opensource-src-4.8.2/mkspecs/qws/linux-TIarmv7-sgx-g++. -
@Kamal-Badi What is your opengl es headers and libraries edition? For desktop or for arm? You need to have the arm edition!