Page 1 of 2

Chromium ebuild for arm64?

Posted: Sat Feb 03, 2018 3:33 pm
by Sakaki
Hello,

does anyone have a working ebuild for www-client/chromium (any reasonably modern version) on arm64 they could share? I've had a few requests to add this to the weekly autobuild list for the gentoo-on-rpi3-64bit image, but haven't had much luck getting it to build myself (it is keyworded ~arm64 in the main tree, so maybe I'm missing something obvious).

Re: Chromium ebuild for arm64?

Posted: Sat Feb 03, 2018 10:28 pm
by mDup
Sakaki wrote:Hello,

does anyone have a working ebuild for www-client/chromium (any reasonably modern version) on arm64 they could share? I've had a few requests to add this to the weekly autobuild list for the gentoo-on-rpi3-64bit image, but haven't had much luck getting it to build myself (it is keyworded ~arm64 in the main tree, so maybe I'm missing something obvious).
I could never build www-client/chromium (I emerge natively on kvim2). I'll try again though.

Posted: Wed Feb 07, 2018 10:04 pm
by mDup
My system is such that chromium is to be emerged as follows:

Code: Select all

(desktop) kvim2-gentoo ~ # emerge -pv chromium

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    #] www-client/chromium-65.0.3315.3::gentoo  USE="hangouts (pic) proprietary-codecs pulseaudio suid system-ffmpeg system-icu widevine -component-build -cups -custom-cflags -gnome-keyring -jumbo-build (-kerberos) -neon (-selinux) (-system-libvpx) (-tcmalloc)" L10N="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB
That emerge fails with:

Code: Select all

../../third_party/skia/src/jumper/SkJumper_stages.cpp:670:12: error: ‘vcvt_f32_f16’ was not declared in this scope
     return vcvt_f32_f16(h);
            ^~~~~~~~~~~~
I will try again with -proprietary-codecs use.

Note I had to hack the ebuild as my arm64 system had less than 3GB RAM free.
Also note build may take long (same build on x86_64 with 8GB RAM and 12 3GHz cores took almost a day).

update
Unfortunately -proprietary-codecs USE does not avoid skia error.
Looking at code it seems one may need neon use. Let me try that.
update
Same error with neon USE.

So no go.

Posted: Sun Feb 18, 2018 7:30 am
by fanthom
Not a real solution but i use chromium from Ubuntu:
http://ubuntutym.u-toyama.ac.jp/ubuntu- ... _arm64.deb
http://ubuntutym.u-toyama.ac.jp/ubuntu- ... _arm64.deb

You may consider it as 'chromium-bin' :)

Should work for you unless you need specific USE flag.

Posted: Sun Feb 18, 2018 10:04 am
by geki
There seems to be a hack to disable NEON for skia [topic=1060502]here[/topic]. First hunk should suffice.

Though, looking at ubuntu source package, they build current chromium stable for arm64 with NEON just fine.
They use clang, which may behave, other than gcc? Source package and buildlog txt.gz.

Buildlog takes quite some time to open. You may search for: target_cpu="arm64" to see build flags. debian/known_gn_gen_args-* is not applied.

I just had a look around. I have no arm64 to play with. May it help ...

edit #1
Looking at the ebuild; neon useflag is only for arm architecture - ignored for arm64.

Posted: Thu Feb 22, 2018 6:43 pm
by Sakaki
geki,

thanks, good idea about Ubuntu's build, I'll take a look at their patchset and the rest of their source package now.

Posted: Mon Mar 05, 2018 7:06 pm
by NeddySeagoon
Sakaki,

chromium is keyworded ~arm64 and builds as is.
Its in my ~arm64 binhost

Posted: Tue Mar 06, 2018 2:10 pm
by mDup
NeddySeagoon wrote:Sakaki,

chromium is keyworded ~arm64 and builds as is.
Its in my ~arm64 binhost
I am just curious:
Did you cross build or native build? And how long took the build?
Can you provide output of cross or native 'emerge -pv chromium'?
Then maybe I can adjust use flags to succeed as well.
Have a nice day!

Posted: Tue Mar 06, 2018 2:44 pm
by NeddySeagoon
mDup,

Its a native build but not on my Raspberry Pi3. The update to www-client/chromium-65.0.3325.106 won't build.
It claims it cannot find a file.

Code: Select all

[ebuild   R    ] www-client/chromium-64.0.3282.186::gentoo  USE="cups gnome-keyring hangouts (pic) proprietary-codecs suid system-ffmpeg system-icu -component-build -custom-cflags -jumbo-build (-kerberos) -neon -pulseaudio (-selinux) (-system-libvpx) (-tcmalloc) (-widevine)" L10N="en-GB -am -ar -bg -bn -ca -cs -da -de -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" 0 KiB

Posted: Tue Mar 06, 2018 5:03 pm
by mDup
NeddySeagoon wrote:mDup,

Its a native build but not on my Raspberry Pi3. The update to www-client/chromium-65.0.3325.106 won't build.
It claims it cannot find a file.

Code: Select all

[ebuild   R    ] www-client/chromium-64.0.3282.186::gentoo  USE="cups gnome-keyring hangouts (pic) proprietary-codecs suid system-ffmpeg system-icu -component-build -custom-cflags -jumbo-build (-kerberos) -neon -pulseaudio (-selinux) (-system-libvpx) (-tcmalloc) (-widevine)" L10N="en-GB -am -ar -bg -bn -ca -cs -da -de -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" 0 KiB
OK : I will give 64.0.3282.186 a try build on Khadas VIM2 with adjusted USE (widevine in particular).
I may not do so immediately, basically because of lack of computer time.
Keep you informed

Posted: Fri Mar 09, 2018 6:54 pm
by mDup
NeddySeagoon wrote:mDup,
Its a native build but not on my Raspberry Pi3.[]...
On which platform did you build then? And did it take long?
Today I tried to emerge chromium-66.0.3355.0 but clang cannot find header files such as <functional>
I added -I/usr/lib/gcc/aarch64-unknown-linux-gnu/7.3.0/include/g++-v7/ to CFLAGS and next clang cannot find header files such as <bits/c++config.h>
so I added -I/usr/lib/gcc/aarch64-unknown-linux-gnu/7.3.0/include/g++-v7/aarch64-unknown-linux-gnu/bits to CFLAGS an now I get plenty errors.
There must be something wrong with my clang. Not sure how to check that.

Posted: Fri Mar 09, 2018 7:51 pm
by NeddySeagoon
mDup,

I built it on a 96 core box with 128G RAM.

Code: Select all

# genlop -t chromium
 * www-client/chromium

     Mon Mar  5 11:30:37 2018 >>> www-client/chromium-64.0.3282.186
       merge time: 1 hour, 29 minutes and 29 seconds
That does not include the fetch time.

chromium-66.x fails for me for 'functional' too.

Posted: Fri Mar 09, 2018 8:17 pm
by blopsalot
NeddySeagoon wrote:mDup,

I built it on a 96 core box with 128G RAM.

Code: Select all

# genlop -t chromium
 * www-client/chromium

     Mon Mar  5 11:30:37 2018 >>> www-client/chromium-64.0.3282.186
       merge time: 1 hour, 29 minutes and 29 seconds
That does not include the fetch time.

chromium-66.x fails for me for 'functional' too.
do you have a Qualcomm Centriq? that's awesome.

Posted: Fri Mar 09, 2018 9:08 pm
by NeddySeagoon
blopsalot,

Its a Cavium, Inc. THUNDERX
That's a link to the sponsors site.

Posted: Fri Mar 09, 2018 10:19 pm
by mDup
NeddySeagoon wrote:mDup,
I built it on a 96 core box with 128G RAM.
that's cheating :o
Thanks for info!
Sometimes I wonder what it would give to distcc with, say, 16 8 core kvim2 units on a gigabit switch ...

Posted: Sat Mar 17, 2018 8:07 pm
by Khumarahn
New chromium requires clang for compilation. Does anyone know how to distcc cross compile it?

Posted: Mon Mar 19, 2018 1:45 pm
by Khumarahn
I know how to build chromium for arm64 in a reasonable time on my amd64 desktop! I am quite happy about it.

I compiled chromium-65.0.3325.16 with clang in a little less than 15 hours on my desktop with i7-3770 (running a bit slow because of cooling problems).

Compilation was done in an arm64 qemu chroot with distcc. The distcc server is running on the same machine, in the amd64 host system. Both have the same clang version 5.0.1.

The setup is as follows. In chroot:

Code: Select all

# ls -al /usr/lib64/distcc/bin/                  
total 32
drwxr-xr-x 1 root root 384 Mar 18 13:42 .
drwxr-xr-x 1 root root   6 Nov  3 08:38 ..
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-c++-7.3.0 -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:42 aarch64-linux-gnu-clang -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:42 aarch64-linux-gnu-clang++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-g++-7.3.0 -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-gcc -> /usr/bin/distcc
lrwxrwxrwx 1 root root  15 Mar 18 13:41 aarch64-linux-gnu-gcc-7.3.0 -> /usr/bin/distcc
On the host system:

Code: Select all

# cat /usr/local/bin/aarch64-linux-gnu-clang
#!/bin/sh
CHOST=aarch64-linux-gnu
/usr/lib/llvm/5/bin/clang --target=${CHOST} $@

Code: Select all

# cat /usr/local/bin/aarch64-linux-gnu-clang++ 
#!/bin/sh
CHOST=aarch64-linux-gnu
/usr/lib/llvm/5/bin/clang++ --target=${CHOST} $@
Distcc is used without pump, so the host system only has to compile preprocessed files.

Posted: Wed May 09, 2018 2:10 pm
by Khumarahn
Anybody has any luck with chromium-67.0.3396.30?

For me, the configure stage of the bundled ffmpeg fails. For some reason, it uses gcc but passes clang's --target option:

Code: Select all

Running /var/tmp/portage/www-client/chromium-67.0.3396.30/work/chromium-67.0.3396.30/third_party/ffmpeg/configure
 --disable-everything
 --disable-all
 ...
 --enable-demuxer=aac
 --enable-parser=aac,h264
/usr/bin/aarch64-linux-gnu-gcc is unable to create an executable file.

Code: Select all

BEGIN /var/tmp/portage/www-client/chromium-67.0.3396.30/work/temp/ffconf.FF1YaUYD/test.c
    1   int main(void){ return 0; }
END /var/tmp/portage/www-client/chromium-67.0.3396.30/work/temp/ffconf.FF1YaUYD/test.c
/usr/bin/aarch64-linux-gnu-gcc --sysroot=/var/tmp/portage/www-client/chromium-67.0.3396.30/work/chromium-67.0.3396.30/build/linux/debian_sid_arm64-sysroot -O2 -pipe -march=armv8-a+crypto+crc -mtune=cortex-a53 -I/var/tmp/portage/www-client/chromium-67.0.3396.30/work/chromium-67.0.3396.30/third_party/opus/src/include --target=aarch64-linux-gnu -march=armv8-a -c -o /var/tmp/portage/www-client/chromium-67.0.3396.30/work/temp/ffconf.FF1YaUYD/test.o /var/tmp/portage/www-client/chromium-67.0.3396.30/work/temp/ffconf.FF1YaUYD/test.c
aarch64-linux-gnu-gcc: error: unrecognized command line option '--target=aarch64-linux-gnu'
C compiler test failed.
Edit: system-ffmpeg use flag is masked in ref to https://bugs.gentoo.org/654208

Posted: Wed May 09, 2018 4:54 pm
by NeddySeagoon
Khumarahn,

That's fixed by commit 6c397b9187d660d61dfbfd4fab1fdf60e5227faa for chromium-68.0.3409.2.
Now it fails later in the build but I've not had time to investigate further.

Posted: Wed May 09, 2018 4:55 pm
by Khumarahn
Thanks! It there a corresponding fix for chromium 67? Version 68 is masked, I did not even try it.

Posted: Fri May 11, 2018 8:24 pm
by Khumarahn
I tried to use 6c397b9187d660d61dfbfd4fab1fdf60e5227faa on chromium-67.0.3396.30. Now it fails with

Code: Select all

FAILED: obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o
aarch64-linux-gnu-clang -MMD -MF obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o.d -DHAVE_AV_CONFIG_H -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DOPUS_FIXED_POINT -I../../third_party/ffmpeg/chromium/config/Chrome/linux/arm64 -I../../third_party/ffmpeg -I../.. -Igen -I../../third_party/opus/src/include -DHAVE_VFP_ARGS=1 -fno-strict-aliasing -fmerge-all-constants --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes -std=gnu11 -c ../../third_party/ffmpeg/libavcodec/aarch64/fft_neon.S -o obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o
<instantiation>:15:9: error: unknown directive
        .func fft4_neon
        ^

Posted: Mon Oct 07, 2019 12:51 pm
by nkichukov
Has anyone been able to compile (natively, with a cross-compiler or in a combination of latter two) the latest chromium builds for aarch64:

www-client/chromium-77.0.3865.90
www-client/chromium-78.0.3904.34

My attempts are always failing at link time causing out of memory errors... Anyone else experience this? I have tried various -jN and -lN combinations to no success.

Posted: Mon Oct 07, 2019 1:03 pm
by NeddySeagoon
nkichukov,

www-client/chromium-78.0.3904.34 builds.
Its in my binhost.
I haven't run it yet.

Posted: Tue Oct 08, 2019 2:34 pm
by nkichukov
How much virtual/rss does the linking process require when it is combining it all together? Even the chromium-78 ebuild failed on me, and it seems like it has compiled fine for you...

Posted: Tue Oct 08, 2019 6:25 pm
by NeddySeagoon
nkichukov,

I don't know. I build everything natively using a Cavium Thunder with 96 cores and 128G RAM.
Its not mine, it belongs to Packet.net who have provisioned it for Gentoos use under the Works on ARM project.

I can try to build in on a Raspberry Pi4 with 4G RAM or an Acer R13 also with 4G RAM and see what happens.