Skip to content

Conversation

@caneraltinbasak
Copy link
Contributor

Chromium 138+ uses its bundled libc++ and compiler-rt. To ensure the build
system uses these and does not fall back to system-provided runtime libraries,
explicitly pass the target triple and disable system stdlib++.

This avoids linker errors caused by missing crtbeginS.o, crtendS.o, and libgcc
when using Clang with a minimal sysroot.

scarthgap branch of meta-oe ships with clang18. meta-lts-mixins with scarthgap-clang20
branch should be included in layer.conf

Release Notes:
https://chromereleases.googleblog.com/2025/07/stable-channel-update-for-desktop_15.html

Build and patch changes:
Added patches:

0011-fix-check_version-Only-compare-node.js-major-version.patch
Updated patches:

0009-Adjust-the-Rust-build-to-our-needs.patch
Removed patches:

0011-Disable-crabbyavif-to-fix-build-errors.patch
0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch
0013-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch
0014-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch
0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch
License changes:
Added licenses:

third_party/compiler-rt/src/LICENSE.TXT
third_party/libtess2/LICENSE
third_party/llvm-libc/src/LICENSE.TXT
third_party/net/third_party/mozilla_security_manager/LICENSE
Removed licenses:

third_party/accessibility-audit/LICENSE
third_party/io_grpc_grpc_api/LICENSE
third_party/libavifinfo/LICENSE
Updated licenses:

third_party/android_deps/libs/com_google_android_gms_play_services_auth/LICENSE → third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth/LICENSE
third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE → third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE
third_party/android_deps/libs/com_google_android_gms_play_services_auth_base/LICENSE → third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_base/LICENSE
third_party/android_deps/libs/com_google_android_gms_play_services_auth_blockstore/LICENSE → third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_blockstore/LICENSE
third_party/android_deps/libs/com_google_android_gms_play_services_fido/LICENSE → third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_fido/LICENSE
third_party/android_deps/libs/com_google_android_libraries_identity_googleid_googleid/LICENSE →
third_party/android_deps/autorolled/committed/libs/com_google_android_libraries_identity_googleid_googleid/LICENSE
third_party/expat/src/expat/COPYING
third_party/libjpeg_turbo/LICENSE
Test-built
chromium-ozone-wayland

master, clang, MACHINE=qemux86-64
chromium-x11

master, clang, MACHINE=qemux86-64, qemuarm, qemuarm64
Repo hashes (from meta-chromium-test)
meta-oe:
commit: "491671faee11ea131feab5a3a451d1a01deb2ab1"
poky:
commit: "ac257900c33754957b2696529682029d997a8f28"
meta-clang:
commit: "76596813cd0061bd9818a80926e6900af61fcaa0"
meta-lts-mixins:
commit: "96deb45139df027473faf0938fe006d33c45c375"

@caneraltinbasak
Copy link
Contributor Author

@san-skov-dk
Copy link

If I use meta-lts-mixins hash 8ed4bf1919453f20d33c492897f93164dc69f4a8 (rust/cargo 1.88)
I can compile it on my targets i.MX6 based cortexa9t2hf-neon and i.MX8 based cortexa53-crypto

But if I update to latest meta-lts-mixins with rust/cargo 1.89. The following happens

| error: hiding a lifetime that's elided elsewhere is confusing
| --> ../../third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs:219:17
| |
| 219 | pub fn iter(&self) -> QrCodeIterator {
| | ^^^^^ -------------- the same lifetime is hidden here
| | |
| | the lifetime is elided here
| |
| = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
| note: the lint level is defined here
| --> ../../third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/lib.rs:8:9
| |
| 8 | #![deny(warnings)]
| | ^^^^^^^^
| = note: #[deny(mismatched_lifetime_syntaxes)] implied by #[deny(warnings)]
| help: use '_ for type paths
| |
| 219 | pub fn iter(&self) -> QrCodeIterator<'> {
| | ++++
|
| error: hiding a lifetime that's elided elsewhere is confusing
| --> ../../third_party/rust/chromium_crates_io/vendor/qr_code-v2/src/optimize.rs:112:22
| |
| 112 | pub fn new(data: &[u8]) -> Parser {
| | ^^^^^ ------ the same lifetime is hidden here
| | |
| | the lifetime is elided here
| |
| = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
| help: use '_ for type paths
| |
| 112 | pub fn new(data: &[u8]) -> Parser<'
> {
| | ++++
|
| error: aborting due to 2 previous errors
|
| [1590/14681] arm-pmc-linux-gnueabi-clang++ -

@caneraltinbasak
Copy link
Contributor Author

caneraltinbasak commented Sep 24, 2025

Old code does not compile with new Rust. Changes are tested with
meta-lts-mixins: "96deb45139df027473faf0938fe006d33c45c375"

Chromium uses always uses latest compilers, the issue is probably fixed upstream. The fix needs to be backported if aim is to always stay on tip of the tree of the branches on all required layers. I don't know what is meta-browser's strategy on this.

@san-skov-dk
Copy link

@kraj @otavio Do you the strategy?
The PR works by creation. Then meta-lts-mixins got updated, which courses it not to work.

@OldManYellsAtCloud
Copy link
Collaborator

I am not talking for meta-chromium folks, nor trying to suggest anything - but maybe this is useful for anyone with anything: for Firefox I include in the readme which Rust version from which repository was used to test compile the browser: https://github.com/OSSystems/meta-browser/tree/master/meta-firefox (scroll to the table in the middle)
Not saying that I wouldn't look into issues reported with other versions, but I intend this as a baseline for the users, what they can expect to work.

@adalessandro
Copy link
Contributor

@caneraltinbasak pushed fixes on brightsign#16 , please review and merge.

@adalessandro
Copy link
Contributor

@caneraltinbasak pushed fixes on brightsign#16 , please review and merge.

BTW, tested build using your hashes. In the above mentioned MR, added those hashes dependencies both in the README and commit log message:

Test dependencies:
------------------

* URI: git://git.yoctoproject.org/poky
  - branch: scarthgap
  - revision: ac257900c33754957b2696529682029d997a8f28

* URI: git://git.openembedded.org/meta-openembedded
  - layers: meta-oe
  - branch: scarthgap
  - revision: 491671faee11ea131feab5a3a451d1a01deb2ab1

* URI: git://github.com/kraj/meta-clang
  - branch: scarthgap-clang20
  - revision: 76596813cd0061bd9818a80926e6900af61fcaa0

* URI: git://git.yoctoproject.org/meta-lts-mixins
  - branch: scarthgap/rust
  - revision: 96deb45139df027473faf0938fe006d33c45c375

@caneraltinbasak caneraltinbasak force-pushed the for/review/ossystems/scarthgap/138.0.7204.157 branch from 4eaf7fc to 95dd114 Compare October 16, 2025 12:42
@caneraltinbasak
Copy link
Contributor Author

I've now rebased to tip of OSSystems:scarthgap and forced push onto brightsign:for/review/ossystems/scarthgap/138.0.7204.157

You should be able to land my changes now.

@adalessandro
Copy link
Contributor

I've now rebased to tip of OSSystems:scarthgap and forced push onto brightsign:for/review/ossystems/scarthgap/138.0.7204.157

You should be able to land my changes now.

Same comment as in #920 , please let's wait until this is properly fixed for the final submission.

@caneraltinbasak caneraltinbasak force-pushed the for/review/ossystems/scarthgap/138.0.7204.157 branch from 95dd114 to 5540b9c Compare October 17, 2025 12:50
@adalessandro
Copy link
Contributor

@MaxIhlenfeldt , @kraj ,

This should be in a good state, at least as good as the master update. Let's discuss on #920 (comment) , once merged 🤞 we can follow up with this one.

@adalessandro
Copy link
Contributor

@MaxIhlenfeldt , @kraj ,

This should be in a good state, at least as good as the master update. Let's discuss on #920 (comment) , once merged 🤞 we can follow up with this one.

@kraj @otavio this is a follow up of #920 , backporting to scarthgap.

@otavio
Copy link
Member

otavio commented Oct 24, 2025

I'm not a big fan of using fixed hashes, so I prefer not to modify the readme in this aspect. However, you can include a note in the readme indicating that the compiler may require some adjustments. I'm okay with adding such a note, but I don't agree with using fixed hashes.

@adalessandro
Copy link
Contributor

I'm not a big fan of using fixed hashes, so I prefer not to modify the readme in this aspect. However, you can include a note in the readme indicating that the compiler may require some adjustments. I'm okay with adding such a note, but I don't agree with using fixed hashes.

Me neither, but as we've had so many build errors recently, I think that should be noted somewhere. But yeah, let me add a note in the README.
FYI, the commit you just got merged in master 25b6e5e added fixed hashes in the same way. I guess that should be amended as well.

@adalessandro
Copy link
Contributor

@otavio I've pushed the following branch (as I don't have the rights to rebase this MR from @caneraltinbasak ), which fixis the README for this MR https://github.com/adalessandro/meta-browser/tree/for/review/ossystems/scarthgap/138.0.7204.157
@caneraltinbasak feel free to rebase your branch with this change, or @otavio feel free to just merge it if you agree with it. Thanks!

@adalessandro
Copy link
Contributor

I'm not a big fan of using fixed hashes, so I prefer not to modify the readme in this aspect. However, you can include a note in the readme indicating that the compiler may require some adjustments. I'm okay with adding such a note, but I don't agree with using fixed hashes.

Me neither, but as we've had so many build errors recently, I think that should be noted somewhere. But yeah, let me add a note in the README. FYI, the commit you just got merged in master 25b6e5e added fixed hashes in the same way. I guess that should be amended as well.

FWIW, pushed #936 to fix the README in master branch.

@caneraltinbasak caneraltinbasak force-pushed the for/review/ossystems/scarthgap/138.0.7204.157 branch from 5540b9c to e619419 Compare October 24, 2025 15:35
BasketsAlaaf and others added 6 commits October 24, 2025 12:37
…#882)

This adds a section to the readme, explaining the solution to a build
error discussed in OSSystems#845.

Adding this in the readme makes it easier to be found.

Signed-off-by: Matthias Schoepfer <msc@fp-robotics.com>
Release notes:
    https://chromereleases.googleblog.com/2025/05/stable-channel-update-for-desktop_14.html

Build and patch changes:
------------------------

Added patches:
  * 0014-Revert-Remove-libavif-based-AVIF-decoder.patch
  * 0015-Revert-Remove-third_party-libavif.patch
  * 0017-rust-Use-adler-instead-of-adler2.patch
  * 0018-third_party-node-update_node_binaries-Update-nodejs-.patch

Updated patches:
  * 0016-Disable-crabbyavif-to-fix-build-errors.patch
  * Rebased remaining patches.

Removed patches:
  * 0015-Revert-Connect-the-Rust-log-crate-to-the-base-loggin.patch

License changes:
----------------

Added licenses:
  * TBD

Removed licenses:
  * TBD

Updated licenses:
  * TBD

Test-built:
-----------

* chromium-ozone-wayland
  * master, clang, MACHINE=qemux86-64, qemuarm, qemuarm64

* chromium-x11
  * master, clang, MACHINE=qemux86-64, qemuarm, qemuarm64

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Add configuration options to enable hardware video decoding using
stateless V4L2 M2M device. This allows offloading e.g. h264 video
playback to Hantro VPU on i.MX8MP where this was tested. To make
that work, enable 'use-v4l2' and 'proprietary-codecs' PACKAGECONFIG.

This commit was implemented with much great help from Jianfeng Liu .

Signed-off-by: Marek Vasut <marex@denx.de>
The TST043015CNHX panel is a 480x272 panel. Chromium browser limits the
minimum window width to 500px since commits:

6b0ecc1e4532c ("Set lower bound on contents pane size.")
580d6900dc7fc ("In tab dragging, the window size should be larger than its minimum size.")

To make chromium browser usable on those tiny panels as well, reduce
the minimum window width to 480px. The upstreaming of this change is
in progress.

Signed-off-by: Marek Vasut <marex@denx.de>
rust triple is not specialized in yocto for neon enabled arm targets.
Adds a patch to `filter_clang_args.py` to skip `-mbranch-protection`
and `-mfpu=` flags when compiling Rust. These flags are specific to ARM
clang and cause build issues on other architectures with Rust compiler.

Upstream-Status: Inappropriate [specific to our build setup]
fixes:
../../media/gpu/v4l2/legacy/v4l2_video_decoder_backend_stateful.cc:450:20:
error: non-constant-expression cannot be narrowed from type '__suseconds64_t'
(aka 'long long') to 'long' in initializer list [-Wc++11-narrowing]
Removed -g flags from arm builds. arm linker is unable to link the image
due to image size if -g flag is used:

arm-poky-linux-gnueabi-ld.lld: error: output file too large: 7344071860 bytes
Chromium 138+ uses its bundled libc++ and compiler-rt. To ensure the build
system uses these and does not fall back to system-provided runtime
libraries, explicitly pass the target triple and disable system stdlib++.

This avoids linker errors caused by missing crtbeginS.o, crtendS.o, and
libgcc when using Clang with a minimal sysroot.

Release Notes:
    https://chromereleases.googleblog.com/2025/07/stable-channel-update-for-desktop_15.html

Build and patch changes:
------------------------

Added patches:
  * 0011-fix-check_version-Only-compare-node.js-major-version.patch

Updated patches:
  * 0009-Adjust-the-Rust-build-to-our-needs.patch

Removed patches:
  * 0011-Revert-Allow-and-use-std-hardware_destructive_interf.patch
  * 0012-Revert-Set-Rust-symbol-visibility-to-hidden-when-C-s.patch
  * 0013-pdfium-Fix-missing-PDFiumAPIStringBufferAdapter-temp.patch
  * 0014-Revert-Remove-libavif-based-AVIF-decoder.patch
  * 0015-Revert-Remove-third_party-libavif.patch
  * 0016-Disable-crabbyavif-to-fix-build-errors.patch
  * 0016-Fix-adler-reference-for-Rust-1.86-and-later.patch
  * 0017-rust-Use-adler-instead-of-adler2.patch
  * 0018-third_party-node-update_node_binaries-Update-nodejs-.patch
  * 0020-rust-filter-out-arm-specific-flags-from-rust-compile.patch

License changes:
----------------

Added licenses:
  * third_party/compiler-rt/src/LICENSE.TXT
  * third_party/libtess2/LICENSE
  * third_party/llvm-libc/src/LICENSE.TXT
  * third_party/net/third_party/mozilla_security_manager/LICENSE

Removed licenses:
  * third_party/accessibility-audit/LICENSE
  * third_party/io_grpc_grpc_api/LICENSE
  * third_party/libavifinfo/LICENSE

Updated licenses:
  * third_party/android_deps/libs/com_google_android_gms_play_services_auth/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth/LICENSE
  * third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_api_phone/LICENSE
  * third_party/android_deps/libs/com_google_android_gms_play_services_auth_base/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_base/LICENSE
  * third_party/android_deps/libs/com_google_android_gms_play_services_auth_blockstore/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_auth_blockstore/LICENSE
  * third_party/android_deps/libs/com_google_android_gms_play_services_fido/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_gms_play_services_fido/LICENSE
  * third_party/android_deps/libs/com_google_android_libraries_identity_googleid_googleid/LICENSE -> third_party/android_deps/autorolled/committed/libs/com_google_android_libraries_identity_googleid_googleid/LICENSE
  * third_party/expat/src/expat/COPYING
  * third_party/libjpeg_turbo/LICENSE

Test-built:
-----------

* chromium-ozone-wayland
  * MACHINE=qemux86-64, qemuarm, qemuarm64

* chromium-x11
  * MACHINE=qemux86-64, qemuarm, qemuarm64

Test dependencies:
------------------

* URI: git://git.yoctoproject.org/poky
  - branch: scarthgap
  - revision: ac257900c33754957b2696529682029d997a8f28

* URI: git://git.openembedded.org/meta-openembedded
  - layers: meta-oe
  - branch: scarthgap
  - revision: 491671faee11ea131feab5a3a451d1a01deb2ab1

* URI: git://github.com/kraj/meta-clang
  - branch: scarthgap-clang20
  - revision: 76596813cd0061bd9818a80926e6900af61fcaa0

* URI: git://git.yoctoproject.org/meta-lts-mixins
  - branch: scarthgap/rust
  - revision: 96deb45139df027473faf0938fe006d33c45c375

Signed-off-by: Caner Altinbasak <cal@brightsign.biz>
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
scarthgap doesn't define UNPACKDIR, use WORKDIR instead.
Chromium138/Electron37 requires Node.js v22.11.0. Add a new recipe
to use updated version.
@adalessandro
Copy link
Contributor

adalessandro commented Oct 24, 2025

@caneraltinbasak please rebase your branch once more :-) as I've rebased https://github.com/adalessandro/meta-browser/tree/for/review/ossystems/scarthgap/138.0.7204.157 to be in sync with the target scarthgap branch. No more conflicts now.

@caneraltinbasak caneraltinbasak force-pushed the for/review/ossystems/scarthgap/138.0.7204.157 branch from e619419 to f12742a Compare October 24, 2025 15:53
@otavio otavio merged commit d4c6ed0 into OSSystems:scarthgap Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants