Patchwork [meta-browser,2/2] chromium-35*: use BFD when building for x86-64

login
register
mail settings
Submitter Martin Jansa
Date Aug. 9, 2014, 9:39 p.m.
Message ID <1407620350-7644-2-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/77755/
State New, archived
Headers show

Comments

Martin Jansa - Aug. 9, 2014, 9:39 p.m.
* this doesn't fix it completely, but allows it a bit further and then
  it fails in the same spot as when building for qemux86 (or 37* version
  with gold)

  sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
    warning: hidden symbol 'sqlite3_temp_directory' in obj/third_party/sqlite/libsqlite3.a(obj/third_party/sqlite/amalgamation/sqlite.sqlite3.o)
    is referenced by DSO
    sysroots/qemux86-64/usr/lib/../lib/libsoftokn3.so
  sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
    error: treating warnings as errors
  collect2: error: ld returned 1 exit status

  and few more symbols like this, libsoftokn3.so is provided by system
  nss, using system sqlite3 has some issues too:
  https://code.google.com/p/chromium/issues/detail?id=22208

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 recipes-browser/chromium/chromium_35.0.1916.114.bb | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
Otavio Salvador - Aug. 11, 2014, 12:12 a.m.
On Sat, Aug 9, 2014 at 6:39 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> * this doesn't fix it completely, but allows it a bit further and then
>   it fails in the same spot as when building for qemux86 (or 37* version
>   with gold)
>
>   sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
>     warning: hidden symbol 'sqlite3_temp_directory' in obj/third_party/sqlite/libsqlite3.a(obj/third_party/sqlite/amalgamation/sqlite.sqlite3.o)
>     is referenced by DSO
>     sysroots/qemux86-64/usr/lib/../lib/libsoftokn3.so
>   sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
>     error: treating warnings as errors
>   collect2: error: ld returned 1 exit status
>
>   and few more symbols like this, libsoftokn3.so is provided by system
>   nss, using system sqlite3 has some issues too:
>   https://code.google.com/p/chromium/issues/detail?id=22208
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Are you going to work on this to fix it completely?

I think we ought to focus in 37 as 35 is "old" already.
Martin Jansa - Aug. 11, 2014, 8:45 a.m.
On Sun, Aug 10, 2014 at 09:12:50PM -0300, Otavio Salvador wrote:
> On Sat, Aug 9, 2014 at 6:39 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > * this doesn't fix it completely, but allows it a bit further and then
> >   it fails in the same spot as when building for qemux86 (or 37* version
> >   with gold)
> >
> >   sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
> >     warning: hidden symbol 'sqlite3_temp_directory' in obj/third_party/sqlite/libsqlite3.a(obj/third_party/sqlite/amalgamation/sqlite.sqlite3.o)
> >     is referenced by DSO
> >     sysroots/qemux86-64/usr/lib/../lib/libsoftokn3.so
> >   sysroots/x86_64-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-ld.gold:
> >     error: treating warnings as errors
> >   collect2: error: ld returned 1 exit status
> >
> >   and few more symbols like this, libsoftokn3.so is provided by system
> >   nss, using system sqlite3 has some issues too:
> >   https://code.google.com/p/chromium/issues/detail?id=22208
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> 
> Are you going to work on this to fix it completely?

I don't use chromium anywhere, so I would prefer someone else to do it.

I just got too annoyed by it failing in every single world build for
months.

Patch

diff --git a/recipes-browser/chromium/chromium_35.0.1916.114.bb b/recipes-browser/chromium/chromium_35.0.1916.114.bb
index c1021c0..3df1716 100644
--- a/recipes-browser/chromium/chromium_35.0.1916.114.bb
+++ b/recipes-browser/chromium/chromium_35.0.1916.114.bb
@@ -30,9 +30,17 @@  inherit gettext
 # automatically and silently fall back to GLX
 PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
 
+# when building with gold for qemux86-64 it fails with:
+# FAILED: x86_64-oe-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemux86-64 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -pthread -Wl,-z,noexecstack -fPIC -B/home/jenkins/oe/world/shr-core/tmp-eglibc/work/core2-64-oe-linux/chromium/35.0.1916.114-r0/chromium-35.0.1916.114/third_party/gold -m64 -Wl,--icf=none -Wl,--gc-sections -o chrome_sandbox -Wl,--start-group obj/sandbox/linux/suid/chrome_sandbox.linux_util.o obj/sandbox/linux/suid/chrome_sandbox.process_util_linux.o obj/sandbox/linux/suid/chrome_sandbox.sandbox.o  -Wl,--end-group
+# chromium/35.0.1916.114-r0/chromium-35.0.1916.114/third_party/gold/gold64: -plugin: unknown option
+# chromium/35.0.1916.114-r0/chromium-35.0.1916.114/third_party/gold/gold64: use the --help option for usage information
+# collect2: error: ld returned 1 exit status
+# ninja: build stopped: subcommand failed.
+EXTRA_OEGYP_GOLD_x86-64 = "-Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0"
+EXTRA_OEGYP_GOLD = "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0 -Dlinux_use_gold_flags=0', d)}"
+
 EXTRA_OEGYP =	" \
-	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0', d)} \
-	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_flags=0', d)} \
+	${EXTRA_OEGYP_GOLD} \
 	-I ${WORKDIR}/oe-defaults.gypi \
 	-I ${WORKDIR}/include.gypi \
 	${@bb.utils.contains('PACKAGECONFIG', 'component-build', '-I ${WORKDIR}/component-build.gypi', '', d)} \