Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

Emerging firefox-60.0.1 on arm64 (patches)

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
Author
Message
Sakaki
Guru
Guru
User avatar
Posts: 409
Joined: Wed May 21, 2014 8:15 pm

Emerging firefox-60.0.1 on arm64 (patches)

  • Quote

Post by Sakaki » Sun Jun 03, 2018 1:29 pm

Hello,

to get the current in-tree firefox-60.0.1 to build on arm64, two additional patches are required. These are both afaik accepted upstream at Mozilla, so the next point release should automatically work, but if you want to get something running now, the following may be of interest.

First, there is an issue where www-client/firefox-60.0.1 tries to build various sse2-optimized sources, which obviously fails on arm64. This is [bug=657146]Gentoo bug #657146[/bug], and Mozilla bug #1434589.
The following is the relevant part of the (much larger) patch submitted on the Mozilla bug report thread (the original patch also adds ppc64 support):

Code: Select all

diff -r 2b504eb4567d -r 2a266219f547 media/webrtc/trunk/moz.build
--- a/media/webrtc/trunk/moz.build	Wed May 23 13:03:58 2018 +1200
+++ b/media/webrtc/trunk/moz.build	Sun May 27 22:21:07 2018 -0700
@@ -143,12 +143,8 @@
 if CONFIG["OS_TARGET"] == "Linux":
 
     DIRS += [
-        "/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn",
-        "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_sse2_gn",
-        "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn",
         "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn",
         "/media/webrtc/trunk/webrtc/modules/desktop_capture/primitives_gn",
-        "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_sse2_gn",
         "/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linux_gn",
         "/media/webrtc/trunk/webrtc/video_engine/video_engine_gn"
     ]
@@ -185,6 +181,24 @@
         "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_neon_gn"
     ]
 
+if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux":
+
+    DIRS += [
+        "/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_sse2_gn"
+    ]
+
+if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "Linux":
+
+    DIRS += [
+        "/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn",
+        "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_sse2_gn"
+    ]
+
 if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Android":
 
     DIRS += [
The second issue is that some skia code fails to build under gcc (6.4.0, at any rate), producing "error: ‘vcvt_f16_f32’ was not declared in this scope". This is Mozilla bug # 1453892, for which the patch is:

Code: Select all

From: Mike Hommey <mh+mozilla@glandium.org>
Date: Sat, 19 May 2018 12:03:56 +0900
Subject: Bug 1462868 - Fix Skia build on arm64 linux with GCC. r?lsalzman

---
 gfx/skia/skia/src/jumper/SkJumper_stages.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gfx/skia/skia/src/jumper/SkJumper_stages.cpp b/gfx/skia/skia/src/jumper/SkJumper_stages.cpp
index 19b6cd694aa6..36792390dece 100644
--- a/gfx/skia/skia/src/jumper/SkJumper_stages.cpp
+++ b/gfx/skia/skia/src/jumper/SkJumper_stages.cpp
@@ -666,7 +666,7 @@ SI F approx_powf(F x, F y) {
 }
 
 SI F from_half(U16 h) {
-#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3)  // Temporary workaround for some Google3 builds.
+#if defined(JUMPER_IS_NEON) && !defined(SK_BUILD_FOR_GOOGLE3)  // Temporary workaround for some Google3 builds.
     return vcvt_f32_f16(h);
 
 #elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
@@ -686,7 +686,7 @@ SI F from_half(U16 h) {
 }
 
 SI U16 to_half(F f) {
-#if defined(__aarch64__) && !defined(SK_BUILD_FOR_GOOGLE3)  // Temporary workaround for some Google3 builds.
+#if defined(JUMPER_IS_NEON) && !defined(SK_BUILD_FOR_GOOGLE3)  // Temporary workaround for some Google3 builds.
     return vcvt_f16_f32(f);
 
 #elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
To apply these, create the directory /etc/portage/patches/www-client/firefox-60.0.1, and then save the first patch above as (e.g.) Bug-1434589-Fix-sse2-dependency-for-linux.patch and the second patch above as (e.g.) Bug-1453892-Fix-Skia-build-on-arm64-linux-with-GCC.patch within that directory (for more details on using /etc/portage/patches, please see these notes).

Then emerge firefox-60.0.1 again, it should build cleanly this time.

If you'd prefer to use a binary package, I have one available for firefox-60.0.1 on arm64 here. I have also pushed a patched www-client/firefox-60.0.1 ebuild to the rpi3-overlay used by the gentoo-on-rpi3-64bit image, so if you are using this image, on your next weekly genup run firefox should upgrade automatically to 60.0.1 (using the binhost binary package).
Regards,

sakaki
Top
Maleita
Apprentice
Apprentice
User avatar
Posts: 246
Joined: Thu Sep 16, 2004 7:05 pm
Location: Brasil -> São Paulo->Campinas

firefox-bin

  • Quote

Post by Maleita » Mon Jun 04, 2018 12:58 am

install firefox-bin
Top
bobbymcgee
n00b
n00b
Posts: 55
Joined: Thu Apr 12, 2018 2:03 pm

Re: firefox-bin

  • Quote

Post by bobbymcgee » Mon Jun 04, 2018 2:41 am

Maleita wrote:install firefox-bin
is that thank you in Portuguese?

Seriously though, thanks for your work Sakaki.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

Re: firefox-bin

  • Quote

Post by Hu » Mon Jun 04, 2018 3:34 am

Maleita wrote:install firefox-bin
Could you explain why you think that is good advice here? This is a thread about ARM, a CPU family that cannot run x86/amd64 code. www-client/firefox-bin is keyworded -* ~amd64 ~x86, because no Gentoo maintainer has provided a prebuilt ARM Firefox. Thus, install firefox-bin is impossible for ARM users.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Jun 04, 2018 3:01 pm

Hu,

firefox-bin pulls the upstream binary build. If it didn't, we could not call it firefox, nor use the firefox logo.
If there is an upstream -bin for arm64, then the firefox-bin ebuild could be expanded to arm64.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Jun 04, 2018 4:34 pm

Sakaki,

Thank you.

I can confirm that both patches are required with gcc-7.3 too.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy