PINE64
Signal Desktop Builds for Manjaro aarch64 - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Signal Desktop Builds for Manjaro aarch64 (/showthread.php?tid=10415)

Pages: 1 2 3


RE: Signal Desktop Builds for Manjaro aarch64 - ninefathom - 06-28-2020

(06-26-2020, 11:03 AM)llsf Wrote: With regards to the challenges: well, you can just run makepkg with `CARCH=aarch64 makepkg` on x86_64, which gives you an '*-aarch64.pkg.tar.*'-package – but whether that's helpful is probably questionable ^^

That actually might do the trick.  I'll see if I can get this magical "electron-ozone-aarch64" built within a day or two, and share the PKGBUILD if it works.  And the pre-built package, because it takes forever.  It will almost certainly be a fork of electron-ozone from AUR w/ a few additional dependencies and gn build flag changes.

(06-26-2020, 11:03 AM)llsf Wrote: More specifically with regards to electron: do you know why exactly (ie. some issues / known bugs) it's not possible to natively compile electron on aarch64? Considering it's "just a somewhat modified chrome" (yeah, it's probably a bit more complex than that), which can be built natively, maybe it's possible to get this done with less hassle.

Their build infrastructure makes all sorts of assumptions in various places that your current running architecture is x86_64.  For example, it fetches a complete Debian chroot environment during the build process, and it always pulls the x86_64 (and for some reason also i386) versions.  If you're cross-building, then it also pulls an aarch64 chroot.  For another example, it always wants to bring its own copy of Python along to build with... and it always pulls the x86_64 version.  In other words, it seems like in a tonne of places the build tool authors have likely just hard-coded "x86_64" or "i386" instead of detecting architecture.

See: https://github.com/electron/electron/issues/17288


RE: Signal Desktop Builds for Manjaro aarch64 - llsf - 06-28-2020

Potentially good news: I've managed to get a build to run. Which will, of course, take quite some time to complete :D

I've been pretty much just taking some of the modifications I had to do for (ungoogled-)chromium/caidao on aarch64 and applied them to the AUR-electron-ozone-PKGBUILD to work around the more obvious x86_64-assumptions. 

Currently at [4684/31344] and ongoing. I'll report back should it succeed at some point (and put the PKGBUILD in my repo).


RE: Signal Desktop Builds for Manjaro aarch64 - ninefathom - 06-28-2020

(06-28-2020, 08:55 AM)llsf Wrote: Potentially good news: I've managed to get a build to run. Which will, of course, take quite some time to complete Big Grin

I've been pretty much just taking some of the modifications I had to do for (ungoogled-)chromium/caidao on aarch64 and applied them to the AUR-electron-ozone-PKGBUILD to work around the more obvious x86_64-assumptions. 

Currently at [4684/31344] and ongoing. I'll report back should it succeed at some point (and put the PKGBUILD in my repo).

Here are the gn build flags I used (in addition to importing release defaults), which do differ slightly from AUR's electron-ozone:

Code:
    'blink_symbol_level = 0'
    'link_pulseaudio = true'
    'treat_warnings_as_errors = false'
    'use_gnome_keyring = false'
    'use_ozone = true'
    'ozone_auto_platforms = false'
    'ozone_platform_wayland = true'
    'ozone_platform_x11 = true'
    'use_xkbcommon = true'
    'use_system_libwayland = true'
    'use_system_minigbm = true'
    'use_system_libdrm = true'
    'use_glib = true'
    'use_gtk = true'
    'rtc_use_pipewire=true'

The main thing is that you need component ffmpeg.  I learned that through plain ole' trial and error.  The builds will all complete without it, but until I enabled it, signal-desktop just gave a blank blue window when launched (even if I manually dropped ffmpeg.so into the electron app).  You'll also need the necessary cross-compilers, of course.


RE: Signal Desktop Builds for Manjaro aarch64 - llsf - 06-28-2020

Good thing I had already started my build with component ffmpeg enabled then Smile

Build is still compiling, but everything still seems to be okay-ish – so if you want something to play around with in the meantime, I've already put it on https://gitlab.com/ohfp/pinebookpro-things/-/tree/master/electron-ozone ^^


RE: Signal Desktop Builds for Manjaro aarch64 - llsf - 06-28-2020

The build completed successfully with the PKGBUILD at https://gitlab.com/ohfp/pinebookpro-things/-/tree/master/electron-ozone – after "only" ~ 8 hours (using distcc) ^^


RE: Signal Desktop Builds for Manjaro aarch64 - polypode - 06-29-2020

(06-24-2020, 05:36 PM)ninefathom Wrote: Evening, Pine64 community.

I've been doing builds of the Signal Desktop client for Manjaro/aarch64 for myself for a while now.  They've proven stable enough for my daily use that I've decided to start posting them here in case anybody else can benefit from them.

I'll try to keep this post updated within a couple of weeks of new releases.  This is a best-effort project and the packages are distributed as-is, without any warranty, express or implied, including the implied warranties of merchantability and fitness for a particular purpose, etc. etc. etc. ad nauseam.  These are NOT official Signal builds, and I am not in any way affiliated with the Signal project or Open Whisper Systems.  TL;DR use at your own risk.  Distributed under the GPLv3, source code and detailed license are available at https://github.com/signalapp/Signal-Desktop 
downloaded

These are Manjaro/aarch64 packages.  Install with pacman -U directly, or create a local repo for use with pacman -S, whichever suits you.

Current stable versions (Google Drive download links)

Notes
  • Minor modifications to some of the build scripts may be required, and often vary from one version to the next, usually because of the Node community's love of bundling pre-compiled x86-only binaries into their git repos.  I do not under any circumstances alter the source code of Signal Desktop itself, nor of any of its dependencies.  If you're curious about the modified build files for a given version, and/or would like instructions to reproduce these builds yourself, send me a message.
  • The Ozone build provides native Wayland support, no Xwayland required.  Ozone is the name in the Chromium project (and thus in Electron, which Signal Desktop is built on) of a relatively new abstraction layer which modularizes GUI support.  This is highly experimental, requires on my end an Electron build with custom build configuration, and is not in any way supported by upstream Signal Desktop.  I'd very much like feedback on these builds, but do not be surprised if there are major bugs!

Thank you for providing an arm/aarch64 Signal desktop client. I just downloaded the standard version and installed with pacman using the -U option. Installation went fine, but when I open Signal, I see the window with a blue background. How do I link the desktop with my cell phone registration? Desktop clients for other architectures would display a QR code when opening the app after first installation.


RE: Signal Desktop Builds for Manjaro aarch64 - ninefathom - 06-30-2020

(06-29-2020, 08:00 PM)polypode Wrote: Thank you for providing an arm/aarch64 Signal desktop client. I just downloaded the standard version and installed with pacman using the -U option. Installation went fine, but when I open Signal, I see the window with a blue background. How do I link the desktop with my cell phone registration? Desktop clients for other architectures would display a QR code when opening the app after first installation.

That (the QR code) is what you should be seeing as well.  The plain blue background indicates that something went wrong during application startup.  Try launching from a terminal and looking for any obvious error messages.  Most likely it's a missing dependency that I forgot to note in my PKGBUILD (in which case I'll issue an updated package); I've also seen that on ext4 filesystems with certain less-common flags enabled.


RE: Signal Desktop Builds for Manjaro aarch64 - polypode - 06-30-2020

(06-30-2020, 08:46 AM)ninefathom Wrote:
(06-29-2020, 08:00 PM)polypode Wrote: Thank you for providing an arm/aarch64 Signal desktop client. I just downloaded the standard version and installed with pacman using the -U option. Installation went fine, but when I open Signal, I see the window with a blue background. How do I link the desktop with my cell phone registration? Desktop clients for other architectures would display a QR code when opening the app after first installation.

That (the QR code) is what you should be seeing as well.  The plain blue background indicates that something went wrong during application startup.  Try launching from a terminal and looking for any obvious error messages.  Most likely it's a missing dependency that I forgot to note in my PKGBUILD (in which case I'll issue an updated package); I've also seen that on ext4 filesystems with certain less-common flags enabled.

Thank you for you prompt reply. This is the output:

[alex@valerian]$ /opt/Signal/signal-desktop
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /opt/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/alex/.config/Signal
config/get: Successfully read user config file
x-attr dependncy did not load successfully
config/get: Successfully read ephemeral config file
making app single instance
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"app ready","time":"2020-07-01T03:17:03.857Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"starting version 1.34.2","time":"2020-07-01T03:17:03.857Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"updateSchema:\n Current user_version: 20;\n Most recent db schema: 20;\n SQLite version: 3.30.1;\n SQLCipher version: 4.3.0 community;\n (deprecated) schema_version: 109;\n","time":"2020-07-01T03:17:03.909Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"Initializing BrowserWindow config: {\"show\":true,\"width\":811,\"height\":619,\"minWidth\":680,\"minHeight\":550,\"autoHideMenuBar\":false,\"backgroundColor\":\"#3a76f0\",\"webPreferences\":{\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"contextIsolation\":false,\"preload\":\"/opt/Signal/resources/app.asar/preload.js\",\"nativeWindowOpen\":true,\"spellcheck\":true},\"icon\":\"/opt/Signal/resources/app.asar/images/signal-logo-desktop-linux.png\",\"x\":296,\"y\":66}","time":"2020-07-01T03:17:03.947Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"spellcheck: user locale: en-US","time":"2020-07-01T03:17:05.205Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"el\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]","time":"2020-07-01T03:17:05.206Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"spellcheck: setting languages to: [\"en-US\"]","time":"2020-07-01T03:17:05.207Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"Begin ensuring permissions","time":"2020-07-01T03:17:05.299Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"Ensuring file permissions for 2 files","time":"2020-07-01T03:17:05.608Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"Finish ensuring permissions in 319ms","time":"2020-07-01T03:17:05.619Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"Updating BrowserWindow config: {\"maximized\":false,\"autoHideMenuBar\":false,\"fullscreen\":false,\"width\":814,\"height\":621,\"x\":295,\"y\":106}","time":"2020-07-01T03:17:06.057Z","v":0}
{"name":"log","hostname":"valerian","pid":2162,"level":30,"msg":"config/set: Saving ephemeral config to disk","time":"2020-07-01T03:17:06.059Z","v":0}

Any idea ?


RE: Signal Desktop Builds for Manjaro aarch64 - ninefathom - 07-02-2020

(06-30-2020, 09:20 PM)polypode Wrote:
(06-30-2020, 08:46 AM)ninefathom Wrote: That (the QR code) is what you should be seeing as well.  The plain blue background indicates that something went wrong during application startup.  Try launching from a terminal and looking for any obvious error messages.  Most likely it's a missing dependency that I forgot to note in my PKGBUILD (in which case I'll issue an updated package); I've also seen that on ext4 filesystems with certain less-common flags enabled.

Thank you for you prompt reply. This is the output:

[...]

Any idea ?

Unfortunately not.  Everything in that startup output looks happy and normal, and aside from the system hostname and your home directory path, it's virtually identical to what I see for a successful application start on my own system.  I'm not really sure what to suggest at this point.  You might try building on your own system using the PKGBUILD from @llsf over at https://gitlab.com/ohfp/pinebookpro-things/-/tree/master/signal-desktop ?  It takes about an hour, end-to-end, on my PBP, and taxes the memory fairly heavily - but it does build.

There is a very very small chance that it's ext4 filesystem feature flags.  I've noticed before that some ext4 filesystem flags keep Electron apps from starting successfully (even the official builds on x86_64).  The flags that I've seen trouble with are ea_inode and inline_data, neither of which was set on the default Manjaro image for PBP the last time I checked.  You can see what's set on your filesystem by using:
Code:
dumpe2fs -h /dev/your-root-device-and-partition
I highly doubt this is the case here, but it wouldn't hurt to look anyway.


RE: Signal Desktop Builds for Manjaro aarch64 - llsf - 07-08-2020

@ninefathom:

I've just realized I've made a stupid mistake: I had commited the unmodified PKGBUILD for electron-ozone to my repo – which, of course, probably wasn't very helpful.

The one that I successfully built electron-ozone with is now (truly) at https://gitlab.com/ohfp/pinebookpro-things/-/blob/master/electron-ozone/PKGBUILD. Sorry about that!