OpenGL ES2. Cross-compile for Beaglebone Black using OS Debian when built QT5.7.0
-
Hi everybody, i have a troupble when i built the QT 5.7 everywhere for Beaglebone using OS debian (cross-compile on PC Ubuntu), i want "-opengl es2" in my configure but i encountering
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,
And i don't know to install OpenGL ES2.0 for ARM in my PC Ubuntu, i researched how to install OpenGL 2.0 to tool-chain for Beaglebone and i was readed about 200 result in google, topics discuss in QT forum but nothing can help me or fix the us the problem, Then, who ever install tool-chains OpenGL ES2 for Beaglebone on Ubuntu can help me? it took me one week to built it's, i was tired. Thanks for read!
exactly i want below:
Debug .................. no C++11 support .......... yes pkg-config ............. yes QtDBus module .......... yes (run-time) QtConcurrent code ...... yes QtGui module ........... yes QtWidgets module ....... yes JavaScriptCore JIT ..... To be decided by JavaScriptCore QML debugging .......... yes PCH support ............ no iWMMXt support ......... no NEON support ........... yes IPv6 ifname support .... yes getaddrinfo support .... yes getifaddrs support ..... yes Accessibility .......... yes NIS support ............ yes //CUPS support ........... no Iconv support .......... yes Glib support ........... no GStreamer support ...... no PulseAudio support ..... no Large File support ..... yes GIF support ............ plugin JPEG support ........... plugin (qt) PNG support ............ yes (system) zlib support ........... system Session management ..... auto libudev support ........ yes Use system proxies ..... no OpenGL support ......... yes (OpenGL ES 2.x) OpenVG support ......... no XShape support ......... auto XVideo support ......... auto XSync support .......... auto Xinerama support ....... runtime Xcursor support ........ runtime Xfixes support ......... runtime Xrandr support ......... runtime Xi support ............. runtime Xi2 support ............ auto MIT-SHM support ........ auto FontConfig support ..... yes XKB Support ............ auto GTK theme support ...... no SQLite support ......... plugin (qt) OpenSSL support ........ yes (run-time) Alsa support ........... yes libICU support ......... yes PCRE support ........... qt Xcb support ............ no Xrender support ........ yes EGLFS support .......... yes DirectFB support ....... no LinuxFB support ........ yes KMS support ............ no
-
Hi,
AFAIK, the files needed should be available in your BBB sysroot.
-
You need to cross-compile mesa-12(a kind of implement for opengl es) and then link the headers and the libraries generated to Qt compiling.
-
@small_bird you can give me link about that? i was try Mesa and Mali but it's not success ( or i wrong some step) i really need a tutorial! thanks
-
@Dang-Vu Of course, http://www.360doc.com/content/15/0108/18/5268588_439214065.shtml. It is the web site in China. Can you see that?
-
@small_bird Hi sir! i built Mesa for arm with configure
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
and install successed!
in linux-beagleboard-g++ qmake.conf i writen# # qmake configuration for the BeagleBoard and BeagleBoard xM boards # http://beagleboard.org/ MAKEFILE_GENERATOR = UNIX CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) load(device_config) QT_QPA_DEFAULT_PLATFORM = eglfs # modifications to g++.conf QMAKE_CC = $${CROSS_COMPILE}gcc QMAKE_CXX = $${CROSS_COMPILE}g++ QMAKE_LINK = $${QMAKE_CXX} QMAKE_LINK_SHLIB = $${QMAKE_CXX} # modifications to linux.conf QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_NM = $${CROSS_COMPILE}nm -P QMAKE_STRIP = $${CROSS_COMPILE}strip COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb #modifications to gcc-base.conf QMAKE_CFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS += $${COMPILER_FLAGS} QMAKE_CXXFLAGS_RELEASE += -O3 QMAKE_LIBS += -lrt -lpthread -ldl # Extra stuff (OpenGL, DirectFB, ...) QMAKE_INCDIR_EGL =/usr/local/Mesa/include/EGL QMAKE_LIBDIR_EGL =/usr/local/Mesa/lib QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL} QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL} QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL} QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL} QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL} DISTRO_OPTS += hard-float # No need for any special EGL device integration. # Prioritize the default, compiled-in integration over any plugins. EGLFS_DEVICE_INTEGRATION = none include(../common/linux_arm_device_post.conf) load(qt_config)
but i still have an error
/usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status Makefile:90: recipe for target 'opengles2' failed make: *** [opengles2] Error 1 OpenGL ES 2.0 disabled. The OpenGL ES 2.0 functionality test failed!
what can i do to built QT for beaglebone! i really- really need a tutorial! thanks! hix...
-
@jsulm Dir Sir! i make and install Mesa in here! i built Mesa with linaro toolchains(arm- linux-gnueabihf) !
i thinkQMAKE_LIBDIR_EGL =/usr/local/Mesa/lib
i right!? i can see libGLESv2.so in that(/usr/local/Mesa/lib)! but it not work when i configure QT with -opengl es2. you nees a that file? i cant send it for you!
-
@Dang-Vu Can you please execute this command in a shell:
file /usr/local/Mesa/lib/libGLESv2.so
and post its output here?
This message:
/usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
means that the library has a wrong format. That's why I want to see the output of that command: it will tell for which CPU architecture it was built.
-
@jsulm sorry Sir! my mistake, file /usr/local/Mesa/lib/libGLESv2.so.2.0.0 it 's tell me i only use for x86-linux but not for arm! well, while i configure Mesa
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
what is step i wrong sir? i thinks i successed to built Mesa3d for Arm but it's not true! you can fix it's, Sir?
-
@jsulm i download Mesa3d from https://mesa.freedesktop.org/archive/13.0.1/mesa-13.0.1.tar.gz , in linux host( ubuntu16.04) i install linaro toolchains in terminal
$ sudo apt-get install gcc-arm-linux-gnueabi $ sudo apt-get install g++-arm-linux-gnueabi $ sudo apt-get install gcc-arm-linux-gnueabihf $ sudo apt-get install g++-arm-linux-gnueabihf
and i configure Mesa below:
./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
i make and install succsed in /usr/local/Mesa