Skip to contentSkip to conversation

Modern Chromium with GN

meta-browser Jacobo Aragunde Pérez 5 participants 24 messages Oct 2, 2017 – Oct 30, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi Trevor,

I think you spent some time trying to get a more recent version of Chromium for meta-browser but it's been difficult. I have booked some time during the Web Engines Hackfest [1], happening now, to try to do this.

I recently learned about the usage of custom toolchains with GN, whis are the proper way to configure Yocto's toolchain on the recipe, instead of using the cros_* flags like we had done in the meta-browser fork I previously pointed you to. That's the approach I will follow.

I will send patches as soon as I have something!

[1] https://webengineshackfest.org/
[2] https://github.com/Igalia/meta-browser

Best,

Signature · 2 lines
Jacobo Aragunde
Software Engineer at Igalia
#1 lore raw

On Mon, Oct 2, 2017 at 12:35 PM, Jacobo Aragunde Pérez <[email protected]> wrote:
...

Quoted 1 line

I will send patches as soon as I have something!

...

+1 :-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw

Hi Jocobo,

Please have a look at
https://github.com/rakuco/meta-crosswalk/tree/chromium61/recipes-browser/chromium
from Raphael (CCed). It is an interesting and promising approach.

I have built against minnow (x86-64) and rpi3-32 (armv7ve) successfully with pyro. I haven't had time to runtime test anything yet. I'm still seeing a build issue with both MACHINEs against master.

It's been about two weeks since I've had time to tinker with it.

Best regards,
Trevor

#3 lore raw

Hi all,

Quoted 6 lines · Trevor Woerner

Hi Jocobo,

Please have a look at
https://github.com/rakuco/meta-crosswalk/tree/chromium61/recipes-browser/chromium
from Raphael (CCed). It is an interesting and promising approach.

Indeed, I've been in touch with Raphael who has also attended the hackfest. We have decided to go on with his approach, I will test those recipes in different hardware and add some missing bits there were before in meta-browser.

Quoted 4 lines

I have built against minnow (x86-64) and rpi3-32 (armv7ve) successfully with pyro. I haven't had time to runtime test anything yet. I'm still seeing a build issue with both MACHINEs against master.

I've tested a rpi3-32 image and I've successfully built an armv8 image for R-Car gen3, which I still have to test. So far I had to add a couple of backports related with the toolchain they use in Renesas BSPs.

I'll keep you informed of the progress :)

Best,

Signature · 2 lines
Jacobo Aragunde
Software Engineer at Igalia
#4 lore raw
In reply to Trevor Woerner

Hi everyone,

I have several potential patches for Rafael's layer after having tried several builds for different hardware. I'm sending individual mails to discuss each of them.

The first one is pretty straightforward. It is just a backport of an existing upstream chromium patch to fix a compilation error on some GCC versions. I've reproduced the error with gcc-linaro-5.3 and gcc-5.4.0 toolchains, and the patch fixes it. GCC 6 seems not to have any problem with the original code but I still think it makes no harm to include the patch.

Find the patch attached.

Best,

Signature · 1 line
Jacobo

From 88a4375bbc5e9bfb81a0573f1f2ec902b8ce23e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= <[email protected]>
Date: Wed, 4 Oct 2017 13:17:40 +0200
Subject: [PATCH] chromium: Backport patch to fix gcc build error

This is a compilation error that doesn't seem to manifest on gcc6 or clang toolchains, but it affects gcc5 which is used, for example, by R-Car gen 3 devices.

Patch: https://chromium-review.googlesource.com/645549

---
 recipes-browser/chromium/chromium_61.0.3163.100.bb |  1 +
 ...rename-ArrayBufferContents-AllocationKind.patch | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 recipes-browser/chromium/files/rename-ArrayBufferContents-AllocationKind.patch
recipes-browser/chromium/chromium_61.0.3163.100.bb +1 -0
index 87f6fdb..4bf1b0d 100644
@@ -13,6 +13,7 @@ SRC_URI += " \
         file://0001-Make-base-numerics-build-with-GCC.patch \
         file://0001-Fix-compilation-for-ATK-accessibility.patch \
         file://0001-Replace-remaining-references-to-struct-ucontext-with.patch \
+        file://rename-ArrayBufferContents-AllocationKind.patch \
         ${@bb.utils.contains('PACKAGECONFIG', 'root-profile', 'file://root-user-profile.patch', '', d)} \
         "
 
recipes-browser/chromium/files/rename-ArrayBufferContents-AllocationKind.patch new file +35 -0
new file mode 100644
index 0000000..f47b54e
@@ -0,0 +1,35 @@
+From ec0d7abe5c1520464ff0ea2405b2c59d51b0b775 Mon Sep 17 00:00:00 2001
+From: Piotr Tworek <[email protected]>
+Date: Fri, 1 Sep 2017 12:20:03 +0000
+Subject: [PATCH] Rename ArrayBufferContents::AllocationKind to
+ GetAllocationKind.
+
+Current name clashes with the name of the enum class the function is
+supposed to return. Clang does not care, but gcc fails to compile the
+code.
+
+Bug: 760070
+Change-Id: I935d91493a3fc7b289d03f776c14b6ec4f3f622a
+Reviewed-on: https://chromium-review.googlesource.com/645549
+Reviewed-by: Yuta Kitamura <[email protected]>
+Commit-Queue: Yuta Kitamura <[email protected]>
+Cr-Commit-Position: refs/heads/master@{#499171}
+---
+ .../WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h     | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h b/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
+index 94bb9161ec85..0671c471cbe0 100644
+--- a/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
++++ b/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
+@@ -122,7 +122,9 @@ class WTF_EXPORT ArrayBufferContents {
+     void* Data() const { return data_; }
+     size_t DataLength() const { return data_length_; }
+ 
+-    ArrayBufferContents::AllocationKind AllocationKind() const { return kind_; }
++    ArrayBufferContents::AllocationKind GetAllocationKind() const {
++      return kind_;
++    }
+ 
+     operator bool() const { return allocation_base_; }
+ 
Signature · 1 line
2.11.0
#5 lore raw
Quoted 6 lines · Jacobo Aragunde Pérez

Hi everyone,

I have several potential patches for Rafael's layer after having tried several builds for different hardware. I'm sending individual mails to discuss each of them.

Quoted 8 lines

The first one is pretty straightforward. It is just a backport of an existing upstream chromium patch to fix a compilation error on some GCC versions. I've reproduced the error with gcc-linaro-5.3 and gcc-5.4.0 toolchains, and the patch fixes it. GCC 6 seems not to have any problem with the original code but I still think it makes no harm to include the patch.

Find the patch attached.

Hey Jacobo,

Sorry for the delay, it took me a couple of days to catch up with everything after returning from the Hackfest :-)

I've just added some context to the patch and adjusted its name. It's now in my chromium61 branch as commit 13cdc60.

Thanks!

(P.S.: I haven't given up on the idea of merging my recipe into meta-browser, I just need to get around to doing it :-)

#6 lore raw

Are either of you working off of (and building against) master?

My builds against pyro build fine, but I can't build successfully against master.

This is a problem because, by convention, layers accept patches against master first, then allow those patches to be backported to prior releases. Until this works against master, it'll have a hard time landing in meta-browser.

#7 lore raw
Quoted 9 lines · Trevor Woerner

Are either of you working off of (and building against) master?

My builds against pyro build fine, but I can't build successfully against master.

This is a problem because, by convention, layers accept patches against master first, then allow those patches to be backported to prior releases. Until this works against master, it'll have a hard time landing in meta-browser.

Hey Trevor,

I decided to try out Yocto's rocko branch today, and found the same problem you described with GCC 7.

I've pushed commit a0db280 to my chromium61 branch; that one allowed me to get to the end of the build without any other issues. Let me know if that's enough to get master working for you.

#8 lore raw

Hi Raphael,

Quoted 4 lines · Raphael

On Tue, 2017-10-10 at 14:28 -0400, Trevor Woerner wrote:
I've pushed commit a0db280 to my chromium61 branch; that one allowed me to get to the end of the build without any other issues. Let me know if that's enough to get master working for you.

Excellent! Yes, this update works for me against master :-)

Has anyone started trying to integrate this with meta-browser?

#9 lore raw
Quoted 4 lines · Trevor Woerner

Hi Raphael,

On Tue, Oct 10, 2017 at 3:10 PM, Kubo Da Costa, Raphael <[email protected]> wrote:

Quoted 8 lines
Quoted 4 lines · Trevor Woerner

I've pushed commit a0db280 to my chromium61 branch; that one allowed me to get to the end of the build without any other issues. Let me know if that's enough to get master working for you.

Excellent! Yes, this update works for me against master :-)

Has anyone started trying to integrate this with meta-browser?

That's the next part of my plan, I hope to get around to it this week.

#10 lore raw

Hi,

Quoted 10 lines · Raphael Kubo da Costa
Quoted 9 lines · Trevor Woerner

Hi Raphael,

Quoted 4 lines · Raphael

On Tue, 2017-10-10 at 14:28 -0400, Trevor Woerner wrote:
I've pushed commit a0db280 to my chromium61 branch; that one allowed me to get to the end of the build without any other issues. Let me know if that's enough to get master working for you.

Quoted 5 lines
Quoted 3 lines

Excellent! Yes, this update works for me against master :-)

Has anyone started trying to integrate this with meta-browser?

That's the next part of my plan, I hope to get around to it this week.

I'd like to give Chromium 62 a shot on arm64, but the recipes currently only support x11, is that correct? My platform is based on wayland, any plans on supporting that?

Thanks,
Daniel

#11 lore raw
Quoted 5 lines · Daniel Mack

I'd like to give Chromium 62 a shot on arm64, but the recipes currently only support x11, is that correct? My platform is based on wayland, any plans on supporting that?

The problem is that upstream Chromium does not support Wayland natively yet. There is a fork under development to implement this support, which is quite advanced now: https://github.com/Igalia/chromium

Patches from the fork will start pouring into upstream Chromium shortly.

Signature · 2 lines
Jacobo Aragunde
Software Engineer at Igalia
#12 lore raw
Quoted 7 lines · Jacobo Aragunde Pérez
Quoted 5 lines · Daniel Mack

I'd like to give Chromium 62 a shot on arm64, but the recipes currently only support x11, is that correct? My platform is based on wayland, any plans on supporting that?

Quoted 6 lines

The problem is that upstream Chromium does not support Wayland natively yet. There is a fork under development to implement this support, which is quite advanced now: https://github.com/Igalia/chromium

Patches from the fork will start pouring into upstream Chromium shortly.

I see, thanks for explaining. I'll wait for these upstream patches and your recipes to land then!

Thanks,
Daniel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

+oe-devel again

Quoted 17 lines · Jacobo Aragunde Pérez
Quoted 6 lines · Jacobo Aragunde Pérez

Hi everyone,

I have several potential patches for Rafael's layer after having tried several builds for different hardware. I'm sending individual mails to discuss each of them.

The second patch is a fix that I needed with a GCC 5.4.0 toolchain. The fix looks harmless enough so I sent it upstream (to the webrtc project), but I don't know if it will be merged.

I have another couple patches to fix problems that only happen when compiling with linaro-5.3, one of them is a backport for the compiler itself. I don't think they belong in this layer so I'm finally not sending them. Anyway, ask me if you are interested!

Quoted 4 lines

All in all, I have created images with Rafael's layer for Raspberry Pi 3 and R-Car gen 3 with different toolchains: GCC 5.4.0 and 6.3.0 for the former, and linaro-5.3 for the latter. Let me know if you want me to do any other tests.

Hey Jacobo,

Thanks for all the testing so far!

Can you check if the attached patch also solves the WebRTC build issue for you? I've tried it here with Yocto's morty branch and GCC 5.4.0.

If so, I'll send it upstream, as the original approach
(https://webrtc-review.googlesource.com/c/src/+/8641) was not accepted by the WebRTC maintainers.

third_party/webrtc/modules/audio_processing/aec3/aec_state.cc +4 -4
@@ -157,7 +157,7 @@
   // TODO(peah): Add the delay in this computation to ensure that the render and
   // capture signals are properly aligned.
   RTC_DCHECK_LT(0, x.size());
-  const float max_sample = fabs(*std::max_element(
+  const float max_sample = fabsf(*std::max_element(
       x.begin(), x.end(), [](float a, float b) { return a * a < b * b; }));
   const bool saturated_echo =
       previous_max_sample_ * 100 > 1600 && SaturatedCapture();
@@ -271,9 +271,9 @@
   auto result_x = std::minmax_element(x.begin(), x.end());
   auto result_s = std::minmax_element(s.begin(), s.end());
   const float x_abs =
-      std::max(std::abs(*result_x.first), std::abs(*result_x.second));
+      std::max(fabsf(*result_x.first), fabsf(*result_x.second));
   const float s_abs =
-      std::max(std::abs(*result_s.first), std::abs(*result_s.second));
+      std::max(fabsf(*result_s.first), fabsf(*result_s.second));
 
   if (x_abs < 5.f) {
     ++low_farend_counter_;
@@ -294,7 +294,7 @@
 void AecState::EchoAudibility::UpdateWithOutput(rtc::ArrayView<const float> e) {
   const float e_max = *std::max_element(e.begin(), e.end());
   const float e_min = *std::min_element(e.begin(), e.end());
-  const float e_abs = std::max(std::abs(e_max), std::abs(e_min));
+  const float e_abs = std::max(fabsf(e_max), fabsf(e_min));
 
   if (max_nearend_ < e_abs) {
     max_nearend_ = e_abs;
#15 lore raw
Quoted 6 lines · Raphael Kubo da Costa

Can you check if the attached patch also solves the WebRTC build issue for you? I've tried it here with Yocto's morty branch and GCC 5.4.0.

If so, I'll send it upstream, as the original approach
(https://webrtc-review.googlesource.com/c/src/+/8641) was not accepted by the WebRTC maintainers.

Sorry, I'm attaching patch v2, the original version had an extra, unwanted chunk.

third_party/webrtc/modules/audio_processing/aec3/aec_state.cc +3 -3
@@ -271,9 +271,9 @@
   auto result_x = std::minmax_element(x.begin(), x.end());
   auto result_s = std::minmax_element(s.begin(), s.end());
   const float x_abs =
-      std::max(std::abs(*result_x.first), std::abs(*result_x.second));
+      std::max(fabsf(*result_x.first), fabsf(*result_x.second));
   const float s_abs =
-      std::max(std::abs(*result_s.first), std::abs(*result_s.second));
+      std::max(fabsf(*result_s.first), fabsf(*result_s.second));
 
   if (x_abs < 5.f) {
     ++low_farend_counter_;
@@ -294,7 +294,7 @@
 void AecState::EchoAudibility::UpdateWithOutput(rtc::ArrayView<const float> e) {
   const float e_max = *std::max_element(e.begin(), e.end());
   const float e_min = *std::min_element(e.begin(), e.end());
-  const float e_abs = std::max(std::abs(e_max), std::abs(e_min));
+  const float e_abs = std::max(fabsf(e_max), fabsf(e_min));
 
   if (max_nearend_ < e_abs) {
     max_nearend_ = e_abs;
#16 lore raw
Quoted 10 lines · Raphael Kubo da Costa
Quoted 6 lines · Raphael Kubo da Costa

Can you check if the attached patch also solves the WebRTC build issue for you? I've tried it here with Yocto's morty branch and GCC 5.4.0.

If so, I'll send it upstream, as the original approach
(https://webrtc-review.googlesource.com/c/src/+/8641) was not accepted by the WebRTC maintainers.

Sorry, I'm attaching patch v2, the original version had an extra, unwanted chunk.

I've upstreamed the patch and integrated it into the chromium61 branch.

Work on Chromium 62 has started, but updating is a bit slower now that I'm trying to test GCC 5, 7, pyro and rocko.

#17 lore raw
Quoted 2 lines · Raphael Kubo da Costa

Work on Chromium 62 has started, but updating is a bit slower now that I'm trying to test GCC 5, 7, pyro and rocko.

I've pushed a new branch called "chromium62". It's been test-built against Yocto's pyro (with GCC 5) and rocko (with GCC 7) for x86 and x86-64.

Additional testing is appreciated!

#18 lore raw
Quoted 9 lines · Raphael Kubo da Costa
Quoted 2 lines · Raphael Kubo da Costa

Work on Chromium 62 has started, but updating is a bit slower now that I'm trying to test GCC 5, 7, pyro and rocko.

I've pushed a new branch called "chromium62". It's been test-built against Yocto's pyro (with GCC 5) and rocko (with GCC 7) for x86 and x86-64.

Additional testing is appreciated!

It looks like something in the chromium62 build is calling my native g++ and expecting that this native g++ will be recent enough to support c++14:

	| g++  -MMD -MF base/base_paths.o.d  -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/out_bootstrap/gen -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62 -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++14 -Wno-c++11-narrowing -c /z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/base/base_paths.cc -o base/base_paths.o
	| g++: error: unrecognized command line option ‘-std=c++14’

Unfortunately on my openSUSE 42.2 host this isn't the case:

	$ g++ -v
	Using built-in specs.
	COLLECT_GCC=g++
	COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
	Target: x86_64-suse-linux
	Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
	Thread model: posix
	gcc version 4.8.5 (SUSE Linux)

Is there any way to intercept these calls and have it call OE's gcc-native instead?

#19 lore raw
Quoted 15 lines · Trevor Woerner
Quoted 9 lines · Raphael Kubo da Costa
Quoted 2 lines · Raphael Kubo da Costa

Work on Chromium 62 has started, but updating is a bit slower now that I'm trying to test GCC 5, 7, pyro and rocko.

I've pushed a new branch called "chromium62". It's been test-built against Yocto's pyro (with GCC 5) and rocko (with GCC 7) for x86 and x86-64.

Additional testing is appreciated!

It looks like something in the chromium62 build is calling my native g++ and expecting that this native g++ will be recent enough to support c++14:

Quoted 12 lines
	| g++ -MMD -MF base/base_paths.o.d
	| -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/out_bootstrap/gen
	| -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62
	| -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
	| -O2 -pipe -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0
	| -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS
	| -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions
	| -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
	| -O2 -pipe -std=c++14 -Wno-c++11-narrowing -c
	| /z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/base/base_paths.cc
	| -o base/base_paths.o
	| g++: error: unrecognized command line option ‘-std=c++14’

Ouch :( That's a new kind of issue I was not expecting.

Quoted 4 lines

[...]

Is there any way to intercept these calls and have it call OE's gcc-native instead?

Do you have an example of that being done in another recipe?

#20 lore raw
Quoted 30 lines · Raphael Kubo da Costa
Quoted 15 lines · Trevor Woerner
Quoted 9 lines · Raphael Kubo da Costa
Quoted 2 lines · Raphael Kubo da Costa

Work on Chromium 62 has started, but updating is a bit slower now that I'm trying to test GCC 5, 7, pyro and rocko.

I've pushed a new branch called "chromium62". It's been test-built against Yocto's pyro (with GCC 5) and rocko (with GCC 7) for x86 and x86-64.

Additional testing is appreciated!

It looks like something in the chromium62 build is calling my native g++ and expecting that this native g++ will be recent enough to support c++14:

Quoted 12 lines
      | g++ -MMD -MF base/base_paths.o.d
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/out_bootstrap/gen
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0
      | -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS
      | -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -std=c++14 -Wno-c++11-narrowing -c
      | /z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/base/base_paths.cc
      | -o base/base_paths.o
      | g++: error: unrecognized command line option ‘-std=c++14’
Quoted 1 line

Ouch :( That's a new kind of issue I was not expecting.

It needs to check if c++14 is really needed for GN to work. Better would it depends on gn-native and it to be handled elsewhere.

Quoted 6 lines
Quoted 4 lines

[...]

Is there any way to intercept these calls and have it call OE's gcc-native instead?

Do you have an example of that being done in another recipe?

Hard. We don't build a native compiler.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#21 lore raw
Quoted 13 lines · Otavio Salvador
Quoted 13 lines
Quoted 12 lines
      | g++ -MMD -MF base/base_paths.o.d
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/out_bootstrap/gen
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0
      | -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS
      | -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -std=c++14 -Wno-c++11-narrowing -c
      | /z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/base/base_paths.cc
      | -o base/base_paths.o
      | g++: error: unrecognized command line option ‘-std=c++14’
Quoted 4 lines
Quoted 1 line

Ouch :( That's a new kind of issue I was not expecting.

It needs to check if c++14 is really needed for GN to work. Better would it depends on gn-native and it to be handled elsewhere.

While this specific issue is in GN, I expect it to happen during the Chromium build as well, as some tools are built and run on the host machine.

Even if GN specifically does not depend on C++14 now, working around that is an uphill battle, as the Chromium project requires a C++14 compiler and multiple parts of the code base will start using C++14 features (or already are).

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

[...]

Is there any way to intercept these calls and have it call OE's gcc-native instead?

Do you have an example of that being done in another recipe?

Hard. We don't build a native compiler.

#22 lore raw
Quoted 19 lines · Raphael Kubo da Costa
Quoted 13 lines · Otavio Salvador
Quoted 13 lines
Quoted 12 lines
      | g++ -MMD -MF base/base_paths.o.d
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/out_bootstrap/gen
      | -I/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0
      | -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS
      | -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions
      | -isystem/z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/recipe-sysroot-native/usr/include
      | -O2 -pipe -std=c++14 -Wno-c++11-narrowing -c
      | /z/chromium/crosswalk/build/tmp-glibc/work/x86_64-linux/gn-native/62.0.3202.62-r0/chromium-62.0.3202.62/base/base_paths.cc
      | -o base/base_paths.o
      | g++: error: unrecognized command line option ‘-std=c++14’
Quoted 4 lines
Quoted 1 line

Ouch :( That's a new kind of issue I was not expecting.

It needs to check if c++14 is really needed for GN to work. Better would it depends on gn-native and it to be handled elsewhere.

Quoted 8 lines

While this specific issue is in GN, I expect it to happen during the Chromium build as well, as some tools are built and run on the host machine.

Even if GN specifically does not depend on C++14 now, working around that is an uphill battle, as the Chromium project requires a C++14 compiler and multiple parts of the code base will start using C++14 features (or already are).

Ouch for sure! For some strange reason I was under the impression OE builds created a native gcc for things like this! Oh well, I was able to sort out the native compiler issue on my openSUSE 42.2 system; the default gcc is 4.8, but there are packages for gcc5 and gcc6 so I just installed the gcc6 one and used update-alternatives. It works, but it will lead to some interesting questions wrt support and basic OE support for openSUSE (however, that'll be a different discussion for another day and probably for another mailing list).

I was able to successfully build for the minnow board (x86_64), but when I tried building for the 32-bit variant for raspberrypi3 I got:

| install: cannot stat 'swiftshader/libEGL.so': No such file or directory

during the do_install step for chromium itself. Odd, I thought egl came from mesa? (but then again I thought OE built its own gcc-native... :-S

#23 lore raw
Quoted 10 lines · Trevor Woerner

...
I was able to successfully build for the minnow board (x86_64), but when I tried building for the 32-bit variant for raspberrypi3 I got:

| install: cannot stat 'swiftshader/libEGL.so': No such file or directory

during the do_install step for chromium itself. Odd, I thought egl came from mesa? (but then again I thought OE built its own gcc-native... :-S

Raphael added the swiftshader libs in this commit, which explains nicely what they are for:

https://github.com/rakuco/meta-crosswalk/commit/924103037857e6b9e8348d67381ea09cfbf975e3

I was able to build arm32 images for the Pi3 before this commit. I guess swiftshader is not built on arm?

Best,

Signature · 2 lines
Jacobo Aragunde
Software Engineer at Igalia
#24 lore raw
In reply to Trevor Woerner
Quoted 8 lines · Trevor Woerner

I was able to successfully build for the minnow board (x86_64), but when I tried building for the 32-bit variant for raspberrypi3 I got:

| install: cannot stat 'swiftshader/libEGL.so': No such file or directory

during the do_install step for chromium itself. Odd, I thought egl came from mesa? (but then again I thought OE built its own gcc-native... :-S

Thanks for spotting that, I've fixed it in commit de21170 ("chromium:
Install SwiftShader only when building for Intel architectures"). I've now checked the M62 build on pyro with GCC 5.4.0 and MACHINE="raspberrypi3".

As for the EGL question: as far as I know, the SwiftShader stuff [1] is a CPU-based OpenGL implementation that's used when hardware acceleration is not available.

[1] https://github.com/google/swiftshader