brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.51k stars 2.26k forks source link

Support for ARM64 on Linux? #11836

Closed AtjonTV closed 1 year ago

AtjonTV commented 3 years ago

Description

I recently bought a PineBook Pro from Pine64 and I obviously want to use Brave just like on my Intel powered Laptop that runs Gentoo Linux.

Though sadly Brave only seems to support ARM-HF powered Android devices. PineBooks run on Linux though, also they use a ARM64 processor.

As PineBooks have a ARM64 (64 bit) processor, I cant really run/use armhf (32 bit) builds as one would on a Raspi.

I tried to run armhf applications before, but after 6 hours of trying without success I gave up.

For what I know, Chromium has ARM64 support. I have Chromium running on here.

As the ARM processor in PineBooks is not ment for heavy load I will not attempt to compile Brave myself on here.

DoDoENT commented 2 years ago

On the other hand, if you are referring to android APKs, they also won't work on your generic Linux distribution.

The reason is that, although Android uses the same Linux kernel as most of the distributions, everything else is different, including the C library. Most Linux distributions use glibc, Alpine Linux uses muslc, and Android uses bionic. For Brave to work, you will need a compatible C library on your Linux distribution.

Furthermore, simply extracting the Android APK won't work for other reasons as well - the Android version of the browser uses some of the Android-specific APIs that are not available in generic Linux distributions (i.e. for accessing the camera, microphone, webGL/webGPU acceleration, etc.).

ylluminate commented 2 years ago

ARM64 support for Ubuntu 22.04 would sure be nice.

balupton commented 2 years ago

If you are new to github, showing your support or expressing your support is done via 👍 on the original post (red arrows in screenshot) and hitting subscribe in the sidebar (orange arrows in screenshot). New comments send subscription alerts to many people, wasting their time if nothing new was contributed to the discussion.

CleanShot 2022-05-13 at 18 57 48

freebrowser1 commented 2 years ago

Weird. Why does an ARM64 version exist for macOS while not for Linux ARM64 ?

file /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser 
/Applications/Brave Browser.app/Contents/MacOS/Brave Browser: Mach-O 64-bit executable arm64

Compiling the source code is the same on an arm64 environment as x86-64 ? Other browsers (firefox, Chromium, etc.) are available on Arm Linux since over a year.

And about widewine: when this is not supported on arm64, then the macOS version won't work neither. And Brave without widewine, is that such a big deal ?

Now I can run it under Ubuntu 22.04 x64 on my Mac M1 using UTM emulation. Not ideal, but it works.

lquessenberry commented 2 years ago

Willing to test

calinb7 commented 2 years ago

+1 for Pinebook Pro / Pinephone!

sangwoo108 commented 2 years ago

I think Brave for Linux arm64 can be built by cross-compiling(https://chromium.googlesource.com/chromium/src/+/main/docs/linux/chromium_arm.md#Recipe2_Explicit-Cross-compiling) but tried building Brave on Linux ARM64 with Parallels. But this didn't work. There were several things to solve in our building pipeline, which also includes upstream's issue. Here're what I ran into:

DoDoENT commented 2 years ago
  • clang seems not to work on aarch64 here I failed :(

That's weird. We've been using clang on aarch64 Linux for quite some time and even build production binaries with it that get deployed to AWS Graviton instances.

Maybe it's broken in your Linux distribution. We use our own docker image where we've built clang and the entire LLVM from source. You can give it a try and see if it helps...

sangwoo108 commented 2 years ago

That's weird. We've been using clang on aarch64 Linux for quite some time and even build production binaries with it that get deployed to AWS Graviton instances.

Yeah, I mean, Chromium has its own clang binary and the binary didn't work on aarch64. Like you said, I guess we need clang binary built for aarch64(just like I replaced ninja built for my own), but I didn't go further.

leifliddy commented 2 years ago

I'm trying to compile brave on an M1 macbook and am running into that native client error

AssertionError: Unrecognized arch machine: aarch64

@sangwoo108 Where did you comment out the nacl hook? I'm just not familiar enough with the build process yet...

robd003 commented 2 years ago

Are there any community builds of Brave for arm64 on Linux?

I'm fine with living without BAT rewards if it's a community build, I just really want the superior ad blocking.

mihaiplesa commented 1 year ago

Related https://github.com/brave/brave-browser/issues/21363

mihaiplesa commented 1 year ago

We're live with the first public arm64 build on Linux at https://github.com/brave/brave-browser/releases/tag/v1.46.56

stephendonner commented 1 year ago

@mihaiplesa @mherrmann mind putting up a testplan here?

stephendonner commented 1 year ago

@mihaiplesa @mherrmann mind putting up a testplan here?

I've gotten 1.46.56 up and running, easily enough:

Screen Shot 2022-10-27 at 11 01 34 PM

We'll have a beta build with these (uplifted?) changes, to test IPFS and Tor, soon?

mherrmann commented 1 year ago

I don't have much specific guidance to offer with regards to a test plan. All features of the browser should work. I think @mihaiplesa highlighted Tor, Wallet, Ads as the areas most likely to have breakage. And Widevine is known not to work.

mihaiplesa commented 1 year ago

@stephendonner https://github.com/brave/brave-browser/releases/tag/v1.47.23 is the latest one in which IPFS should also work with the dev updater server. Tor won't work until https://github.com/brave/tor_build_scripts/issues/110 is done. Except Widevine, the rest of the features should be working fine.

leberschnitzel commented 1 year ago

I'm trying to install this version on an Chromebook with the Linux Install (trying the manual for linux on https://brave.com/linux/#debian-ubuntu-mint-2 but get the message "Unable to locate package brave-browser-nightly" I'm most likely doing something wrong?

mihaiplesa commented 1 year ago

@leberschnitzel this is not launched in our Linux repos yet. The only way to get it is via GitHub releases.

leberschnitzel commented 1 year ago

@leberschnitzel this is not launched in our Linux repos yet. The only way to get it is via GitHub releases.

duh, I could have thought of that. Using the GitHub release worked nicely and finally I have the desktop experience on my chromebook :)

c3m0 commented 1 year ago

I like the fact that this seems to be WIP (Work in progress); the community is very strong it seems.

stephendonner commented 1 year ago

@brave/qa-team: marking as QA/No for the 1.46.x release, as we'll have baked-in regression tests in both the manual pass for x86 Linux, as well as individual issue verification.

We'll revisit the fuller testing in each of the 1.47.x+ milestone(s) issues, and get a QA/Yes issue going for when we're ready to fully turn on arm64 Linux on beta/release channels 👍

martinbutt commented 1 year ago

When trying to install this on a Debian 9 (stretch) system, I get the message:

brave-browser-nightly depends on libc6 (>= 2.29); however:
Version of libc6:arm64 on system is 2.24-11+deb9u4.

This highest version of libc6 for Debian 9 is 2.24.

The Brave System Requirements say Debian 9+ is supported.

mherrmann commented 1 year ago

@martinbutt please see https://github.com/brave/brave-browser/issues/26189.

lacostenycoder commented 1 year ago

Has anyone figured out how to get this running on a Mac M1 running Ubuntu 22.04 on Parallels?

freebrowser1 commented 1 year ago

Has anyone figured out how to get this running on a Mac M1 running Ubuntu 22.04 on Parallels?

Yes. I tried it successfully on a Macbook Pro M1 running Ubuntu 22.04 in a UTM/QEMU VM (i.e. NOT Parallels).

huyz commented 1 year ago

Has anyone figured out how to get this running on a Mac M1 running Ubuntu 22.04 on Parallels?

Yes, I don't think there's anything special about running inside Parallels on a Mac M1 and it worked for me.

Just download the latest nightly that has a Linux ARM build:

  1. Go to https://github.com/brave/brave-browser/releases
  2. Look for a release that has a lot more assets than usual.
  3. Extract the right one (e.g., https://github.com/brave/brave-browser/releases/download/v1.48.24/brave-browser-nightly-1.48.24-linux-arm64.zip) into /opt/brave-browser-nightly
  4. Symlink the binary brave-browser-nightly into your $PATH (in my case that was /opt/local/bin)

Here's a Gnome brave-browser-nightly.desktop file I conjured up based on the chromium snap one, although it's probably better to customize an official Brave one from a non-ARM installation:

[Desktop Entry]
Name=Brave Browser Nightly
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[ast]=Restolador web
GenericName[bg]=Уеб браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[ca@valencia]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_AU]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[eo]=Retfoliumilo
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[eu]=Web-nabigatzailea
GenericName[fi]=WWW-selain
GenericName[fil]=Web Browser
GenericName[fr]=Navigateur Web
GenericName[gl]=Navegador web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[hy]=Ոստայն զննարկիչ
GenericName[ia]=Navigator del Web
GenericName[id]=Peramban Web
GenericName[it]=Browser web
GenericName[ja]=ウェブ・ブラウザ
GenericName[ka]=ვებ ბრაუზერი
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[kw]=Peurel wias
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[ms]=Pelayar Web
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador web
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sr]=Интернет прегледник
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[te]=మహాతల అన్వేషి
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[ug]=توركۆرگۈ
GenericName[uk]=Навігатор Тенет
GenericName[vi]=Bộ duyệt Web
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[ast]=Accesu a Internet
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটে প্রবেশ করুন
Comment[bs]=Pristup internetu
Comment[ca]=Accediu a Internet
Comment[ca@valencia]=Accediu a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_AU]=Access the Internet
Comment[en_GB]=Access the Internet
Comment[eo]=Akiri interreton
Comment[es]=Acceda a Internet
Comment[et]=Pääs Internetti
Comment[eu]=Sartu Internetera
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gl]=Acceda a Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה לאינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristupite Internetu
Comment[hu]=Az internet elérése
Comment[hy]=Մուտք համացանց
Comment[ia]=Accede a le Interrete
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[ka]=ინტერნეტში შესვლა
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=인터넷에 연결합니다
Comment[kw]=Hedhes an Kesrosweyth
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[ms]=Mengakses Internet
Comment[nb]=Bruk internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesați Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Surfa på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[ug]=ئىنتېرنېت زىيارىتى
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=brave-browser-nightly %U
Terminal=false
Type=Application
Icon=/opt/brave-browser-nightly/product_logo_128_nightly.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/pdf;
StartupNotify=true
StartupWMClass=brave-browser-nightly
Actions=NewWindow;Incognito;TempProfile;

[Desktop Action NewWindow]
Name=Open a New Window
Name[ast]=Abrir una Ventana Nueva
Name[bg]=Отваряне на Нов прозорец
Name[bn]=একটি নতুন উইন্ডো খুলুন
Name[bs]=Otvori novi prozor
Name[ca]=Obre una finestra nova
Name[ca@valencia]=Obri una finestra nova
Name[da]=Åbn et nyt vindue
Name[de]=Ein neues Fenster öffnen
Name[en_AU]=Open a New Window
Name[eo]=Malfermi novan fenestron
Name[es]=Abrir una ventana nueva
Name[et]=Ava uus aken
Name[eu]=Ireki leiho berria
Name[fi]=Avaa uusi ikkuna
Name[fr]=Ouvrir une nouvelle fenêtre
Name[gl]=Abrir unha nova xanela
Name[he]=פתיחת חלון חדש
Name[hy]=Բացել նոր պատուհան
Name[ia]=Aperi un nove fenestra
Name[it]=Apri una nuova finestra
Name[ja]=新しいウィンドウを開く
Name[ka]=ახალი ფანჯრის გახსნა
Name[kw]=Egery fenester noweth
Name[ms]=Buka Tetingkap Baru
Name[nb]=Åpne et nytt vindu
Name[nl]=Nieuw venster openen
Name[pt_BR]=Abre uma nova janela
Name[ro]=Deschide o fereastră nouă
Name[ru]=Открыть новое окно
Name[sl]=Odpri novo okno
Name[sv]=Öppna ett nytt fönster
Name[ug]=يېڭى كۆزنەك ئاچ
Name[uk]=Відкрити нове вікно
Name[vi]=Mở cửa sổ mới
Name[zh_CN]=打开新窗口
Name[zh_TW]=開啟新視窗
Exec=brave-browser-nightly %u

[Desktop Action Incognito]
Name=Open a New Window in incognito mode
Name[ast]=Abrir una ventana nueva en mou incógnitu
Name[bg]=Отваряне на нов прозорец в режим \"инкогнито\"
Name[bn]=একটি নতুন উইন্ডো খুলুন ইনকোগনিটো অবস্থায়
Name[bs]=Otvori novi prozor u privatnom modu
Name[ca]=Obre una finestra nova en mode d'incògnit
Name[ca@valencia]=Obri una finestra nova en mode d'incògnit
Name[de]=Ein neues Fenster im Inkognito-Modus öffnen
Name[en_AU]=Open a New Window in incognito mode
Name[eo]=Malfermi novan fenestron nekoniĝeble
Name[es]=Abrir una ventana nueva en modo incógnito
Name[et]=Ava uus aken tundmatus olekus
Name[eu]=Ireki leiho berria isileko moduan
Name[fi]=Avaa uusi ikkuna incognito-tilassa
Name[fr]=Ouvrir une nouvelle fenêtre en mode navigation privée
Name[gl]=Abrir unha nova xanela en modo de incógnito
Name[he]=פתיחת חלון חדש במצב גלישה בסתר
Name[hy]=Բացել նոր պատուհան ծպտյալ աշխատակերպում
Name[ia]=Aperi un nove fenestra in modo incognite
Name[it]=Apri una nuova finestra in modalità incognito
Name[ja]=新しいシークレット ウィンドウを開く
Name[ka]=ახალი ფანჯრის ინკოგნიტოდ გახსნა
Name[kw]=Egry fenester noweth en modh privedh
Name[ms]=Buka Tetingkap Baru dalam mod menyamar
Name[nl]=Nieuw venster openen in incognito-modus
Name[pt_BR]=Abrir uma nova janela em modo anônimo
Name[ro]=Deschide o fereastră nouă în mod incognito
Name[ru]=Открыть новое окно в режиме инкогнито
Name[sl]=Odpri novo okno v načinu brez beleženja
Name[sv]=Öppna ett nytt inkognitofönster
Name[ug]=يوشۇرۇن ھالەتتە يېڭى كۆزنەك ئاچ
Name[uk]=Відкрити нове вікно у приватному режимі
Name[vi]=Mở cửa sổ mới trong chế độ ẩn danh
Name[zh_CN]=以隐身模式打开新窗口
Name[zh_TW]=以匿名模式開啟新視窗
Exec=brave-browser-nightly --incognito

[Desktop Action TempProfile]
Name=Open a New Window with a temporary profile
Name[ast]=Abrir una ventana nueva con perfil temporal
Name[bg]=Отваряне на Нов прозорец с временен профил
Name[bn]=সাময়িক প্রোফাইল সহ একটি নতুন উইন্ডো খুলুন
Name[bs]=Otvori novi prozor pomoću privremenog profila
Name[ca]=Obre una finestra nova amb un perfil temporal
Name[ca@valencia]=Obri una finestra nova amb un perfil temporal
Name[de]=Ein neues Fenster mit einem temporären Profil öffnen
Name[en_AU]=Open a New Window with a temporary profile
Name[eo]=Malfermi novan fenestron portempe
Name[es]=Abrir una ventana nueva con perfil temporal
Name[et]=Ava uus aken ajutise profiiliga
Name[eu]=Ireki leiho berria behin-behineko profil batekin
Name[fi]=Avaa uusi ikkuna käyttäen väliaikaista profiilia
Name[fr]=Ouvrir une nouvelle fenêtre avec un profil temporaire
Name[gl]=Abrir unha nova xanela con perfil temporal
Name[he]=פתיחת חלון חדש עם פרופיל זמני
Name[hy]=Բացել նոր պատուհան ժամանակավոր հատկագրով
Name[ia]=Aperi un nove fenestra con un profilo provisori
Name[it]=Apri una nuova finestra con un profilo temporaneo
Name[ja]=一時プロファイルで新しいウィンドウを開く
Name[ka]=ახალი ფანჯრის გახსნა დროებით პროფილში
Name[kw]=Egery fenester noweth gen profil dres prys
Name[ms]=Buka Tetingkap Baru dengan profil sementara
Name[nb]=Åpne et nytt vindu med en midlertidig profil
Name[nl]=Nieuw venster openen met een tijdelijk profiel
Name[pt_BR]=Abrir uma nova janela com um perfil temporário
Name[ro]=Deschide o fereastră nouă cu un profil temporar
Name[ru]=Открыть новое окно с временным профилем
Name[sl]=Odpri novo okno z začasnim profilom
Name[sv]=Öppna ett nytt fönster med temporär profil
Name[ug]=ۋاقىتلىق سەپلىمە ھۆججەت بىلەن يېڭى كۆزنەك ئاچ
Name[vi]=Mở cửa sổ mới với hồ sơ tạm
Name[zh_CN]=以临时配置文件打开新窗口
Name[zh_TW]=以暫時性個人身分開啟新視窗
Exec=brave-browser-nightly --temp-profile
mihaiplesa commented 1 year ago

We're out with Linux arm64 on all channels, see https://brave.com/linux

huyz commented 1 year ago

yay, thanks!

marthinus-engelbrecht commented 1 year ago

Doesn't seem to be working for me. Text is missing. Maybe it's just missing fonts or something. image Proton mail website seems better but it's still missing some text. Same for google image image All of these sites are fine in Firefox.

huyz commented 1 year ago

Works fine for me on Ubuntu 22.04.1LTS (aarch64 ARM).

marthinus-engelbrecht commented 1 year ago

Might have to do with the fact that I'm running in UTM on Apple Silicon

huyz commented 1 year ago

I'm actually running in Parallels on Apple Silicon. Btw, Parallels is worth the money IMO. It's got impressive features.

marthinus-engelbrecht commented 1 year ago

Thanks, will give the trail a shot. Do you have an M1 or M2?

huyz commented 1 year ago

I have an M1 Pro Max. But any Mac will do :)

scitesy commented 1 year ago

Doesn't seem to be working for me. Text is missing. Maybe it's just missing fonts or something. image Proton mail website seems better but it's still missing some text. Same for google image image All of these sites are fine in Firefox.

@marthinus-engelbrecht Same experience on a Pinephone64 (aarch64) running Mobian/Debian.

myusuf963 commented 1 year ago

You can install it with the following commands( I am running ubuntu 22.04 jellyfish on UTM, macbookpro M1 "arm64")

sudo apt install apt-transport-https curl curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add - echo "deb [arch=arm64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list sudo apt update sudo apt install brave-browser

pghpete commented 7 months ago

ty @myusuf963 !

Since apt-key is deprecated I used the following instead of your curl line above... wget -qO- https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo tee /etc/apt/trusted.gpg.d/brave-browser.asc