Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679326 - www-client/chromium-73.0.3683.27 - 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
Summary: www-client/chromium-73.0.3683.27 - ninja: error: '../../third_party/swiftshad...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-03 14:11 UTC by Marcus Comstedt
Modified: 2019-08-16 16:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Workaround to put into /etc/portage/env/www-client/chromium (chromium,152 bytes, text/plain)
2019-03-05 07:02 UTC, Marcus Comstedt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2019-03-03 14:11:04 UTC
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
Comment 1 Marcus Comstedt 2019-03-05 06:59:04 UTC
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.
Comment 2 Marcus Comstedt 2019-03-05 07:02:09 UTC
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...  :-)
Comment 3 Larry the Git Cow gentoo-dev 2019-03-17 02:34:44 UTC
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(+)
Comment 4 Marcus Comstedt 2019-03-18 17:11:17 UTC
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!