sedlalu2
Posts: 4
Joined: Tue Jan 31, 2017 9:26 pm

Qt3D not working on PiB+

Tue Jan 31, 2017 10:26 pm

Hello,
I have already asked this question on Qt forum but with no response so I have decided to make a repost here:

I've recently got my raspberry pi B+. I cross-compiled Qt5.8 library and everything seems to be working just fine except Qt3d (QML).

When I want to run an example of 3D (offical examples included in 5.8 libary) then no error is occured in terminal, but the required object is not here. For example when I want to run example "wireframe" then application is running without any error but all I can see is white screen. Then there are
examples like "simple-qml" which are causing segmentation fault (in fragment shader). This behaviour is really odd.

Can you help me solve this problem? I am trying to solve for almost a week. I really need to solve this problem now because this is part of my diploma thesis.

Configure options:

Code: Select all

-opengl es2 -optimized-qmake -no-pch -make libs -make tools -reduce-exports -sysroot /mnt/rasp -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/lukas/raspberry/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -prefix /usr/local/rasp -opensource -nomake examples -nomake tests -confirm-license -skip qtmultimedia -skip qtcharts -skip qtsensors -skip qtgamepad -skip qtmacextras -skip qtandroidextras -skip qtwayland
Raspberry is running Raspbian Lite - according to my diploma thesis is better to have system without X11.
Cross compilation made from Linux Mint 17.2 with gcc linaro tool (v4.9 compiler)

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt3D not working on PiB+

Wed Feb 01, 2017 2:59 pm

Can you show us the output of "ldd ./yourbinary", I'm interested to see which GLES libraries are used.
Also you could see if you get some debug by using "export QT_QPA_EGLFS_DEBUG=1" before running your program. ( ref: http://doc.qt.io/qt-5/embedded-linux.html )

sedlalu2
Posts: 4
Joined: Tue Jan 31, 2017 9:26 pm

Re: Qt3D not working on PiB+

Wed Feb 01, 2017 7:57 pm

Output from my ldd ./wireframe is:

Code: Select all

/usr/lib/arm-linux-gnueabihf/libarmmem.so (0xb6fcf000)
	libQt53DExtras.so.5 => /usr/local/qt5pi/lib/libQt53DExtras.so.5 (0xb6f6d000)
	libQt53DQuickExtras.so.5 => /usr/local/qt5pi/lib/libQt53DQuickExtras.so.5 (0xb6f67000)
	libQt5Concurrent.so.5 => /usr/local/qt5pi/lib/libQt5Concurrent.so.5 (0xb6f62000)
	libQt53DRender.so.5 => /usr/local/qt5pi/lib/libQt53DRender.so.5 (0xb6db9000)
	libQt53DInput.so.5 => /usr/local/qt5pi/lib/libQt53DInput.so.5 (0xb6d46000)
	libQt53DLogic.so.5 => /usr/local/qt5pi/lib/libQt53DLogic.so.5 (0xb6d3b000)
	libQt53DQuick.so.5 => /usr/local/qt5pi/lib/libQt53DQuick.so.5 (0xb6d1c000)
	libQt53DCore.so.5 => /usr/local/qt5pi/lib/libQt53DCore.so.5 (0xb6cd5000)
	libQt5Gamepad.so.5 => /usr/local/qt5pi/lib/libQt5Gamepad.so.5 (0xb6cbd000)
	libQt5Quick.so.5 => /usr/local/qt5pi/lib/libQt5Quick.so.5 (0xb696d000)
	libQt5Gui.so.5 => /usr/local/qt5pi/lib/libQt5Gui.so.5 (0xb652c000)
	libQt5Qml.so.5 => /usr/local/qt5pi/lib/libQt5Qml.so.5 (0xb620a000)
	libQt5Network.so.5 => /usr/local/qt5pi/lib/libQt5Network.so.5 (0xb60a9000)
	libQt5Core.so.5 => /usr/local/qt5pi/lib/libQt5Core.so.5 (0xb5c0b000)
	libGLESv2.so => /opt/vc/lib/libGLESv2.so (0xb5be5000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb5bbd000)
	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb5ae1000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb5a66000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb5a39000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb58f7000)
	libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0xb58c7000)
	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb58a0000)
	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb5888000)
	libicui18n.so.52 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.52 (0xb56c8000)
	libicuuc.so.52 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.52 (0xb557f000)
	libicudata.so.52 => /usr/lib/arm-linux-gnueabihf/libicudata.so.52 (0xb3f02000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb3eef000)
	libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0xb3edd000)
	libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0xb3dd9000)
	/lib/ld-linux-armhf.so.3 (0x7f5d4000)
	libEGL.so => /opt/vc/lib/libEGL.so (0xb3da0000)
	libbcm_host.so => /opt/vc/lib/libbcm_host.so (0xb3d7a000)
	libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0xb3d64000)
	libvcos.so => /opt/vc/lib/libvcos.so (0xb3d4a000)
	libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0xb3cd6000)
and output from ./wireframe when debug log is enagled:

Code: Select all

Created context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 4, swapBehavior QSurfaceFormat::SwapBehavior(DefaultSwapBehavior), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) with config:
	EGL_BUFFER_SIZE: 16
	EGL_ALPHA_SIZE: 0
	EGL_BLUE_SIZE: 5
	EGL_GREEN_SIZE: 6
	EGL_RED_SIZE: 5
	EGL_DEPTH_SIZE: 24
	EGL_STENCIL_SIZE: 8
	EGL_CONFIG_CAVEAT: 12344
	EGL_CONFIG_ID: 21
	EGL_LEVEL: 0
	EGL_MAX_PBUFFER_HEIGHT: 2048
	EGL_MAX_PBUFFER_PIXELS: 4194304
	EGL_MAX_PBUFFER_WIDTH: 2048
	EGL_NATIVE_RENDERABLE: 1
	EGL_NATIVE_VISUAL_ID: 107544
	EGL_NATIVE_VISUAL_TYPE: 12344
	EGL_SAMPLES: 4
	EGL_SAMPLE_BUFFERS: 1
	EGL_SURFACE_TYPE: 1639
	EGL_TRANSPARENT_TYPE: 12344
	EGL_TRANSPARENT_BLUE_VALUE: 0
	EGL_TRANSPARENT_GREEN_VALUE: 0
	EGL_TRANSPARENT_RED_VALUE: 0
	EGL_BIND_TO_TEXTURE_RGB: 0
	EGL_BIND_TO_TEXTURE_RGBA: 0
	EGL_MIN_SWAP_INTERVAL: 0
	EGL_MAX_SWAP_INTERVAL: 2147483647

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Qt3D not working on PiB+

Wed Feb 01, 2017 10:12 pm

It was the references to libraries is "/opt/vc" I was looking for in the "ldd" output, and that look correct to my eyes.

Someone else with detailed knowledge about OpenGLES might be able to see something in the debug output.

I dont know if the chances are greater if you move the thread to the OpenGLES subforum: viewforum.php?f=68
If you report your own thread a moderator can move it. but wait a few days to see if someone else has better answers.

Is Qt3D new in Qt5.8 ?

sedlalu2
Posts: 4
Joined: Tue Jan 31, 2017 9:26 pm

Re: Qt3D not working on PiB+

Fri Feb 03, 2017 7:53 am

Thank you for your answer.

I will wait few days and I will see.
Btw, I think Qt3D has been included in Qt since 5.7 release.

Return to “Graphics programming”