Patchwork [meta-qt5,dylan] qtwebkit 5.0.2: fix QA issue (bad RPATH)

login
register
mail settings
Submitter Trevor Woerner
Date Sept. 23, 2013, 4:29 a.m.
Message ID <1379910576-24363-1-git-send-email-trevor.woerner@linaro.org>
Download mbox | patch
Permalink /patch/58507/
State Accepted, archived
Headers show

Comments

Trevor Woerner - Sept. 23, 2013, 4:29 a.m.
Building qtwebkit would cause a QA issue (which, in my distro, would cause a
build error) such that QtWebPluginProcess and QtWebProcess would contain bad
RPATHs which pointed into the build location. This fix adds a patch to not
include the rpath.prf which leads to this problem.

Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
---
 recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch | 12 ++++++++++++
 recipes-qt/qt5/qtwebkit_5.0.2.bb          |  3 +++
 2 files changed, 15 insertions(+)
 create mode 100644 recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
Martin Jansa - Sept. 23, 2013, 8:06 a.m.
On Mon, Sep 23, 2013 at 12:29:36AM -0400, Trevor Woerner wrote:
> Building qtwebkit would cause a QA issue (which, in my distro, would cause a
> build error) such that QtWebPluginProcess and QtWebProcess would contain bad
> RPATHs which pointed into the build location. This fix adds a patch to not
> include the rpath.prf which leads to this problem.

Could you send patch for master/dora first and then backport it to
dylan? Otherwise I'll do it, but it will take a bit more time.

> 
> Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
> ---
>  recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch | 12 ++++++++++++
>  recipes-qt/qt5/qtwebkit_5.0.2.bb          |  3 +++
>  2 files changed, 15 insertions(+)
>  create mode 100644 recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
> 
> diff --git a/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch b/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
> new file mode 100644
> index 0000000..f74a5cf
> --- /dev/null
> +++ b/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
> @@ -0,0 +1,12 @@
> +diff -urN qtwebkit-opensource-src-5.0.2/Tools/qmake/mkspecs/features/unix/default_post.prf qtwebkit-opensource-src-5.0.2__new/Tools/qmake/mkspecs/features/unix/default_post.prf
> +--- qtwebkit-opensource-src-5.0.2/Tools/qmake/mkspecs/features/unix/default_post.prf	2013-04-08 20:11:53.000000000 -0400
> ++++ qtwebkit-opensource-src-5.0.2__new/Tools/qmake/mkspecs/features/unix/default_post.prf	2013-09-22 22:37:51.096270035 -0400
> +@@ -32,8 +32,6 @@
> +     QMAKE_OBJECTIVE_CFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions
> + }
> + 
> +-contains(TEMPLATE, app): CONFIG += rpath
> +-
> + isEqual(QT_ARCH,i386):CONFIG(debug, debug|release) {
> +   # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
> +   config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory
> diff --git a/recipes-qt/qt5/qtwebkit_5.0.2.bb b/recipes-qt/qt5/qtwebkit_5.0.2.bb
> index 4d2f34d..1cad62b 100644
> --- a/recipes-qt/qt5/qtwebkit_5.0.2.bb
> +++ b/recipes-qt/qt5/qtwebkit_5.0.2.bb
> @@ -2,6 +2,9 @@ require qt5-${PV}.inc
>  require ${PN}.inc
>  
>  PR = "${INC_PR}.0"
> +SRC_URI += "\
> +	file://rpath.patch\
> +	"
>  
>  SRC_URI[md5sum] = "85aad9f287910c21c8464d7d1ea010a9"
>  SRC_URI[sha256sum] = "6ff4038f8db68be51661d1a6646f510b26f6ebbecbdeefb76cd8361f808768f6"
> -- 
> 1.8.4.rc3.1.gc1ebd90
>
Trevor Woerner - Sept. 23, 2013, 2:38 p.m.
Hi Martin,

On 23 September 2013 04:06, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Mon, Sep 23, 2013 at 12:29:36AM -0400, Trevor Woerner wrote:
>> Building qtwebkit would cause a QA issue (which, in my distro, would cause a
>> build error) such that QtWebPluginProcess and QtWebProcess would contain bad
>> RPATHs which pointed into the build location. This fix adds a patch to not
>> include the rpath.prf which leads to this problem.
>
> Could you send patch for master/dora first and then backport it to
> dylan? Otherwise I'll do it, but it will take a bit more time.

As far as I can tell, qtwebkit on master doesn't even try to compile.
This is what I get in my log.do_compile:

DEBUG: Executing shell function do_compile
NOTE: make -j 6 MAKEFLAGS=-j 6
OE_QMAKE_COMPILER=arm-poky-linux-gnueabi-gcc  -march=armv5te -marm
-mthumb-interwork
--sysroot=/home/trevor/build/yocto/tmp/master/qemuarm/sysroots/qemuarm
OE_QMAKE_CC=arm-poky-linux-gnueabi-gcc  -march=armv5te -marm
-mthumb-interwork
--sysroot=/home/trevor/build/yocto/tmp/master/qemuarm/sysroots/qemuarm
OE_QMAKE_CXX=arm-poky-linux-gnueabi-g++  -march=armv5te -marm
-mthumb-interwork
--sysroot=/home/trevor/build/yocto/tmp/master/qemuarm/sysroots/qemuarm
OE_QMAKE_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
OE_QMAKE_CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
-fpermissive -fvisibility-inlines-hidden
OE_QMAKE_LINK=arm-poky-linux-gnueabi-g++  -march=armv5te -marm
-mthumb-interwork
--sysroot=/home/trevor/build/yocto/tmp/master/qemuarm/sysroots/qemuarm
OE_QMAKE_LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
OE_QMAKE_AR=arm-poky-linux-gnueabi-ar OE_QMAKE_STRIP=echo
OE_QMAKE_WAYLAND_SCANNER=/home/trevor/build/yocto/tmp/master/qemuarm/sysroots/x86_64-linux/usr/bin/wayland-scanner
make: Nothing to be done for `first'.
DEBUG: Shell function do_compile finished

So I am nowhere near being able to see if there is an RPATH issue on
master. I tried this on two different hosts. Bitbake doesn't see any
errors (this compile step returns success!) so the build "succeeds"
even though I don't end up with qtwebkit.
Trevor Woerner - Sept. 23, 2013, 10:04 p.m.
Hi Martin,

On 23 September 2013 10:38, Trevor Woerner <trevor.woerner@linaro.org> wrote:
> On 23 September 2013 04:06, Martin Jansa <martin.jansa@gmail.com> wrote:
>> On Mon, Sep 23, 2013 at 12:29:36AM -0400, Trevor Woerner wrote:
>>> Building qtwebkit would cause a QA issue (which, in my distro, would cause a
>>> build error) such that QtWebPluginProcess and QtWebProcess would contain bad
>>> RPATHs which pointed into the build location. This fix adds a patch to not
>>> include the rpath.prf which leads to this problem.
>>
>> Could you send patch for master/dora first and then backport it to
>> dylan? Otherwise I'll do it, but it will take a bit more time.
>
> As far as I can tell, qtwebkit on master doesn't even try to compile.
> This is what I get in my log.do_compile:

Okay, I see my mistake now, qtbase needs ICU enabled otherwise
qtwebkit won't try to build.

The odd thing is that we get nothing out of qtwebkit, and yet its
build succeeds. This is quite misleading. It would be better:

- if qtwebkit won't build because qtbase doesn't include ICU support
at least a warning would be displayed
- if qtwebkit is part of a image, qtbase would automatically be built
with ICU support

Sadly now that I have enabled ICU in qtbase, my build of qtwebkit on
meta-qt5 master branch is failing. I'll have to look into it some
more. Is anyone else seeing this?

Best regards,
    Trevor
Trevor Woerner - Sept. 24, 2013, 12:52 a.m.
On 23 September 2013 18:04, Trevor Woerner <trevor.woerner@linaro.org> wrote:
> Sadly now that I have enabled ICU in qtbase, my build of qtwebkit on
> meta-qt5 master branch is failing. I'll have to look into it some
> more. Is anyone else seeing this?


It must have been an sstate or tmp issue. A fresh build with
completely new sstate and tmp compiles fine and only produces the QA
error as with the dylan branch.

Patch to follow.

Patch

diff --git a/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch b/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
new file mode 100644
index 0000000..f74a5cf
--- /dev/null
+++ b/recipes-qt/qt5/qtwebkit-5.0.2/rpath.patch
@@ -0,0 +1,12 @@ 
+diff -urN qtwebkit-opensource-src-5.0.2/Tools/qmake/mkspecs/features/unix/default_post.prf qtwebkit-opensource-src-5.0.2__new/Tools/qmake/mkspecs/features/unix/default_post.prf
+--- qtwebkit-opensource-src-5.0.2/Tools/qmake/mkspecs/features/unix/default_post.prf	2013-04-08 20:11:53.000000000 -0400
++++ qtwebkit-opensource-src-5.0.2__new/Tools/qmake/mkspecs/features/unix/default_post.prf	2013-09-22 22:37:51.096270035 -0400
+@@ -32,8 +32,6 @@
+     QMAKE_OBJECTIVE_CFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions
+ }
+ 
+-contains(TEMPLATE, app): CONFIG += rpath
+-
+ isEqual(QT_ARCH,i386):CONFIG(debug, debug|release) {
+   # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
+   config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory
diff --git a/recipes-qt/qt5/qtwebkit_5.0.2.bb b/recipes-qt/qt5/qtwebkit_5.0.2.bb
index 4d2f34d..1cad62b 100644
--- a/recipes-qt/qt5/qtwebkit_5.0.2.bb
+++ b/recipes-qt/qt5/qtwebkit_5.0.2.bb
@@ -2,6 +2,9 @@  require qt5-${PV}.inc
 require ${PN}.inc
 
 PR = "${INC_PR}.0"
+SRC_URI += "\
+	file://rpath.patch\
+	"
 
 SRC_URI[md5sum] = "85aad9f287910c21c8464d7d1ea010a9"
 SRC_URI[sha256sum] = "6ff4038f8db68be51661d1a6646f510b26f6ebbecbdeefb76cd8361f808768f6"