AnsweredAssumed Answered

I.MX6 opengles questions on QT porting

Question asked by 孝哲 李 on Oct 13, 2017
Latest reply on Oct 15, 2017 by igorpadykov

hello

I'm trying to compile Qt5.9.1 for linux-arm-gnueabi-g++ for I.MX6Q.The editon of linux is 3.0.35.I'm using Ubuntu 16 as development platform.

When I run ./configure like this:

./configure -release -xplatform linux-arm -no-opengl -opengl es2 -prefix ~/qt5.9.1-arm -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtsensors -skip qtserialbus -skip qtspeech -skip qtsvg -skip qttools -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -no-feature-iconv -no-feature-gestures -device-option CROSS_COMPILE=arm-linux- -no-qml-debug 

And the qmake.conf in mkspecs which I changed like this:


MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib

#QT_QPA_DEFAULT_PLATFORM = eglfs #linuxfb

IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE = -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG += $$IMX6_CFLAGS

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

# modifications to g++.conf
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_NM = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP = arm-none-linux-gnueabi-strip

QMAKE_INCDIR = /opt/rootfs/usr/include
QMAKE_LIBDIR = /opt/rootfs/lib

#QMAKE_LIBDIR += /opt/rootfs/usr/lib

QMAKE_INCDIR_OPENGL_ES2 = /opt/rootfs/usr/include
QMAKE_LIBDIR_OPENGL_ES2 = /opt/rootfs/usr/lib

QMAKE_INCDIR_EGL = /opt/rootfs/usr/include
QMAKE_LIBDIR_EGL = /opt/rootfs/usr/lib


QMAKE_LIBS_OPENGL_ES1 += -lGLESv1_CM -lEGL -lGAL
QMAKE_LIBS_OPENGL_ES1CL += -lGLES_CL -lEGL -lGAL
QMAKE_LIBS_EGL += -lEGL -lGAL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
#QMAKE_LIBS += -ljpeg -ldbus-1 -lrt -lpthread #编译选项
#DISTRO_OPTS += hard-float #浮点运算使用软件不使用硬件


# Preferred eglfs backend
EGLFS_DEVICE_INTEGRATION = eglfs_viv

load(qt_config)

 

I am sure that arm-none-linux-gnueabi-gcc is right.The editon is 4.8.3.

But when I configure,I get the follow errors:

 

ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.
ERROR: The OpenGL functionality tests 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 the mkspec for your platform.
I checked /opt/rootfs/usr/include and /opt/rootfs/usr/lib.I see libGLESv2.so and libGLES.so.2.0.0 and libGLESv2.so.2 and some headfile in GLES2 like gl2.h and so on.
How can i fix this two error?

Outcomes