Skip to contentSkip to conversation

Fix a libxkbcommon runtime error

PATCH In review [email protected] 2 participants 5 messages May 2, 2019 – May 3, 2019

lore
Share & tools
lore
#0 lore raw

cover Fix a libxkbcommon runtime error

From: Ming Liu <[email protected]>

We had observed a runtime error when we run a QT application on weston compositor, as follows:
| xkbcommon: ERROR: couldn't find a Compose file for locale "C"

after some investigation, we found the libx11-locale is being required by libxkbcommon at runtime, or else we get the above error and the QT widgets could not get the keyboard events.

To fix the issue, I think there might be two ways:

1 Allow the libx11 to be built without the requirement for x11 being in
DISTRO_FEATURES, as this patch series are trying to do.
2 Create another libx11-data recipe to provide the locales of libx11.

I would like to get your input about this fix, please kindly help me review it.

Ming Liu (2):
meta: unset REQUIRED_DISTRO_FEATURES for libx11 and its dependents
libxkbcommon: RDEPENDS on libx11-locale

 meta/recipes-graphics/xorg-lib/libx11_1.6.7.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb      | 4 ----
 meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb     | 2 ++
 meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb | 4 ++++
 meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb       | 2 ++
 6 files changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 meta: unset REQUIRED_DISTRO_FEATURES for libx11 and its dependents

From: Ming Liu <[email protected]>

This is to allow libx11 to be built without the requirement for x11 distro feature.

The reason for doing this is because the libx11 is providing libx11-locale package and that is being depended by libxkbcommon at runtime, and libxkbcommon is not a X11 specific recipe, it should be be able to be depended by other non-X11 recipes like weston or qtbase.

---
 meta/recipes-graphics/xorg-lib/libx11_1.6.7.bb   | 2 ++
 meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb   | 2 ++
 meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb  | 4 ----
 meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb | 2 ++
 meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb   | 2 ++
 5 files changed, 8 insertions(+), 4 deletions(-)
meta/recipes-graphics/xorg-lib/libx11_1.6.7.bb +2 -0
index 6141f57..5c96e9a 100644
@@ -10,4 +10,6 @@ do_configure_append () {
     sed -i -e "/X11_CFLAGS/d" ${B}/src/util/Makefile
 }
 
+REQUIRED_DISTRO_FEATURES = ""
+
 BBCLASSEXTEND = "native nativesdk"
meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb +2 -0
index dcfc666..c4e5078 100644
@@ -18,6 +18,8 @@ PE = "1"
 
 XORG_PN = "libXau"
 
+REQUIRED_DISTRO_FEATURES = ""
+
 BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI[md5sum] = "c5f16288f2da9f071b29111d68797480"
meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb +0 -4
index 84303e6..6f9e700 100644
@@ -28,10 +28,6 @@ FILES_${PN} = "${libdir}/libxcb.so.*"
 
 inherit autotools pkgconfig distro_features_check
 
-# The libxau and others requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
 export PYTHON = "python3"
 
 python populate_packages_prepend () {
meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb +2 -0
index d43a146..254e015 100644
@@ -20,6 +20,8 @@ PE = "1"
 
 XORG_PN = "libXdmcp"
 
+REQUIRED_DISTRO_FEATURES = ""
+
 BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI[md5sum] = "115c5c12ecce0e749cd91d999a5fd160"
meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb +2 -0
index 5bf134b..27851b2 100644
@@ -20,6 +20,8 @@ RDEPENDS_${PN}-dev = ""
 
 inherit gettext
 
+REQUIRED_DISTRO_FEATURES = ""
+
 BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI[md5sum] = "ce2fb8100c6647ee81451ebe388b17ad"
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 libxkbcommon: RDEPENDS on libx11-locale

In reply to [email protected]

From: Ming Liu <[email protected]>

This fixes a following runtime issue observed when a qtwayland client running on weston compositor:
| xkbcommon: ERROR: couldn't find a Compose file for locale "C"

---
 meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb +4 -0
index 8fcae12..4d31638 100644
@@ -7,6 +7,10 @@ LICENSE = "MIT & MIT-style"
 
 DEPENDS = "util-macros flex-native bison-native"
 
+# Fix a following runtime error:
+# xkbcommon: ERROR: couldn't find a Compose file for locale "C"
+RDEPENDS_${PN} = "libx11-locale"
+
 SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
 
 SRC_URI[md5sum] = "3c4409058dfd203f641a563358e0187d"
Signature · 1 line
2.7.4
#3 lore raw
In reply to [email protected]

I'd much prefer a dependency that is conditional on the DISTRO_FEATURES and have an alternative recipe that just ships the locale data.

Ross

Quoted 40 lines · On Thu, 2 May 2019 at 20:41, <[email protected]> wrote:

From: Ming Liu <[email protected]>

We had observed a runtime error when we run a QT application on weston compositor, as follows:
| xkbcommon: ERROR: couldn't find a Compose file for locale "C"

after some investigation, we found the libx11-locale is being required by libxkbcommon at runtime, or else we get the above error and the QT widgets could not get the keyboard events.

To fix the issue, I think there might be two ways:

1 Allow the libx11 to be built without the requirement for x11 being in
DISTRO_FEATURES, as this patch series are trying to do.
2 Create another libx11-data recipe to provide the locales of libx11.

I would like to get your input about this fix, please kindly help me review it.

Ming Liu (2):
meta: unset REQUIRED_DISTRO_FEATURES for libx11 and its dependents
libxkbcommon: RDEPENDS on libx11-locale

 meta/recipes-graphics/xorg-lib/libx11_1.6.7.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb      | 4 ----
 meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb     | 2 ++
 meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb | 4 ++++
 meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb       | 2 ++
 6 files changed, 12 insertions(+), 4 deletions(-)

--
2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#4 lore raw

Hi, Ross:

Copy that, will make a V2 soon.

the best,
thank you

Burton, Ross <[email protected]> 於 2019年5月3日 週五 上午11:58寫道:

Quoted 48 lines

I'd much prefer a dependency that is conditional on the DISTRO_FEATURES and have an alternative recipe that just ships the locale data.

Ross

Quoted 40 lines · On Thu, 2 May 2019 at 20:41, <[email protected]> wrote:

From: Ming Liu <[email protected]>

We had observed a runtime error when we run a QT application on weston compositor, as follows:
| xkbcommon: ERROR: couldn't find a Compose file for locale "C"

after some investigation, we found the libx11-locale is being required by libxkbcommon at runtime, or else we get the above error and the QT widgets could not get the keyboard events.

To fix the issue, I think there might be two ways:

1 Allow the libx11 to be built without the requirement for x11 being in
DISTRO_FEATURES, as this patch series are trying to do.
2 Create another libx11-data recipe to provide the locales of libx11.

I would like to get your input about this fix, please kindly help me review it.

Ming Liu (2):
meta: unset REQUIRED_DISTRO_FEATURES for libx11 and its dependents
libxkbcommon: RDEPENDS on libx11-locale

 meta/recipes-graphics/xorg-lib/libx11_1.6.7.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxau_1.0.9.bb       | 2 ++
 meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb      | 4 ----
 meta/recipes-graphics/xorg-lib/libxdmcp_1.1.3.bb     | 2 ++
 meta/recipes-graphics/xorg-lib/libxkbcommon_0.8.4.bb | 4 ++++
 meta/recipes-graphics/xorg-lib/xtrans_1.4.0.bb       | 2 ++
 6 files changed, 12 insertions(+), 4 deletions(-)

--
2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core