Bug 11556 - Can not build qt5base 5.11.2 with weston 3.0.0 and vivante GPU. error: invalid conversion from ‘void*’ to ‘EGLNativeDisplayType {aka wl_display*}’ [-fpermissive]
Summary: Can not build qt5base 5.11.2 with weston 3.0.0 and vivante GPU. error: invali...
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2018.11
Hardware: Other Linux
: P5 blocker
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-10 16:17 UTC by Patrick Koller
Modified: 2024-06-15 14:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
Patch to reproduce the problem (13.17 KB, patch)
2018-12-10 16:17 UTC, Patrick Koller
Details
Patch to reproduce the problem (13.12 KB, patch)
2018-12-12 16:29 UTC, Patrick Koller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Koller 2018-12-10 16:17:38 UTC
Created attachment 7896 [details]
Patch to reproduce the problem

There is a 100% reproduceable error with the attached patch. The full error looks like this:



qeglfsvivwlintegration.cpp: In member function ‘virtual void QEglFSVivWaylandIntegration::platformInit()’:
qeglfsvivwlintegration.cpp:63:50: error: invalid conversion from ‘void*’ to ‘EGLNativeDisplayType {aka wl_display*}’ [-fpermissive]
     mNativeDisplay = fbGetDisplay(mWaylandDisplay);
                                                  ^
qeglfsvivwlintegration.cpp: In member function ‘virtual wl_egl_window* QEglFSVivWaylandIntegration::createNativeWindow(QPlatformWindow*, const QSize&, const QSurfaceFormat&)’:
qeglfsvivwlintegration.cpp:84:101: error: invalid conversion from ‘void*’ to ‘EGLNativeWindowType {aka wl_egl_window*}’ [-fpermissive]
     EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
                                                                                                     ^
qeglfsvivintegration.cpp: In member function ‘virtual void QEglFSVivIntegration::platformInit()’:
qeglfsvivintegration.cpp:68:60: error: invalid conversion from ‘void*’ to ‘EGLNativeDisplayType {aka wl_display*}’ [-fpermissive]
     mNativeDisplay = fbGetDisplayByIndex(framebufferIndex());
                                                            ^
qeglfsvivintegration.cpp: In member function ‘virtual wl_egl_window* QEglFSVivIntegration::createNativeWindow(QPlatformWindow*, const QSize&, const QSurfaceFormat&)’:
qeglfsvivintegration.cpp:91:101: error: invalid conversion from ‘void*’ to ‘EGLNativeWindowType {aka wl_egl_window*}’ [-fpermissive]
     EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
                                                                                                     ^
Makefile:1305: recipe for target '.obj/qeglfsvivwlintegration.o' failed
make[7]: *** [.obj/qeglfsvivwlintegration.o] Error 1
make[7]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5base-5.11.2/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl'
Makefile:123: recipe for target 'sub-eglfs_viv_wl-make_first' failed
make[6]: *** [sub-eglfs_viv_wl-make_first] Error 2
make[6]: *** Waiting for unfinished jobs....
Makefile:1305: recipe for target '.obj/qeglfsvivintegration.o' failed
make[7]: *** [.obj/qeglfsvivintegration.o] Error 1
make[7]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5base-5.11.2/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv'
Makefile:98: recipe for target 'sub-eglfs_viv-make_first' failed
make[6]: *** [sub-eglfs_viv-make_first] Error 2



*** Reproduce the Problem ***
To reproduce the problem, please follow these steps:
- Apply the attached patch to buildroot 2018.11
- make polytab_defconfig
- make

*** Hardware used ***
The used computer on module is a Ka-Ro TX6Q. If you supply a patch for my problem, I am able to test it instantly, since I have a working hardware next to me.
https://www.karo-electronics.de/743.html

*** Goal ***
The goal is to have a successful build with a working weston integration with hardware acceleration.
Comment 1 Peter Seiderer 2018-12-11 21:54:39 UTC
(In reply to Patrick Koller from comment #0)

Hello Patrick,

no actual experience with the imx-gpu-viv package and qt/wayland, but
a quick test with your provided polytab_defconfig showed the same error.

Second test was without qt, only wayland/weston, did not compile out of the box, a quick fix was to upgrade to a buildroot toolchain instead of the given gcc-linaro-4.9.4 toolchain (did not investigate further).

You can try to fix the eglfs_viv_wl errors (by adding the needed pointer casts) or disabling qt eglfs support (with wayland/weston your want to run your
application with '-platform wayland' instead '-platform eglfs'), or try to
run wayland/weston only first (without Qt)...

And last but not least you can try to run the open source etnaviv support (see e.g. imx6-sabresd_qt5_defconfig, your need to enable etnaviv support in librm, mesa3d and linux mainline kernel)...

Regards,
Peter
Comment 2 Patrick Koller 2018-12-12 16:29:15 UTC
Created attachment 7901 [details]
Patch to reproduce the problem

This patch provides the configuration to build my project with weston-imx successfully without Qt5. As soon as Qt5 is selected, the build fails as follows:

*** Reproduce the Qt5 build error ***
- Apply the attached patch to buildroot-2018.11
- make polytab_defconfig
- make
- Get the error:
qeglfsvivintegration.cpp:68:60: error: invalid conversion from ‘void*’ to ‘EGLNativeDisplayType {aka wl_display*}’ [-fpermissive]

*** Reproduce a successful build ***
- Apply the attached patch to buildroot-2018.11
- make polytab_defconfig
- make xconfig
- uncheck Qt5
- make
Comment 3 Patrick Koller 2018-12-13 10:43:26 UTC
Weston/Wayland without Qt is working fine. The vivante examples are working excellent, too.

@Peter:
Thanks for your suggestions. I can not disable qt eglfs support completly, since I need the qt5webengine in my application, which requires eglfs support. So, my next step is to add the needed pointer casts and hope for success. I will report my progress here.
Comment 4 Patrick Koller 2018-12-13 15:51:10 UTC
The previously mentioned error could be solved by casting the pointers manually. Thanks to @Peter.
**************************************************
Nevertheless, I am facing this new error:

qwaylanddisplay.cpp: In member function ‘void QtWaylandClient::QWaylandDisplay::addRegistryListener(QtWaylandClient::RegistryListener, void*)’:
qwaylanddisplay.cpp:315:35: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’ to ‘QtWaylandClient::QWaylandDisplay::Listener’
     Listener l = { listener, data };
                                   ^
Makefile:1435: recipe for target '.obj/qwaylanddisplay.o' failed
make[3]: *** [.obj/qwaylanddisplay.o] Error 1
make[3]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/client'
Makefile:73: recipe for target 'sub-client-make_first' failed
make[2]: *** [sub-client-make_first] Error 2
make[2]: *** Waiting for unfinished jobs....
extensions/qwaylandxdgshellv6.cpp: In member function ‘uint QWaylandXdgToplevelV6::sendConfigure(const QSize&, const QVector<QWaylandXdgToplevelV6::State>&)’:
extensions/qwaylandxdgshellv6.cpp:957:100: error: no matching function for call to ‘QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(<brace-enclosed initializer list>)’
     d->m_pendingConfigures.append(QWaylandXdgToplevelV6Private::ConfigureEvent{states, size, serial});
                                                                                                    ^
extensions/qwaylandxdgshellv6.cpp:957:100: note: candidates are:
In file included from extensions/qwaylandxdgshellv6.cpp:38:0:
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent()
     struct ConfigureEvent {
            ^
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 0 arguments, 3 provided
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(const QWaylandXdgToplevelV6Private::ConfigureEvent&)
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 1 argument, 3 provided
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(QWaylandXdgToplevelV6Private::ConfigureEvent&&)
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 1 argument, 3 provided
Makefile:3517: recipe for target '.obj/qwaylandxdgshellv6.o' failed
make[3]: *** [.obj/qwaylandxdgshellv6.o] Error 1
make[3]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/compositor'
Makefile:98: recipe for target 'sub-compositor-make_first' failed
make[2]: *** [sub-compositor-make_first] Error 2
make[2]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2'
package/pkg-generic.mk:229: recipe for target '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/.stamp_built' failed
make: *** [/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/.stamp_built] Error 2
**************************************************
I will investigate further and report my progress here.
Comment 5 Peter Seiderer 2018-12-13 20:02:35 UTC
(In reply to Patrick Koller from comment #3)

Try the following patch:

diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
index 744d659567..c29c239342 100644
--- a/package/qt5/qt5webengine/Config.in
+++ b/package/qt5/qt5webengine/Config.in
@@ -50,7 +50,7 @@ config BR2_PACKAGE_QT5WEBENGINE
        select BR2_PACKAGE_WEBP
        select BR2_PACKAGE_WEBP_DEMUX
        select BR2_PACKAGE_QT5BASE_DBUS
-       select BR2_PACKAGE_QT5BASE_EGLFS
+       select BR2_PACKAGE_QT5BASE_EGLFS if !BR2_PACKAGE_QT5WAYLAND=y
        select BR2_PACKAGE_QT5BASE_FONTCONFIG
        select BR2_PACKAGE_QT5BASE_ICU
        select BR2_PACKAGE_QT5BASE_GUI

And try to enable/build qt5webengine (and keep qt eglfs support disabled),
builds fine here, not run time tested...

The imx-gpu-viv/qt eglfs compile problem (if there is no easy/quick fix) is better addressed at a qt mailing list/qt bugtracker (if you do so, please
link it from here)...
Comment 6 Patrick Koller 2018-12-17 14:15:40 UTC
Thanks @Peter for your patch.

The qt5webengine has been built just fine, nevertheless there was raised an error during the following "installing to target" step. The cp command complained, there are no libs to copy and indeed, there are no libs present. Why is the buildprocess successfull without creating any libs? Please have a look at the following error message:

**************************************************
>>> qt5webengine 5.11.2 Building
PATH="/home/patrickk/tmp/buildroot/eglfs_patch/output/host/bin:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/sbin:/home/patrickk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" PATH=/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/host-bin:"/home/patrickk/tmp/buildroot/eglfs_patch/output/host/bin:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/sbin:/home/patrickk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" NINJAFLAGS="-j9" GN_PKG_CONFIG_HOST=/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/host-bin/host-pkg-config /usr/bin/make -j9 -C /home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2
make[1]: Entering directory '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2'
>>> qt5webengine 5.11.2 Installing to staging directory
PATH="/home/patrickk/tmp/buildroot/eglfs_patch/output/host/bin:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/sbin:/home/patrickk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" PATH=/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/host-bin:"/home/patrickk/tmp/buildroot/eglfs_patch/output/host/bin:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/sbin:/home/patrickk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" NINJAFLAGS="-j9" GN_PKG_CONFIG_HOST=/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/host-bin/host-pkg-config /usr/bin/make -j9 -C /home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2 install
make[1]: Entering directory '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2'
for i in $(find /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib* -name "libQt5*.la"); do /usr/bin/sed -i -e  "s:/home/patrickk/tmp/buildroot/eglfs_patch/output:@BASE_DIR@:g" -e "s:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot:@STAGING_DIR@:g" -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" -e "s:@STAGING_DIR@:/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot:g" -e "s:@BASE_DIR@:/home/patrickk/tmp/buildroot/eglfs_patch/output:g" $i ; /usr/bin/sed -i -e "/^dependency_libs=/s%-L/usr/lib %%g" $i ; done
for i in $(find /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib* -name "libQt5*.prl"); do /usr/bin/sed -i -e "s%-L/usr/lib%%" $i; done
>>> qt5webengine 5.11.2 Fixing libtool files
>>> qt5webengine 5.11.2 Installing to target
cp -dpf /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.* /home/patrickk/tmp/buildroot/eglfs_patch/output/target/usr/lib
cp: cannot stat '/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*': No such file or directory
package/pkg-generic.mk:310: recipe for target '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/.stamp_target_installed' failed
make: *** [/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/.stamp_target_installed] Error 1
patrickk@lites:~/tmp/buildroot/eglfs_patch> make
>>> qt5webengine 5.11.2 Installing to target
cp -dpf /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.* /home/patrickk/tmp/buildroot/eglfs_patch/output/target/usr/lib
cp: cannot stat '/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*': No such file or directory
package/pkg-generic.mk:310: recipe for target '/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/.stamp_target_installed' failed
make: *** [/home/patrickk/tmp/buildroot/eglfs_patch/output/build/qt5webengine-5.11.2/.stamp_target_installed] Error 1
patrickk@lites:~/tmp/buildroot/eglfs_patch> kate output/build/qt5wayland-5.11.2/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp 
patrickk@lites:~/tmp/buildroot/eglfs_patch> kate output/build/qt5wayland-5.11.2/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp 
patrickk@lites:~/tmp/buildroot/eglfs_patch> l /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*
ls: cannot access '/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*': No such file or directory
patrickk@lites:~/tmp/buildroot/eglfs_patch> l /home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*
ls: cannot access '/home/patrickk/tmp/buildroot/eglfs_patch/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5WebEngine*.so.*': No such file or directory
**************************************************
Comment 7 Peter Seiderer 2018-12-17 17:38:02 UTC
(In reply to Patrick Koller from comment #6)

Strange, the copy source paths should be

/home/patrickk/tmp/buildroot/eglfs_patch/output/staging/usr/lib/libQt5WebEngine*.so.*

...but should not matter, because staging is a symlink to host/arm-buildroot-linux-gnueabihf/sysroot...


Can you find the libs somewhere else (e.g. the build directory)?

Do you use ccache and hit by [1] (you need a buildroot git update or [2])?

Try a complete re-build (make clean; make)?

Any errors in the qt5webengine unpack/configure steps?

Regards,
Peter

[1] http://lists.busybox.net/pipermail/buildroot/2018-December/238290.html
[2] http://lists.busybox.net/pipermail/buildroot/2018-December/238339.html
Comment 8 Patrick Koller 2018-12-18 16:20:28 UTC
Hi Peter

Thanks for your reply. No, I did not use the ccache nor were there any errors in the qt5webengine unpack/configure steps.

Nevertheless, after a "make clean" (Which I also made before my last post) shows now the "qt5wayland" first:

**************************************************
>>> qt5wayland 5.11.2 Building
PATH="/home/patrickk/tmp/buildroot/a/output/host/bin:/home/patrickk/tmp/buildroot/a/output/host/sbin:/home/patrickk/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" /usr/bin/make -j9 -C /home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2
make[1]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2'
cd src/ && ( test -e Makefile || /home/patrickk/tmp/buildroot/a/output/host/bin/qmake -o Makefile /home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/src.pro CONFIG+=wayland-compositor ) && /usr/bin/make -f Makefile 
make[2]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src'
cd qtwaylandscanner/ && ( test -e Makefile || /home/patrickk/tmp/buildroot/a/output/host/bin/qmake -o Makefile /home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/qtwaylandscanner/qtwaylandscanner.pro CONFIG+=wayland-compositor ) && /usr/bin/make -f Makefile 
make[3]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/qtwaylandscanner'
make[3]: Nothing to be done for 'first'.
make[3]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/qtwaylandscanner'
cd client/ && ( test -e Makefile || /home/patrickk/tmp/buildroot/a/output/host/bin/qmake -o Makefile /home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/client/client.pro CONFIG+=wayland-compositor ) && /usr/bin/make -f Makefile 
cd compositor/ && ( test -e Makefile || /home/patrickk/tmp/buildroot/a/output/host/bin/qmake -o Makefile /home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/compositor/compositor.pro CONFIG+=wayland-compositor ) && /usr/bin/make -f Makefile 
make[3]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/client'
/home/patrickk/tmp/buildroot/a/output/host/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_WAYLANDCLIENT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_SERVICE_SUPPORT_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../shared -Ihardwareintegration -Ishellintegration -Iinputdeviceintegration -Iglobal -I../../include -I../../include/QtWaylandClient -I../../include/QtWaylandClient/5.11.2 -I../../include/QtWaylandClient/5.11.2/QtWaylandClient -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/5.11.2/QtGui -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore/5.11.2/QtCore -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtFontDatabaseSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtFontDatabaseSupport/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtFontDatabaseSupport/5.11.2/QtFontDatabaseSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtEventDispatcherSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtEventDispatcherSupport/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtEventDispatcherSupport/5.11.2/QtEventDispatcherSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtThemeSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtThemeSupport/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtThemeSupport/5.11.2/QtThemeSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtServiceSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtServiceSupport/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtServiceSupport/5.11.2/QtServiceSupport -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtDBus -I.moc -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -I/home/patrickk/tmp/buildroot/a/output/host/mkspecs/devices/linux-imx6-g++ -o .obj/qwaylanddisplay.o qwaylanddisplay.cpp
make[3]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/compositor'
/home/patrickk/tmp/buildroot/a/output/host/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_WAYLAND_COMPOSITOR_QUICK -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_WAYLANDCOMPOSITOR_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../shared -Iglobal -Iwayland_wrapper -Icompositor_api -Iextensions -I../../include -I../../include/QtWaylandCompositor -I../../include/QtWaylandCompositor/5.11.2 -I../../include/QtWaylandCompositor/5.11.2/QtWaylandCompositor -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick/5.11.2/QtQuick -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/5.11.2/QtGui -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml/5.11.2/QtQml -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore/5.11.2 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore/5.11.2/QtCore -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQuick -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtQml -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtNetwork -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I.moc -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -isystem /home/patrickk/tmp/buildroot/a/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include -I/home/patrickk/tmp/buildroot/a/output/host/mkspecs/devices/linux-imx6-g++ -o .obj/qwaylandxdgshellv6.o extensions/qwaylandxdgshellv6.cpp
qwaylanddisplay.cpp: In member function ‘void QtWaylandClient::QWaylandDisplay::addRegistryListener(QtWaylandClient::RegistryListener, void*)’:
qwaylanddisplay.cpp:315:35: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’ to ‘QtWaylandClient::QWaylandDisplay::Listener’
     Listener l = { listener, data };
                                   ^
Makefile:1435: recipe for target '.obj/qwaylanddisplay.o' failed
make[3]: *** [.obj/qwaylanddisplay.o] Error 1
make[3]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/client'
Makefile:73: recipe for target 'sub-client-make_first' failed
make[2]: *** [sub-client-make_first] Error 2
make[2]: *** Waiting for unfinished jobs....
extensions/qwaylandxdgshellv6.cpp: In member function ‘uint QWaylandXdgToplevelV6::sendConfigure(const QSize&, const QVector<QWaylandXdgToplevelV6::State>&)’:
extensions/qwaylandxdgshellv6.cpp:957:100: error: no matching function for call to ‘QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(<brace-enclosed initializer list>)’
     d->m_pendingConfigures.append(QWaylandXdgToplevelV6Private::ConfigureEvent{states, size, serial});
                                                                                                    ^
extensions/qwaylandxdgshellv6.cpp:957:100: note: candidates are:
In file included from extensions/qwaylandxdgshellv6.cpp:38:0:
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent()
     struct ConfigureEvent {
            ^
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 0 arguments, 3 provided
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(const QWaylandXdgToplevelV6Private::ConfigureEvent&)
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 1 argument, 3 provided
extensions/qwaylandxdgshellv6_p.h:137:12: note: QWaylandXdgToplevelV6Private::ConfigureEvent::ConfigureEvent(QWaylandXdgToplevelV6Private::ConfigureEvent&&)
extensions/qwaylandxdgshellv6_p.h:137:12: note:   candidate expects 1 argument, 3 provided
Makefile:3517: recipe for target '.obj/qwaylandxdgshellv6.o' failed
make[3]: *** [.obj/qwaylandxdgshellv6.o] Error 1
make[3]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/compositor'
Makefile:98: recipe for target 'sub-compositor-make_first' failed
make[2]: *** [sub-compositor-make_first] Error 2
make[2]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2'
package/pkg-generic.mk:229: recipe for target '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/.stamp_built' failed
make: *** [/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/.stamp_built] Error 2
**************************************************

Does anybody have an idea, why this happens?
Thanks in advance.
Comment 9 Peter Seiderer 2018-12-18 22:38:44 UTC
(In reply to Patrick Koller from comment #6)

Still the same advice:

> Second test was without qt, only wayland/weston, did not compile out of the
> box, a quick fix was to upgrade to a buildroot toolchain instead of the given
> gcc-linaro-4.9.4 toolchain (did not investigate further).

Did run my successful build with buildroot gcc-7.4.0 toolchain...
Comment 10 Patrick Koller 2018-12-19 16:00:48 UTC
Hi Peter,

Thanks for your hint. Now, I am able to build wayland/weston (without qt) sucessfully (With both toolchains). As soon as I try to build qt5, the previous mentioned error (qwaylanddisplay.cpp:315:35: error: could not convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’ to ‘QtWaylandClient::QWaylandDisplay::Listener’) occurs. Do you have a hint to solve this problem?
Thanks in advance.


Best regards

Patrick
Comment 11 Peter Seiderer 2018-12-19 17:17:35 UTC
(In reply to Patrick Koller from comment #10)

> Thanks for your hint. Now, I am able to build wayland/weston (without qt)
> sucessfully (With both toolchains). As soon as I try to build qt5, the
> previous mentioned error (qwaylanddisplay.cpp:315:35: error: could not
> convert ‘{listener, data}’ from ‘<brace-enclosed initializer list>’ to
> ‘QtWaylandClient::QWaylandDisplay::Listener’) occurs. Do you have a
> hint to solve this problem?

Please do not mix toolchains, I doubt wayland/weston builds with the linaro
toolchain (see comment #1), please re-build complete (make clean; make) (the complete buildroot build, not only a single package)  after changing to the buildroot toolchain (used buildroot git latest, gcc-7.4.0, qt-5.11.3)...

In case of failure post your .config/defconfig
Comment 12 Peter Seiderer 2018-12-19 18:01:32 UTC
(In reply to Peter Seiderer from comment #11)

From your build failure log:

make[3]: Entering directory '/home/patrickk/tmp/buildroot/a/output/build/qt5wayland-5.11.2/src/compositor'

...disable the BR2_PACKAGE_QT5WAYLAND_COMPOSITOR option and try again (this time
after make qt5wayland-dirclean), no need for the qt5wayland compositor, you have
already weston enabled)...

Regards,
Peter
Comment 13 Peter Seiderer 2018-12-20 20:26:17 UTC
Changes on base of given patch to fix compile of polytab_defconfig:

- relax qt5webengine dependency:

--- a/package/qt5/qt5webengine/Config.in
+++ b/package/qt5/qt5webengine/Config.in
@@ -50,7 +50,7 @@ config BR2_PACKAGE_QT5WEBENGINE
        select BR2_PACKAGE_WEBP
        select BR2_PACKAGE_WEBP_DEMUX
        select BR2_PACKAGE_QT5BASE_DBUS
-       select BR2_PACKAGE_QT5BASE_EGLFS
+       select BR2_PACKAGE_QT5BASE_EGLFS if !BR2_PACKAGE_QT5WAYLAND=y
        select BR2_PACKAGE_QT5BASE_FONTCONFIG
        select BR2_PACKAGE_QT5BASE_ICU
        select BR2_PACKAGE_QT5BASE_GUI


- fix eglfs_viv/eglfs_viv_wl (only compile tested):

--- /dev/null
+++ b/package/qt5/qt5base/5.11.3/0005-fix-eglfs_viv.patch
@@ -0,0 +1,20 @@
+--- qt5base-5.11.3/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp_orig       2018-12-20 21:01:22.231473846 +0100
++++ qt5base-5.11.3/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp    2018-12-20 21:03:27.017742819 +0100
+@@ -65,7 +65,7 @@
+     VivanteInit();
+     mNativeDisplay = fbGetDisplay();
+ #else
+-    mNativeDisplay = fbGetDisplayByIndex(framebufferIndex());
++    mNativeDisplay = (EGLNativeDisplayType)fbGetDisplayByIndex(framebufferIndex());
+ #endif
+ 
+     fbGetDisplayGeometry(mNativeDisplay, &width, &height);
+@@ -88,7 +88,7 @@
+     Q_UNUSED(window)
+     Q_UNUSED(format)
+ 
+-    EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
++    EGLNativeWindowType eglWindow = (EGLNativeWindowType)fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
+     return eglWindow;
+ }
+ 

--- /dev/null
+++ b/package/qt5/qt5base/5.11.3/0006-fix-eglfs_viv_wl.patch
@@ -0,0 +1,20 @@
+--- qt5base-5.11.3/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp_orig  2018-12-20 21:03:59.154328914 +0100
++++ qt5base-5.11.3/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/qeglfsvivwlintegration.cpp       2018-12-20 21:06:45.217366833 +0100
+@@ -60,7 +60,7 @@
+     }
+ 
+     mWaylandDisplay = wl_display_create();
+-    mNativeDisplay = fbGetDisplay(mWaylandDisplay);
++    mNativeDisplay = (EGLNativeDisplayType)fbGetDisplay(mWaylandDisplay);
+     fbGetDisplayGeometry(mNativeDisplay, &width, &height);
+     mScreenSize.setHeight(height);
+     mScreenSize.setWidth(width);
+@@ -81,7 +81,7 @@
+     Q_UNUSED(window)
+     Q_UNUSED(format)
+ 
+-    EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
++    EGLNativeWindowType eglWindow = (EGLNativeWindowType)fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
+     return eglWindow;
+ }
+ 


- use up to date toolchain/remove extra qt5 configure options, re-select eglfs:

--- a/configs/polytab_defconfig
+++ b/configs/polytab_defconfig
@@ -5,15 +5,8 @@ BR2_ARM_ENABLE_VFP=y
 BR2_ARM_FPU_VFPV3=y
 BR2_OPTIMIZE_3=y
 # BR2_COMPILER_PARANOID_UNSAFE_PATH is not set
-BR2_TOOLCHAIN_EXTERNAL=y
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
-BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
-BR2_TOOLCHAIN_EXTERNAL_URL="https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf.tar.xz"
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-linux-gnueabihf"
-BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
-BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0=y
-BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
-BR2_TOOLCHAIN_EXTERNAL_CXX=y
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_TARGET_GENERIC_HOSTNAME="polytab"
 BR2_TARGET_GENERIC_ISSUE="Welcome"
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
@@ -32,19 +25,15 @@ BR2_PACKAGE_GST1_IMX_V4L2VIDEOSRC=y
 BR2_PACKAGE_DEJAVU=y
 BR2_PACKAGE_LIBERATION=y
 BR2_PACKAGE_QT5=y
-BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS="-v -opensource -confirm-license -make libs -device imx6 -compile-examples -no-opengl -opengl es2"
 BR2_PACKAGE_QT5BASE_EXAMPLES=y
 BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
 BR2_PACKAGE_QT5BASE_LINUXFB=y
+BR2_PACKAGE_QT5BASE_EGLFS=y
 BR2_PACKAGE_QT5BASE_DEFAULT_QPA="wayland"
 BR2_PACKAGE_QT5BASE_HARFBUZZ=y
 BR2_PACKAGE_QT5BASE_GIF=y
 BR2_PACKAGE_QT5BASE_JPEG=y
Comment 14 Yann E. MORIN 2024-06-15 14:49:01 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!