The src_prepare() function in the chromium ebuild "unbundles" (i.e. deletes) a bunch of sources before starting the build. It protects third_party/swiftshader/third_party/llvm-subzero from being deleted, but not third_party/swiftshader/third_party/llvm-7.0. However, on arm64 and mips64el, subzero is not used (see third_party/swiftshader/src/Reactor/BUILD.gn), so llvm-7.0 needs to be protected instead. If llvm-7.0 is deleted, the build fails on arm64 with the following error: ninja -v -j5 -l0 -C out/Release v8_context_snapshot_generator ninja: Entering directory `out/Release' ninja: error: '../../third_party/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/AliasAnalysis.cpp', needed by 'obj/third_party/swiftshader/third_party/llvm-7.0/swiftshader_llvm/AliasAnalysis.o', missing and no known rule to make it
As a workaround, I put this into /etc/portage/env/www-client/chromium : pre_src_prepare() { sed -i -e '32a\ args.append("third_party/swiftshader/third_party/llvm-7.0")' build/linux/unbundle/remove_bundled_libraries.py } Then I was able to build and install chromium-73.0.3683.27 with the following caveats: * I used the clang toolchain; gcc had additional issues * I needed this patch: https://chromium-review.googlesource.com/c/chromium/src/+/1475936 * I also needed this crashpad patch: https://chromium.googlesource.com/crashpad/crashpad/+/152aa8d1f9039b2ac61339bcd8d8f6030ffbcea7%5E%21/#F0 * I had to upgrade the system harfbuzz to 2.3.1, as chromium needed a header file which was not present in 2.0.2-r1.
Created attachment 567828 [details] Workaround to put into /etc/portage/env/www-client/chromium I added the workaround as an attachment to get around unfortunate linebreaking... :-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=688e4bba5756db137e4953004d0d7dcd25bdff24 commit 688e4bba5756db137e4953004d0d7dcd25bdff24 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2019-03-17 02:31:32 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2019-03-17 02:34:28 +0000 www-client/chromium: bump to 73.0.3683.75 Requires GCC 8 or better. Requires harfbuzz 2.2 or better. Keeps third_party/swiftshader/third_party/llvm-7.0 for ARM64 build. Prevents component-build with suid enabled. Closes: https://bugs.gentoo.org/678216 Closes: https://bugs.gentoo.org/678428 Bug: https://bugs.gentoo.org/679326 Closes: https://bugs.gentoo.org/680002 Package-Manager: Portage-2.3.62, Repoman-2.3.12_p83 Signed-off-by: Mike Gilbert <floppym@gentoo.org> www-client/chromium/Manifest | 1 + www-client/chromium/chromium-73.0.3683.75.ebuild | 712 +++++++++++++++++++++++ 2 files changed, 713 insertions(+)
I confirm that 73.0.3683.75 builds without any env hack for me on arm64. (The two patches are still needed, but that's a topic for a different ticket obviously. :-) Thanks!