Skip to contentSkip to conversation

Fix browser crash on PPC

PATCH In review [email protected] 6 participants 10 messages May 30, 2012 – Jun 1, 2012

lore
Share & tools
lore
#0 lore raw

cover Fix browser crash on PPC

From: Zhai Edwin <[email protected]>

All,
This patch use glib as unicode backend to avoid browser crash

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

[YOCTO #1570] got fixed

The following changes since commit f28209d9d3c67203a2c7a2b25cacfe31643d1bfa:

cooker.py: terminate the Parser processes (2012-05-25 11:39:33 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib gzhai/fix3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/fix3

Zhai Edwin (1):
webkit-gtk: Use glib as unicode backend to avoid browser crash

 meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/1 webkit-gtk: Use glib as unicode backend to avoid browser crash

From: Zhai Edwin <[email protected]>

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

[YOCTO #1570] got fixed

---
 meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
meta/recipes-sato/webkit/webkit-gtk_svn.bb +9 -1
index 7db573d..9381486 100644
@@ -10,12 +10,13 @@ LIC_FILES_CHKSUM = "file://Source/WebCore/rendering/RenderApplet.h;endline=22;md
 DEPENDS = "zlib enchant gnome-keyring libsoup-2.4 curl icu libxml2 cairo libxslt libxt libidn gnutls gtk+ gstreamer gst-plugins-base flex-native gperf-native perl-native-runtime sqlite3"
 DEPENDS += " ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)}"
 DEPENDS_darwin8 = "curl icu libxml2 cairo libxslt libidn gnutls gtk+ gstreamer flex-native gperf-native perl-native-runtime sqlite3"
+DEPENDS_append_qemuppc += "pango"
 
 SRCREV_FORMAT = "source"
 
 SRCREV = "101488"
 PV = "1.7.2+svnr${SRCPV}"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "\
   svn://svn.webkit.org/repository/webkit/trunk/;module=Source;proto=http;name=source \
@@ -47,6 +48,13 @@ EXTRA_OECONF = "\
                 UNICODE_CFLAGS=-D_REENTRANT \
                "
 
+#default unicode backend icu breaks in cross-compile when target and host owns different endian type
+EXTRA_OECONF_append_qemuppc += "--with-unicode-backend=glib"
+
+CPPFLAGS_append_qemuppc += "-I${STAGING_INCDIR}/pango-1.0 \
+                            -I${STAGING_LIBDIR}/glib-2.0/include \
+                            -I${STAGING_INCDIR}/glib-2.0"
+
 EXTRA_AUTORECONF = " -I Source/autotools "
 
 
Signature · 1 line
1.7.1
#2 lore raw

Re: [PATCH 1/1] webkit-gtk: Use glib as unicode backend to avoid browser crash

Quoted 6 lines · On Wed, 2012-05-30 at 17:08 +0800, [email protected] wrote:

From: Zhai Edwin <[email protected]>

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

Quoted 6 lines

[YOCTO #1570] got fixed

---
 meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

I've merged this however I'm not 100% happy with this as the final fix. I'd ask that:

a) The bug remains open (re-prioritised appropriately) about the remaining issues that still exist in ICU
b) We add something to the ICU recipe which stops it building when the endianess isn't correct (host matches target) so nobody can built it and have it not work.

Cheers,

Richard

#3 lore raw

Re: [PATCH 1/1] webkit-gtk: Use glib as unicode backend to avoid browser crash

Quoted 14 lines · Richard Purdie
Quoted 6 lines · On Wed, 2012-05-30 at 17:08 +0800, [email protected] wrote:

From: Zhai Edwin<[email protected]>

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

Quoted 6 lines

[YOCTO #1570] got fixed

---
  meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)
Quoted 8 lines

I've merged this however I'm not 100% happy with this as the final fix. I'd ask that:

a) The bug remains open (re-prioritised appropriately) about the remaining issues that still exist in ICU
b) We add something to the ICU recipe which stops it building when the endianess isn't correct (host matches target) so nobody can built it and have it not work.

Why not accept my patch that provides a working dataset? I doubt that you're ever going to get the ICU folks interested to the point of fixing this correctly and this solves the problem without the [IMO undesirable] side effect of using different libraries on different architectures (for webkit-gtk).

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#4 lore raw

Re: [PATCH 1/1] webkit-gtk: Use glib as unicode backend to avoid browser crash

Quoted 5 lines · Gary Thomas
Quoted 4 lines · Richard Purdie

I've merged this however I'm not 100% happy with this as the final fix. I'd ask that:

Quoted 7 lines
Quoted 5 lines

a) The bug remains open (re-prioritised appropriately) about the remaining issues that still exist in ICU
b) We add something to the ICU recipe which stops it building when the endianess isn't correct (host matches target) so nobody can built it and have it not work.

Why not accept my patch that provides a working dataset? I doubt

Provideding a big binary in yocto website is not clean, but it should avoid potential side effect.

Quoted 3 lines

that you're ever going to get the ICU folks interested to the point of fixing this correctly and this solves the problem without the [IMO undesirable] side effect of using different libraries on

This is ultimate solution. I remember ICU community is not so active to do it.

Quoted 12 lines

different architectures (for webkit-gtk).

Signature · 9 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 2 lines
best rgds,
edwin
#5 lore raw

Re: [PATCH 1/1] webkit-gtk: Use glib as unicode backend to avoid browser crash

In reply to Gary Thomas
Quoted 24 lines · Gary Thomas
Quoted 14 lines · Richard Purdie
Quoted 6 lines · On Wed, 2012-05-30 at 17:08 +0800, [email protected] wrote:

From: Zhai Edwin<[email protected]>

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

Quoted 6 lines

[YOCTO #1570] got fixed

---
  meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)
Quoted 8 lines

I've merged this however I'm not 100% happy with this as the final fix. I'd ask that:

a) The bug remains open (re-prioritised appropriately) about the remaining issues that still exist in ICU
b) We add something to the ICU recipe which stops it building when the endianess isn't correct (host matches target) so nobody can built it and have it not work.

Quoted 5 lines

Why not accept my patch that provides a working dataset? I doubt that you're ever going to get the ICU folks interested to the point of fixing this correctly and this solves the problem without the [IMO undesirable] side effect of using different libraries on different architectures (for webkit-gtk).

The issue here is that starting to distribute binary blobs gets us into potentially troubled waters. It also means that for every new tune or target (say mips BE), we'd need another blob. Add something like uclibc and the problem gets worse.

So I can see the attraction of the solution and it works well for particular cases but it isn't something I think can be made to work in OE-Core in the general case :(.

I did wonder whether we could post process the binary to correct the endianess of the data in the file?

Cheers,

Richard

#6 lore raw

RPM packaging issue?

In reply to [email protected]

Hi list,

I was trying to build core-image-gtk-directfb and ended up with this error:

Log data follows:
| DEBUG: Executing shell function do_rootfs
| ERROR: Function failed: do_rootfs (see /home/lau/yocto/build/tmp/work/qemux86-poky-linux/core-image-minimal-1.0-r0/temp/log.do_rootfs.4857 for further information)

| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/qemux86...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/i586...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/all...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/all...
| Processing task-core-boot...
| Processing module-init-tools...
| Unable to find package module-init-tools (module-init-tools)!

NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Failed

module-init-tools is provided by kmod package and is in the RDEPENDS of task_base recipe.

Then I tried to add module_init_tools to CORE_IMAGE_EXTRA_INSTALL and build core-image-minimal (just for testing), the same result.

The interesting thing is that this didn't happen if the packaging format is ipk.

Anybody know anything about this issue?

Thanks,
Laurentiu

#7 lore raw

Re: RPM packaging issue?

Quoted 21 lines · Laurentiu Palcu

Hi list,

I was trying to build core-image-gtk-directfb and ended up with this error:

Log data follows:
| DEBUG: Executing shell function do_rootfs
| ERROR: Function failed: do_rootfs (see /home/lau/yocto/build/tmp/work/qemux86-poky-linux/core-image-minimal-1.0-r0/temp/log.do_rootfs.4857 for further information)

| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/qemux86...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/i586...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/all...
| Generating solve db for /home/lau/yocto/build/tmp/deploy/rpm/all...
| Processing task-core-boot...
| Processing module-init-tools...
| Unable to find package module-init-tools (module-init-tools)!

NOTE: package core-image-minimal-1.0-r0: task do_rootfs: Failed

module-init-tools is provided by kmod package and is in the RDEPENDS of task_base recipe.

Quoted 7 lines

Then I tried to add module_init_tools to CORE_IMAGE_EXTRA_INSTALL and build core-image-minimal (just for testing), the same result.

The interesting thing is that this didn't happen if the packaging format is ipk.

Anybody know anything about this issue?

The IMAGE_INSTALL list has module-init-tools in it. This list is based on package name and not "dependency" or "provide" name. The package module-init-tools no longer exists in the system, there is only a runtime provide from the kmod package.

This ensures that any package that requires module-init-tools will work properly, but anyone adding module-init-tools to the IMAGE_INSTALL it will fail as you've seen above.

--Mark

Quoted 7 lines

Thanks,
Laurentiu

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

#8 lore raw
In reply to [email protected]
Quoted 20 lines · On 2012-05-30 03:08, [email protected] wrote:

From: Zhai Edwin<[email protected]>

All,
This patch use glib as unicode backend to avoid browser crash

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

[YOCTO #1570] got fixed

The following changes since commit f28209d9d3c67203a2c7a2b25cacfe31643d1bfa:

   cooker.py: terminate the Parser processes (2012-05-25 11:39:33 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib gzhai/fix3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/fix3

Quoted 5 lines

Zhai Edwin (1):
webkit-gtk: Use glib as unicode backend to avoid browser crash

  meta/recipes-sato/webkit/webkit-gtk_svn.bb |   10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)

Note: any big-endian target will probably suffer the same as PowerPC, so should this not also be extended to those, e.g. big-endian MIPS, etc?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#9 lore raw
In reply to [email protected]

Op 30 mei 2012, om 11:08 heeft [email protected] het volgende geschreven:

Quoted 8 lines

From: Zhai Edwin <[email protected]>

All,
This patch use glib as unicode backend to avoid browser crash

webkit-gtk depends on ICU for the unicode, but ICU is not safe when build and target system owns different endian. ICU's community is not responsive to make a patch for this, so glib is used as work around here.

That is a really big change since the backends don't have equivalent functionality.

Quoted 10 lines

[YOCTO #1570] got fixed

The following changes since commit f28209d9d3c67203a2c7a2b25cacfe31643d1bfa:

cooker.py: terminate the Parser processes (2012-05-25 11:39:33 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib gzhai/fix3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/fix3

And that doesn't merge into oe-core, so I can't test it.