Skip to contentSkip to conversation

Qt WebEngine support

RFC Superseded Gaël PORTAY 5 participants 22 messages Mar 22, 2017 – Jul 17, 2017 Broadcom BCM2711/BCM2835 Arm architecture

v1 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

cover Qt WebEngine support

The purpose of this patch series is to continue the integration of Qt5 WebEngine in buildroot; started long time ago by Akihiko Odaki [1] and Julien Corjon [2].

The first patch provides the Qt WebEngine package.

The second patch fixes the rpi-userland OpenGL libraries symlinks. WebEngine eglfs backend is linked against libEGL.so.1 and libGLESv2.so.2.

	# ls -l /usr/lib/lib*GL*
	lrwxrwxrwx    1 root     root            11 Mar 21 17:24 /usr/lib/libEGL.so -> libEGL.so.1
	lrwxrwxrwx    1 root     root            15 Mar 21 17:24 /usr/lib/libEGL.so.1 -> libEGL.so.1.0.0
	-rwxr-xr-x    1 root     root        163152 Mar 22 14:56 /usr/lib/libEGL.so.1.0.0
	lrwxrwxrwx    1 root     root            14 Mar 21 17:24 /usr/lib/libGLESv2.so -> libGLESv2.so.2
	lrwxrwxrwx    1 root     root            18 Mar 21 17:24 /usr/lib/libGLESv2.so.2 -> libGLESv2.so.2.0.0
	-rwxr-xr-x    1 root     root         78788 Mar 22 14:56 /usr/lib/libGLESv2.so.2.0.0

The last patch is a special defconfig that provides a Qt WebEngine setup on raspberrypi3.

With this patchset, one can run the Qt quicknanobrowser sample on a rpi3 with the following options:
- BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc" and BR2_TOOLCHAIN_BUILDROOT_CXX=y (Qt 5 needs a toolchain w/ wchar, NPTL, C++, dynamic library)
- BR2_PACKAGE_LIBERATION (Qt 5.8 requires a least one font)
- BR2_PACKAGE_RPI_USERLAND (to enable OpenGL backend)
- BR2_PACKAGE_QT5BASE_LICENSE_APPROVED (to not prompt for license agreement; webengine takes many hours to be compiled (and maybe more!))
- BR2_PACKAGE_QT5BASE_EXAMPLES (to install quicknanobrowser sample)
- BR2_PACKAGE_QT5QUICKCONTROLS (needed by quicknanobrowser)
- BR2_PACKAGE_QT5WEBENGINE (because it is what we want :))

To browse for HTTPS websites, please consider adding the following options as well:
- BR2_PACKAGE_CA_CERT (for certificates)
- BR2_PACKAGE_NTPD (to sync date)

To run quicknanobrowser:

	# cd /usr/lib/qt/examples/webengine/quicknanobrowser/
	# ./quicknanobrowser

Enjoy ;)

Note: I do not know yet how to add an input backend (mouse, keyboard). For now, quicknanobrowser will just display the qt website.

[1] https://patchwork.ozlabs.org/patch/640633/
[2] http://lists.busybox.net/pipermail/buildroot/2015-July/132010.html

Ga?l PORTAY (3):
qt5webengine: new package
rpi-userland: fix opengl library symlinks
configs: new raspberrypi3 qt5 config

 configs/raspberrypi3_qt5_defconfig                 |  49 +++++
 package/qt5/Config.in                              |   1 +
 .../qt5/qt5webengine/0001-prefer-arm_tune.patch    |  19 ++
 .../qt5webengine/0002-change-default-ssl-dir.patch |  18 ++
 package/qt5/qt5webengine/Config.in                 |  44 ++++
 package/qt5/qt5webengine/chromium.inc              | 238 +++++++++++++++++++++
 package/qt5/qt5webengine/qt5webengine.hash         |   5 +
 package/qt5/qt5webengine/qt5webengine.mk           |  82 +++++++
 .../0001-Add-OpenGL-library-versioning.patch       |  36 ++++
 9 files changed, 492 insertions(+)
 create mode 100644 configs/raspberrypi3_qt5_defconfig
 create mode 100644 package/qt5/qt5webengine/0001-prefer-arm_tune.patch
 create mode 100644 package/qt5/qt5webengine/0002-change-default-ssl-dir.patch
 create mode 100644 package/qt5/qt5webengine/Config.in
 create mode 100644 package/qt5/qt5webengine/chromium.inc
 create mode 100644 package/qt5/qt5webengine/qt5webengine.hash
 create mode 100644 package/qt5/qt5webengine/qt5webengine.mk
 create mode 100644 package/rpi-userland/0001-Add-OpenGL-library-versioning.patch
Signature · 1 line
2.12.0
#1 lore raw

RFC 1/3 qt5webengine: new package

This patch is based on works [1] and [2].

[1]: http://lists.busybox.net/pipermail/buildroot/2015-July/132010.html
[2]: https://patchwork.ozlabs.org/patch/640633/

---
 package/qt5/Config.in                              |   1 +
 .../qt5/qt5webengine/0001-prefer-arm_tune.patch    |  19 ++
 .../qt5webengine/0002-change-default-ssl-dir.patch |  18 ++
 package/qt5/qt5webengine/Config.in                 |  44 ++++
 package/qt5/qt5webengine/chromium.inc              | 238 +++++++++++++++++++++
 package/qt5/qt5webengine/qt5webengine.hash         |   5 +
 package/qt5/qt5webengine/qt5webengine.mk           |  82 +++++++
 7 files changed, 407 insertions(+)
 create mode 100644 package/qt5/qt5webengine/0001-prefer-arm_tune.patch
 create mode 100644 package/qt5/qt5webengine/0002-change-default-ssl-dir.patch
 create mode 100644 package/qt5/qt5webengine/Config.in
 create mode 100644 package/qt5/qt5webengine/chromium.inc
 create mode 100644 package/qt5/qt5webengine/qt5webengine.hash
 create mode 100644 package/qt5/qt5webengine/qt5webengine.mk
package/qt5/Config.in +1 -0
index 4bcbc6ef5..a45c9e027 100644
@@ -78,6 +78,7 @@ source "package/qt5/qt5svg/Config.in"
 source "package/qt5/qt5tools/Config.in"
 source "package/qt5/qt5webchannel/Config.in"
 source "package/qt5/qt5webkit/Config.in"
+source "package/qt5/qt5webengine/Config.in"
 source "package/qt5/qt5websockets/Config.in"
 source "package/qt5/qt5x11extras/Config.in"
 source "package/qt5/qt5xmlpatterns/Config.in"
package/qt5/qt5webengine/0001-prefer-arm_tune.patch new file +19 -0
new file mode 100644
index 000000000..a4662d0c3
@@ -0,0 +1,19 @@
+Prefer arm_tune to arm_arch
+
+If user specifies arm_tune, ignore default arm_arch.
+
+Signed-off-by: Akihiko Odaki <[email protected]>
+---
+Index: qt5webengine-5.6.1/src/3rdparty/chromium/build/common.gypi
+===================================================================
+--- qt5webengine-5.6.1.orig/src/3rdparty/chromium/build/common.gypi
++++ qt5webengine-5.6.1/src/3rdparty/chromium/build/common.gypi
+@@ -3977,7 +3977,7 @@
+                       '-target arm-linux-gnueabihf',
+                     ],
+                   }],
+-                  ['arm_arch!=""', {
++                  ['arm_arch!="" and arm_tune==""', {
+                     'cflags': [
+                       '-march=<(arm_arch)',
+                     ],
package/qt5/qt5webengine/0002-change-default-ssl-dir.patch new file +18 -0
new file mode 100644
index 000000000..35cc1902a
@@ -0,0 +1,18 @@
+Change the default SSL directory, as buildroot ca-cert package is
+installed at /etc/ssl. That way, we don't have to use the SSL_CERT_DIR
+environment at runtime.
+
+Signed-off-by: Damien Riegel <[email protected]>
+
+diff -Nura qt5webengine-5.8.0.orig/src/core/qtwebengine_extras.gypi qt5webengine-5.8.0/src/core/qtwebengine_extras.gypi
+--- qt5webengine-5.8.0.orig/src/core/qtwebengine_extras.gypi	2017-01-03 05:35:11.000000000 -0500
++++ qt5webengine-5.8.0/src/core/qtwebengine_extras.gypi	2017-03-03 16:24:34.947416678 -0500
+@@ -103,7 +103,7 @@
+             'GL_GLEXT_PROTOTYPES',
+             'EGL_EGLEXT_PROTOTYPES',
+             # At runtime the env variable SSL_CERT_DIR can be used to override this
+-            'OPENSSLDIR="/usr/lib/ssl"',
++            'OPENSSLDIR="/etc/ssl"',
+             'OPENSSL_LOAD_CONF',
+             'EGL_API_FB=1',
+             'LINUX=1',
package/qt5/qt5webengine/Config.in new file +44 -0

44 lines not on this page · raw message

package/qt5/qt5webengine/chromium.inc new file +238 -0

238 lines not on this page · raw message

package/qt5/qt5webengine/qt5webengine.hash new file +5 -0
new file mode 100644
index 000000000..3e1fde2dd
@@ -0,0 +1,5 @@
+# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtwebengine-opensource-src-5.6.2.tar.xz.mirrorlist
+sha256 c80e90237bb7bd52a3fa843415c17a8e8e6d779b65efd1393472f24f8642e04c  qtwebengine-opensource-src-5.6.2.tar.xz
+
+# Hash from: http://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwebengine-opensource-src-5.8.0.tar.xz
+sha256 223d22f1660811e60677afe0a85f2f385823e25157689561489700c5d1da79be  qtwebengine-opensource-src-5.8.0.tar.xz
package/qt5/qt5webengine/qt5webengine.mk new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
2.12.0
#2 lore raw

RFC 1/3 qt5webengine: new package

Hi all,

Any feedback on this new package? :)

Thanks,
Ga?l

#4 lore raw

RFC 1/3 qt5webengine: new package

hello

I have applied webengine patch and I flash to imx6dl. so I don't now whether is work on rpi3. there was no problem while compiling.
I have problem while running application. I use demobrowser from qt to test the web engine. when I try to run with eglfs, it crushes and says "Could not open eglfs display" is there any bug between opengl and eglfs.

thanks for your patch

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/RFC-0-3-Qt-WebEngine-support-tp160642p168692.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

#5 lore raw

RFC 1/3 qt5webengine: new package

Hi all,

I will resend (in the next couple of days) a new version of this patch rebased on top of master.

It will fix the build issue with Qt 5.6.2. I am trying to backport the required patch that fixes the issue met by Brent.

Regards,
Ga?l

#6 lore raw

RFC 1/3 qt5webengine: new package

Hi Ga?l,

Quoted 4 lines · Ga?l PORTAY

Hi all,

I will resend (in the next couple of days) a new version of this patch rebased on top of master.

Thanks for sending the updated patch! I just sent a patch to bump Qt to 5.9.1. I'll be sure to give your patch a try with this new version.

Here is the patch I sent:
https://patchwork.ozlabs.org/patch/785366/

Quoted 6 lines

It will fix the build issue with Qt 5.6.2. I am trying to backport the required patch that fixes the issue met by Brent.

Regards,
Ga?l

#7 lore raw

RFC 1/3 qt5webengine: new package

Hi Brent,

Quoted 6 lines · Brent Sink

Hi Ga?l,

Quoted 2 lines · Ga?l PORTAY

Hi all,

Quoted 7 lines
Quoted 2 lines

I will resend (in the next couple of days) a new version of this patch rebased on top of master.

Thanks for sending the updated patch! I just sent a patch to bump Qt to 5.9.1. I'll be sure to give your patch a try with this new version.

Here is the patch I sent:
https://patchwork.ozlabs.org/patch/785366/

I am testing to build Qt WebEngine 5.9 on RPI3 with your patches.

Quoted 7 lines
Quoted 6 lines

It will fix the build issue with Qt 5.6.2. I am trying to backport the required patch that fixes the issue met by Brent.

Regards,
Ga?l

Thanks for your patches!

Regards,
Ga?l

#8 lore raw

RFC 1/3 qt5webengine: new package

Hi Gael,

I hope it works for raspberrypi3. unfortunately it does not work imx6dl. it gives same error "could not open egl display".
I really want to solve this problem however I do not have enough experience to do so. If you have time to solve this problem, I want to help you because webengine is crucial package for qt.

regards

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/RFC-0-3-Qt-WebEngine-support-tp160642p170362.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

#9 lore raw

RFC 1/3 qt5webengine: new package

error while compiling

File "../build/scripts/rule_bison.py", line 83, in <module>
returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile,
'-o', outputCpp])
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[2/9493] ACTION Caching PLY lex & yacc lex/parse tables
ninja: build stopped: subcommand failed.
Makefile.gyp_run:317: recipe for target 'invoke_ninja' failed make[4]: *** [invoke_ninja] Error 1
make[4]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src/core' Makefile:116: recipe for target 'sub-gyp_run-pro-make_first' failed make[3]: *** [sub-gyp_run-pro-make_first] Error 2
make[3]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src/core' Makefile:49: recipe for target 'sub-core-make_first' failed make[2]: *** [sub-core-make_first] Error 2
make[2]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src' Makefile:44: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0' package/pkg-generic.mk:227: recipe for target '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/.stamp_built' failed
make: *** [/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/.stamp_built] Error 2

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/RFC-0-3-Qt-WebEngine-support-tp160642p170885.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

#10 lore raw

RFC 1/3 qt5webengine: new package

Hi gomsis,

Thanks you for the report.

Quoted 34 lines · gomsis

error while compiling

File "../build/scripts/rule_bison.py", line 83, in <module>
returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile,
'-o', outputCpp])
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 168, in call
return Popen(*popenargs, **kwargs).wait()
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File
"/home/osboxes/Desktop/buildrootl/output/host/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[2/9493] ACTION Caching PLY lex & yacc lex/parse tables
ninja: build stopped: subcommand failed.
Makefile.gyp_run:317: recipe for target 'invoke_ninja' failed make[4]: *** [invoke_ninja] Error 1
make[4]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src/core' Makefile:116: recipe for target 'sub-gyp_run-pro-make_first' failed make[3]: *** [sub-gyp_run-pro-make_first] Error 2
make[3]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src/core' Makefile:49: recipe for target 'sub-core-make_first' failed make[2]: *** [sub-core-make_first] Error 2
make[2]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/src' Makefile:44: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2

Quoted 10 lines

make[1]: Leaving directory '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0' package/pkg-generic.mk:227: recipe for target '/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/.stamp_built' failed
make: *** [/home/osboxes/Desktop/buildrootl/output/build/qt5webengine-5.8.0/.stamp_built] Error 2

I have never met this error before. I have tested ony on RPI 3.

Which target are you building Qt WE for?

Regards,
Ga?l

#13 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

In reply to Gaël PORTAY

Qt WebEngine module is linked against libEGL.so.1 and libGLESv2.so.2.

This patch sets up cmake to create those library links.

	# ls -l /usr/lib/lib*GL*
	lrwxrwxrwx    1 root     root            11 Mar 21 17:24 /usr/lib/libEGL.so -> libEGL.so.1
	lrwxrwxrwx    1 root     root            15 Mar 21 17:24 /usr/lib/libEGL.so.1 -> libEGL.so.1.0.0
	-rwxr-xr-x    1 root     root        163152 Mar 22 14:56 /usr/lib/libEGL.so.1.0.0
	lrwxrwxrwx    1 root     root            14 Mar 21 17:24 /usr/lib/libGLESv2.so -> libGLESv2.so.2
	lrwxrwxrwx    1 root     root            18 Mar 21 17:24 /usr/lib/libGLESv2.so.2 -> libGLESv2.so.2.0.0
	-rwxr-xr-x    1 root     root         78788 Mar 22 14:56 /usr/lib/libGLESv2.so.2.0.0
---
 .../0001-Add-OpenGL-library-versioning.patch       | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/rpi-userland/0001-Add-OpenGL-library-versioning.patch
package/rpi-userland/0001-Add-OpenGL-library-versioning.patch new file +36 -0
new file mode 100644
index 000000000..0de7b8a72
@@ -0,0 +1,36 @@
+From c0b5fce145b8b7aec42510d9759d100e92630c74 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Ga=C3=ABl=20PORTAY?= <[email protected]>
+Date: Fri, 3 Mar 2017 17:28:41 -0500
+Subject: [PATCH] Add OpenGL library versioning
+
+Some applications like QtWebEngine require specific library versions.
+Make them happy by providing that.
+
+https://wiki.qt.io/RaspberryPi2EGLFS
+---
+ host_applications/android/apps/vidtex/CMakeLists.txt | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/host_applications/android/apps/vidtex/CMakeLists.txt b/host_applications/android/apps/vidtex/CMakeLists.txt
+index 1f705ef..c91032a 100644
+--- a/host_applications/android/apps/vidtex/CMakeLists.txt
++++ b/host_applications/android/apps/vidtex/CMakeLists.txt
+@@ -10,3 +10,15 @@ set (VIDTEX_SOURCES
+    vidtex.c)
+ add_executable(vidtex ${VIDTEX_SOURCES})
+ target_link_libraries(vidtex GLESv2 EGL m bcm_host mmal_core mmal_components mmal_util mmal_vc_client vcos)
++
++set_target_properties(
++	GLESv2 PROPERTIES
++	VERSION "2.0.0"
++	SOVERSION "2"
++)
++
++set_target_properties(
++	EGL PROPERTIES
++	VERSION "1.0.0"
++	SOVERSION "1"
++)
+-- 
+2.10.2
+
Signature · 1 line
2.12.0
#14 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hello,

Quoted 1 line · Ga?l PORTAY

Qt WebEngine module is linked against libEGL.so.1 and libGLESv2.so.2.

I don't understand this. Does WebEngine contains pre-built binaries? If so, then most likely they are only available for a few architectures, and Qt WebEngine should only be available for those few architectures.

If everything is source code, then presumably the build system uses -lEGL -lGLESv2, which tells gcc to look for libEGL.so and libGLESv2.so, so those .1 and .2 suffixes should not matter.

Can you give some more details here?

Also: if this is needed for the qtwebengine build to be successful, it should appear *before* the qtwebengine patch in the series.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#15 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hi Thomas,

Quoted 5 lines · Thomas Petazzoni

Hello,

Quoted 1 line · Ga?l PORTAY

Qt WebEngine module is linked against libEGL.so.1 and libGLESv2.so.2.

I write this patch a month ago, I don't remember when it crashes (maybe at runtime...).

Quoted 8 lines

I don't understand this. Does WebEngine contains pre-built binaries? If so, then most likely they are only available for a few architectures, and Qt WebEngine should only be available for those few architectures.

If everything is source code, then presumably the build system uses -lEGL -lGLESv2, which tells gcc to look for libEGL.so and libGLESv2.so, so those .1 and .2 suffixes should not matter.

Indeed.

I just did a quick look up into the sources [1], and my message is totally wrong! My excuses...

WebEngine is not linked against those libraries: libraries are dynamically loaded.

Quoted 2 lines

Can you give some more details here?

Do you want I reproduce the crash? To make sure this quick investigation is correct?

Quoted 3 lines

Also: if this is needed for the qtwebengine build to be successful, it should appear *before* the qtwebengine patch in the series.

Indeed (again)...

Quoted 7 lines

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Regards,
Gael

[1] https://github.com/qt/qtwebengine/blob/dev/src/core/surface_factory_qt.cpp#L76-L86

#16 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hello,

Quoted 2 lines · Ga?l PORTAY

WebEngine is not linked against those libraries: libraries are dynamically loaded.

Ah, it uses dlopen() on specifically libEGL.so.1 and libOpenGLES.so.2, OK. Then it makes sense. Maybe your patch should be submitted upstream to rpi-userland?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#17 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hello,

Quoted 10 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Ga?l PORTAY

WebEngine is not linked against those libraries: libraries are dynamically loaded.

Ah, it uses dlopen() on specifically libEGL.so.1 and libOpenGLES.so.2, OK. Then it makes sense. Maybe your patch should be submitted upstream to rpi-userland?

I am on it.

I made a PR on github.

Quoted 8 lines

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Best regards,
Gael

#18 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hello,

Quoted 7 lines · Ga?l PORTAY
Quoted 3 lines

Ah, it uses dlopen() on specifically libEGL.so.1 and libOpenGLES.so.2, OK. Then it makes sense. Maybe your patch should be submitted upstream to rpi-userland?

I am on it.

I made a PR on github.

As was said in https://github.com/raspberrypi/userland/pull/379, the PR you have submitted changes the SONAME of the library, so any binary already built against rpi-userland before your change will no longer work after your change. Your suggestion to run ldconfig is irrelevant.

When you link against a library, the SONAME of this library gets encoded into a NEEDED entry of the thing (program or library) that links against this library. Then at runtime, the dynamic loader goes through those NEEDED entries to load the shared libraries that the program needs. So if the NEEDED entry of a program no longer points to an existing library, you broke binary compatibility.

So maybe we simply need some symbolic links to be created:

libEGL.so.1 -> libEGL.so
libGLES.so.2 -> libGLES.so

This way, qt5webengine will be able to find the EGL/OpenGLES implementation, but the rpi-userland libraries SONAME remains the same.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#19 lore raw

RFC 2/3 rpi-userland: fix opengl library symlinks

Hi Thomas,

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · Ga?l PORTAY
Quoted 3 lines

Ah, it uses dlopen() on specifically libEGL.so.1 and libOpenGLES.so.2, OK. Then it makes sense. Maybe your patch should be submitted upstream to rpi-userland?

Quoted 9 lines
Quoted 3 lines

I am on it.

I made a PR on github.

As was said in https://github.com/raspberrypi/userland/pull/379, the PR you have submitted changes the SONAME of the library, so any binary already built against rpi-userland before your change will no longer work after your change. Your suggestion to run ldconfig is irrelevant.

Okay.

I wanted to make sure about the 'No such file or directory' message. I would expect a kind of 'Invalid' message instead.

Quoted 7 lines

When you link against a library, the SONAME of this library gets encoded into a NEEDED entry of the thing (program or library) that links against this library. Then at runtime, the dynamic loader goes through those NEEDED entries to load the shared libraries that the program needs. So if the NEEDED entry of a program no longer points to an existing library, you broke binary compatibility.

Thanks very much for this clarification about the SONAME and NEEDED entry.

I thought it was based on filenames only, and I was wrong.

Quoted 5 lines

So maybe we simply need some symbolic links to be created:

libEGL.so.1 -> libEGL.so
libGLES.so.2 -> libGLES.so

I submitted a new PR that creates symlinks.

I was the initial solution :)

Quoted 14 lines

This way, qt5webengine will be able to find the EGL/OpenGLES implementation, but the rpi-userland libraries SONAME remains the same.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Regards,
Ga?l

#20 lore raw

RFC 3/3 configs: new raspberrypi3 qt5 config

In reply to Gaël PORTAY

This config sets Qt WebEngine for raspberrypi 3.

---
 configs/raspberrypi3_qt5_defconfig | 49 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 configs/raspberrypi3_qt5_defconfig
configs/raspberrypi3_qt5_defconfig new file +49 -0
new file mode 100644
index 000000000..4baa96e9e
@@ -0,0 +1,49 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_NEON_VFPV4=y
+
+BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
+BR2_KERNEL_HEADERS_4_9=y
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+
+BR2_SYSTEM_DHCP="eth0"
+
+# Linux headers same as kernel, a 4.9 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="935c7ce84c982a26f567a03a58a1537424569938"
+BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
+
+# Build the DTB from the kernel sources
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-cm3"
+
+# Build Qt WebEngine module
+BR2_PACKAGE_LIBERATION=y
+BR2_PACKAGE_QT5=y
+BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
+BR2_PACKAGE_QT5BASE_EXAMPLES=y
+BR2_PACKAGE_QT5QUICKCONTROLS=y
+BR2_PACKAGE_QT5WEBENGINE=y
+BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y
+BR2_PACKAGE_RPI_FIRMWARE=y
+BR2_PACKAGE_RPI_USERLAND=y
+BR2_PACKAGE_CA_CERTIFICATES=y
+BR2_PACKAGE_NTP=y
+BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
+# Filesystem / image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
Signature · 1 line
2.12.0
#21 lore raw

cover Qt WebEngine support

In reply to Gaël PORTAY

Hello Ga?l,

On Wed, 22 Mar 2017 14:13:28 -0400, Ga?l PORTAY <[email protected]> wrote:

[...]

Quoted 4 lines

Note: I do not know yet how to add an input backend (mouse, keyboard). For now, quicknanobrowser will just display the qt website.

[...]'

Change System configuration --> /dev management to 'devtmpfs + eudev' (untested), or use 'Init System (systemd)' (tested), both enable udev support needed by the qt5 default input system...

Regards,
Peter