Sakaki Guru
Joined: 21 May 2014 Posts: 409
|
Posted: Tue Jan 15, 2019 12:26 am Post subject: Emerging chromium-72.0.3626.28-r1 on arm64 (patch) |
|
|
Hello,
I've been looking at www-client/chromium-72.0.3626.28-r1 on arm64 over the last few days. Had to patch the main tree ebuild and source a little bit to get it to build: here are the details in case it is of use to anyone else.
First, I had to modify the ebuild (bumped it to -r2 in the overlay used by the gentoo-on-rpi3-64bit project), because:
- I experienced multiple build failures under gcc-8.2.0; so set CHROMIUM_FORCE_CLANG=yes;
- however, building under Clang/LLVM, I had to enable an additional keeplib (specifically, third_party/swiftshader/third_party/llvm-7.0);
- more for my use case than of general interest, but I needed to omit the unconditional media-libs/openh264 DEPEND (as that package has RESTRICT="bindist", and I need everything to get pushed up to a binhost); so, added a USE flag to control this;
Here's a diff between the main-tree r1 and the modified r2 ebuild, showing these changes: Code: | --- chromium-72.0.3626.28-r1.ebuild
+++ chromium-72.0.3626.28-r2.ebuild
@@ -17,8 +17,8 @@
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="component-build cups gnome-keyring +hangouts jumbo-build kerberos neon +openh264 pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine"
RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
COMMON_DEPEND="
@@ -42,7 +42,7 @@
media-libs/libjpeg-turbo:=
media-libs/libpng:=
system-libvpx? ( media-libs/libvpx:=[postproc,svc] )
- >=media-libs/openh264-1.6.0:=
+ openh264? ( >=media-libs/openh264-1.6.0:= )
pulseaudio? ( media-sound/pulseaudio:= )
system-ffmpeg? (
>=media-video/ffmpeg-4:=
@@ -109,7 +109,8 @@
virtual/pkgconfig
"
-: ${CHROMIUM_FORCE_CLANG=no}
+# arm64 has several build failures under gcc
+: ${CHROMIUM_FORCE_CLANG=yes}
if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
BDEPEND+=" >=sys-devel/clang-5"
@@ -145,6 +146,7 @@
"${FILESDIR}/chromium-memcpy-r0.patch"
"${FILESDIR}/chromium-math.h-r0.patch"
"${FILESDIR}/chromium-stdint.patch"
+ "${FILESDIR}/chromium-crashpad.patch"
)
pre_build_checks() {
@@ -332,6 +334,7 @@
third_party/SPIRV-Tools
third_party/sqlite
third_party/swiftshader
+ third_party/swiftshader/third_party/llvm-7.0
third_party/swiftshader/third_party/llvm-subzero
third_party/swiftshader/third_party/subzero
third_party/unrar
@@ -451,12 +454,14 @@
libwebp
libxml
libxslt
- openh264
re2
snappy
yasm
zlib
)
+ if use openh264; then
+ gn_system_libraries+=( openh264 )
+ fi
if use system-ffmpeg; then
gn_system_libraries+=( ffmpeg opus )
fi |
(NB the rpi3-overlay repo where this ebuild lives is only for use with the arm64 RPi3; some of the above changes should probably be keyword-specific, were the ebuild to be used more generally)
Second, to allow third-party/crashpad to build, I had to patch one of its files slightly (which was missing a #include); here's the (trivial) chromium-crashpad.patch, to place in the www-client/chromium/files/ directory (as you can see above, its path has been added to PATCHES in the -r2 ebuild):
Code: | --- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
@@ -14,6 +14,7 @@
#include "snapshot/linux/cpu_context_linux.h"
+#include <limits>
#include <stddef.h>
#include <string.h>
|
The resulting binary package is available from the isshoni.org binhost, here. Seems to work OK in basic testing on an RPi3B+.
Users of (a reasonably up-to-date version of) the gentoo-on-rpi3-64bit image may get this simply by issuing: Code: | demouser@pi64 ~ $ sudo emaint sync --repo rpi3
demouser@pi64 ~ $ emerge -avu www-client/chromium |
_________________ Regards,
sakaki |
|