Errors when cross compile Qt5 for imx6q with opengles

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Errors when cross compile Qt5 for imx6q with opengles

2,808 Views
Gnimis
Contributor II

Hello,

       I'm building the Qt5.6.2 for my imx6q board with OpenGL ES. When configure the Qt ,The OpenGL ES 2.0 functionality test failed!

checking for OpenGL ES 2.0...
/home/openil/openil-OpenIL-201810/output/host/usr/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard -O2 -Wall -W -fPIC -I. -I/home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/include -I../../../mkspecs/devices/linux-imx6-g++ -o opengles2.o opengles2.cpp
/home/openil/openil-OpenIL-201810/output/host/usr/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard -Wl,-O1 -o opengles2 opengles2.o -L/home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/lib -lGLESv2 -lEGL -lGAL
/home/openil/openil-OpenIL-201810/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-linux-gnueabihf/6.2.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libVSC.so, needed by /home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/lib/libGLESv2.so, not found (try using -rpath or -rpath-link)

OpenGL ES 2.0 disabled.
The OpenGL ES 2.0 functionality test failed!
Use of pkg-config is not enabled, maybe you want to pass -pkg-config?
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/qt5.6.2/qt-everywhere-opensource-src-5.6.2/qtbase/mkspecs/devices/linux-imx6-g++.

the configure order is:

./configure -v -prefix /opt/qt5.6.2_imx6 -no-gcc-sysroot -opensource -confirm-license -qt-libpng -qt-libjpeg -qt-freetype -qt-pcre -no-directfb -linuxfb -no-kms -eglfs -qpa eglfs -opengl es2 -device imx6 -device-option CROSS_COMPILE=/home/openil/openil-OpenIL-201810/output/host/usr/bin/arm-linux-gnueabihf-

the  qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf is:

include(../common/linux_device_pre.conf)

QMAKE_LIBS_EGL += -lEGL -lGAL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL

IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS += $$IMX6_CFLAGS
QMAKE_CXXFLAGS += $$IMX6_CFLAGS

QMAKE_INCDIR_OPENGL_ES2 = /home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/include
QMAKE_LIBDIR_OPENGL_ES2 = /home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/lib

QMAKE_INCDIR_EGL = /home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/include
QMAKE_LIBDIR_EGL = /home/qt5.6.2/imx-gpu-viv-5.0.11.p8.6-hfp/gpu-core/usr/lib

DISTRO_OPTS += hard-float

# Preferred eglfs backend
EGLFS_DEVICE_INTEGRATION = eglfs_viv

include(../common/linux_arm_device_post.conf)

load(qt_config)

I have changed the gpu driver versions with imx-gpu-viv-5.0.11.p4.4-hfp、imx-gpu-viv-5.0.11.p8.4-hfp, but the reasult is the same error.

Can anyone know how to resolve this ?  Thank you.

Zhang

Labels (1)
Tags (3)
0 Kudos
Reply
3 Replies

2,511 Views
Gnimis
Contributor II

I edit the qmake.conf like this 

QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL -lGVS

the OpenGL test is pass, but the EGLFS is not right. All the eglfs is NO. Does anyone know the reason ?

OpenGL / OpenVG: 

      EGL .................. yes
      OpenGL ............... yes (OpenGL ES 2.0+)
      OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
      DirectFB ............. no
      EGLFS ................ yes
            EGLFS i.MX6 ........ no
            EGLFS i.MX6 Wayland. no
            EGLFS EGLDevice .... no
            EGLFS GBM .......... no
            EGLFS Mali ......... no
            EGLFS Raspberry Pi . no
            EGLFS X11 .......... no
      LinuxFB .............. yes
      Mir client............ no
      XCB .................. no

0 Kudos
Reply

2,511 Views
joanxie
NXP TechSupport
NXP TechSupport

pls check if you miss the gpu driver, you also can refer to the qt forum

Could not open egl display | Qt Forum 

0 Kudos
Reply

2,511 Views
Gnimis
Contributor II

hello, Joan

Is there any metheds to test the gpu driver?

I build the kernel with kernel-module-imx-gpu-viv-upstream-6.2.4.p1.8 and imx-gpu-viv-6.2.4.p1.8-aarch32, but the board can't run the gpu-demos, the error is like this:

[root@OpenIL:viv_samples]# ./tiger/tiger
vdkGetDisplay() failed.
CreateWindow() failed.

is it  show that the gpu driver is installed failed?   thanks

[root@OpenIL:viv_samples]# uname -a
Linux OpenIL 4.14.47-ipipe #3 SMP PREEMPT Wed May 15 16:53:11 CST 2019 armv7l GNU/Linux

0 Kudos
Reply