Here is easy way to reproduce the failure: ... root@localhost:~# python >>> from gi.repository import Gtk, AnacondaWidgets >>> builder = Gtk.Builder() >>> builder.get_type_from_name("AnacondaStandaloneWindow") <GType invalid (0)> ...
Which is expected: ... root@localhost:~# python >>> from gi.repository import Gtk, AnacondaWidgets >>> builder = Gtk.Builder() >>> builder.get_type_from_name("AnacondaStandaloneWindow") <GType AnacondaStandaloneWindow (7297024)> ... The root cause is the issue of 'g_module_open' and 'g_module_symbol' in libgmodule-2.0.so.0: While invoking 'g_module_open("libAnacondaWidgets.so.4.0.0",G_MODULE_BIND_LAZY);', the following invoking 'g_module_open(NULL, G_MODULE_BIND_LAZY);' could not find its symbol by invoking g_module_symbol. So hardcode to load the anaconda module explicitly to workaround failure while anaconda installer loading libAnacondaWidgets. The bbappend works only if DISTRO = "anaconda". Signed-off-by: Hongxu Jia <hongxu....@windriver.com> --- ...for-anaconda-installer-while-loading-libA.patch | 84 ++++++++++++++++++++++ .../recipes-gnome/gtk+/gtk+3_%.%.%.bbappend | 3 + 2 files changed, 87 insertions(+) create mode 100644 meta-installer/recipes-gnome/gtk+/files/workaround-for-anaconda-installer-while-loading-libA.patch create mode 100644 meta-installer/recipes-gnome/gtk+/gtk+3_%.%.%.bbappend diff --git a/meta-installer/recipes-gnome/gtk+/files/workaround-for-anaconda-installer-while-loading-libA.patch b/meta-installer/recipes-gnome/gtk+/files/workaround-for-anaconda-installer-while-loading-libA.patch new file mode 100644 index 0000000..581618d --- /dev/null +++ b/meta-installer/recipes-gnome/gtk+/files/workaround-for-anaconda-installer-while-loading-libA.patch @@ -0,0 +1,84 @@ +From a99480777c259c1ef0db3ac972abae348d930b41 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu....@windriver.com> +Date: Fri, 9 Oct 2015 07:12:36 -0400 +Subject: [PATCH] workaround for anaconda installer while loading + libAnacondaWidgets + +Here is easy way to reproduce the failure: +... +root@localhost:~# python +>>> from gi.repository import Gtk, AnacondaWidgets +>>> builder = Gtk.Builder() +>>> builder.get_type_from_name("AnacondaStandaloneWindow") +<GType invalid (0)> +... + +Which is expected: +... +root@localhost:~# python +>>> from gi.repository import Gtk, AnacondaWidgets +>>> builder = Gtk.Builder() +>>> builder.get_type_from_name("AnacondaStandaloneWindow") +<GType AnacondaStandaloneWindow (7297024)> +... + +The root cause is the issue of 'g_module_open' and 'g_module_symbol' +in libgmodule-2.0.so.0: +While invoking 'g_module_open("libAnacondaWidgets.so.4.0.0", G_MODULE_BIND_LAZY);' +, the following invoking 'g_module_open(NULL, G_MODULE_BIND_LAZY);' could not +find its symbol by invoking g_module_symbol. + +So we hardcode to load the anaconda module explicitly. + +Upstream-Status: inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu....@windriver.com> +--- + gtk/gtkbuilder.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c +index f9599ab..8315638 100644 +--- a/gtk/gtkbuilder.c ++++ b/gtk/gtkbuilder.c +@@ -398,6 +398,27 @@ type_name_mangle (const gchar *name) + } + + static GType ++_gtk_builder_resolve_type_lazily_anaconda (const gchar *name) ++{ ++ static GModule *module = NULL; ++ GTypeGetFunc func; ++ gchar *symbol; ++ GType gtype = G_TYPE_INVALID; ++ ++ if (!module) ++ { ++ module = g_module_open ("libAnacondaWidgets.so.4", 0); ++ } ++ symbol = type_name_mangle (name); ++ if (g_module_symbol (module, symbol, (gpointer)&func)) ++ gtype = func (); ++ ++ g_free (symbol); ++ ++ return gtype; ++} ++ ++static GType + _gtk_builder_resolve_type_lazily (const gchar *name) + { + static GModule *module = NULL; +@@ -405,6 +426,9 @@ _gtk_builder_resolve_type_lazily (const gchar *name) + gchar *symbol; + GType gtype = G_TYPE_INVALID; + ++ if (strncmp(name, "Anaconda", strlen("Anaconda")) == 0) ++ return _gtk_builder_resolve_type_lazily_anaconda(name); ++ + if (!module) + module = g_module_open (NULL, 0); + +-- +1.9.1 + diff --git a/meta-installer/recipes-gnome/gtk+/gtk+3_%.%.%.bbappend b/meta-installer/recipes-gnome/gtk+/gtk+3_%.%.%.bbappend new file mode 100644 index 0000000..752b2f1 --- /dev/null +++ b/meta-installer/recipes-gnome/gtk+/gtk+3_%.%.%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend_anaconda := "${THISDIR}/files:" +SRC_URI_append_anaconda = " file://workaround-for-anaconda-installer-while-loading-libA.patch \ +" -- 2.8.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel