Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
current (51.0.1) firefox on aarch64 - progress and problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
deagol
n00b
n00b


Joined: 12 Jul 2014
Posts: 62

PostPosted: Sat Mar 11, 2017 11:23 pm    Post subject: current (51.0.1) firefox on aarch64 - progress and problems Reply with quote

I've finally got firefox compiled for aarch64-unknown-linux-gnu and at a first glance it seems to be working. Looks like "-sika" is causing problems for newer ff versions and enabling sika is the more promising option now.
Nevertheless there is still something wrong...

But first a (ugly) hack to disable the remaining neon definitions, allowing us to enable sika. That can be improved, but for now it does its job:
Code:

diff -ur firefox-51.0.1_orig/gfx/skia/skia/include/core/SkPreConfig.h firefox-51.0.1/gfx/skia/skia/include/core/SkPreConfig.h
--- firefox-51.0.1_orig/gfx/skia/skia/include/core/SkPreConfig.h        2016-09-05 22:12:51.000000000 +0200
+++ firefox-51.0.1/gfx/skia/skia/include/core/SkPreConfig.h     2017-03-09 12:14:22.641001257 +0100
@@ -198,7 +198,7 @@
 // All 64-bit ARM chips have NEON.  Many 32-bit ARM chips do too.
 // TODO: Why don't we want NEON on iOS?
 #if !defined(SK_ARM_HAS_NEON) && !defined(SK_BUILD_FOR_IOS) && (defined(__ARM_NEON__) || defined(__ARM_NEON))
-    #define SK_ARM_HAS_NEON
+    //#define SK_ARM_HAS_NEON
 #endif
 
 //////////////////////////////////////////////////////////////////////
diff -ur firefox-51.0.1_orig/gfx/skia/skia/src/core/SkHalf.h firefox-51.0.1/gfx/skia/skia/src/core/SkHalf.h
--- firefox-51.0.1_orig/gfx/skia/skia/src/core/SkHalf.h 2016-09-05 22:12:51.000000000 +0200
+++ firefox-51.0.1/gfx/skia/skia/src/core/SkHalf.h      2017-03-09 12:13:34.500908846 +0100
@@ -37,7 +37,7 @@
 // GCC 4.9 lacks the intrinsics to use ARMv8 f16<->f32 instructions, so we use inline assembly.
 
 static inline Sk4f SkHalfToFloat_01(uint64_t hs) {
-#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64)
+#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) && 0
     float32x4_t fs;
     asm ("fmov  %d[fs], %[hs]        \n"   // vcreate_f16(hs)
          "fcvtl %[fs].4s, %[fs].4h   \n"   // vcvt_f32_f16(...)
@@ -92,7 +92,7 @@
 
 static inline uint64_t SkFloatToHalf_01(const Sk4f& fs) {
     uint64_t r;
-#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64)
+#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) && 0
     float32x4_t vec = fs.fVec;
     asm ("fcvtn %[vec].4h, %[vec].4s  \n"   // vcvt_f16_f32(vec)
          "fmov  %[r], %d[vec]         \n"   // vst1_f16(&r, ...)

The problem is, one of the post-compile tasks hangs forever:

Code:

resource://gre/modules/subprocess/subprocess_worker_common.js
resource://gre/modules/subprocess/subprocess_worker_unix.js
resource://gre/modules/third_party/jsesc/jsesc.js
resource://gre/modules/vtt.jsm
resource://gre/modules/workers/PromiseWorker.js
resource://gre/modules/workers/require.js

After that it stalls forever...
After also disabled lines 153-179 in the file /tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/toolkit/mozapps/installer/packager.py. I can merge the package and load pages in my chroot cross-built system.
Not tested on a real arm system so far, but due to the hang I suspect javascript may still have issues. The good news is, that the resulting firefox package works in in the chroot on my crossdev built system, but I just loaded www.heise.de.

I've not yet found a way to get more information what xpcshell is doing.. has anyone a good idea how to debug that?

If you are interested I can provide a binary package of my firefox package (probably) on Monday.
Back to top
View user's profile Send private message
deagol
n00b
n00b


Joined: 12 Jul 2014
Posts: 62

PostPosted: Sun Mar 12, 2017 10:43 am    Post subject: Reply with quote

If you want to test my current firefox package you can now download it here:
https://awhome.eu/index.php/s/3qGiO9gta75sBdj
The patch to disable the remaining neon dependencies can also be downloaded with with the link above.
If you want other binary packages I can also upload them, but I did not had any problems building them myself. (I have now a complete @system build for "default/linux/arm64/13.0/desktop/systemd", ready to be tested on the real hardware.)

I'm planning to test a build on the real hardware next week too, after all there is a small chance that the problems are caused by qemu...

emerge --info:
Code:
Portage 2.3.4 (python 3.4.6-final-0, default/linux/arm64/13.0/desktop/systemd, gcc-5.4.0, glibc-2.24-r1, 4.10.0-gentoo aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.10.0-gentoo-aarch64-with-gentoo-2.3
KiB Mem:    24573616 total,  14992560 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 12 Mar 2017 00:45:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 aarch64-unknown-linux-gnu [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l9"
PKGDIR="/usr/aarch64-unknown-linux-gnu//packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/usr/aarch64-unknown-linux-gnu//tmp/"
USE="X a52 aac acl acpi alsa arm64 berkdb bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dri dts dvdr egl emboss encode exif fam firefox flac fortran gdbm gif glamor gles1 gles2 gpm gtk iconv ipv6 jpeg lcms libnotify mad mmal mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline seccomp session spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

www-client/firefox-51.0.1::gentoo was built with the following:
USE="bindist dbus gmp-autoupdate jemalloc skia startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite -custom-cflags -custom-optimization -debug -gtk2 (-hardened) -hwaccel -jack -neon (-pgo) (-pulseaudio) (-rust) (-selinux) (-system-cairo) -test -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -pipe"
CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54615
Location: 56N 3W

PostPosted: Sun Mar 12, 2017 1:02 pm    Post subject: Reply with quote

deagol,

I'm posting from a Raspberry Pi 3 in 64 bit mode with firefox 51.0.1 (64-bit).

Its built with cross distcc, gcc-6.3.0, the gold linker and your patch.
Code:
Pi3 64bit ~ # MAKEOPTS="-j4" emerge -uDN1  www-client/firefox

and
Code:
[ebuild   R    ] www-client/firefox-51.0.1::gentoo  USE="bindist dbus hwaccel jemalloc skia startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx


That seems to work. Thank you.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum