Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build/test for Linux ARM #2569

Open
amirseyedian opened this issue Oct 23, 2022 · 3 comments
Open

Build/test for Linux ARM #2569

amirseyedian opened this issue Oct 23, 2022 · 3 comments

Comments

@amirseyedian
Copy link

Im using linux on an arm64 system and there is no binary supporting it. I assume I have to build the app from source unfortunately there is no proper guide on the wiki and readme.
there is no makefile either I think I can compile with yarn but running into unrelated issues.
A step by step guide on building from source code would be great.

@philrz
Copy link
Contributor

philrz commented Oct 23, 2022

@amirseyedian: Maybe it didn't stand out well in the top-level README, but as linked from there, the CONTRIBUTING doc has the info on developing/building from source. Knowing you're about to follow that guide, I just revisited the steps on a Linux VM and did find one small mistake in that doc if your goal is to make an installable package, which is that the yarn release shown there is currently wired to compile on macOS, but executing the underlying command yarn electron-builder instead will generate installers for Linux when running on Linux. When I did this just now I was admittedly on x86_64 and not arm64, and I don't think I've heard reports confirming if others have tried building for that platform, so please do report back if you're successful or hit any snags and we can update the docs to reflect anything else learned along the way.

@philrz philrz changed the title how to build from sorce how to build from source Oct 23, 2022
@philrz philrz changed the title how to build from source Build/test for Linux ARM Nov 23, 2022
@philrz
Copy link
Contributor

philrz commented Nov 23, 2022

@amirseyedian: I've not heard back from you after my prior comment, but I noticed I could spin up Linux ARM VMs on AWS, so I took a quick look at if I could build successfully. Unfortunately it did fail for me:

$ yarn release
  • electron-builder  version=22.14.13 os=5.15.0-1023-aws
  • loaded configuration  file=/home/ubuntu/brim/electron-builder.json
  • writing effective config  file=dist/installers/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=keytar@7.7.0, node-pipe@0.1.1 platform=linux arch=arm64
  • install prebuilt binary  name=keytar version=7.7.0 platform=linux arch=arm64 napi=
  • rebuilding native dependency  name=node-pipe version=0.1.1
  • packaging       platform=linux arch=arm64 electron=15.5.3 appOutDir=dist/installers/linux-arm64-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v15.5.3/electron-v15.5.3-linux-arm64.zip size=87 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v15.5.3/electron-v15.5.3-linux-arm64.zip duration=916ms
  • building        target=deb arch=arm64 file=dist/installers/zui_0.30.0_arm64.deb
  • application Linux category is set to default "Utility"  reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86/fpm-1.9.3-2.3.1-linux-x86.7z size=4.6 MB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86/fpm-1.9.3-2.3.1-linux-x86.7z duration=574ms
  ⨯ cannot execute  cause=exit status 1
                    errorOut=/home/ubuntu/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/ubuntu/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: cannot execute binary file: Exec format error
    /home/ubuntu/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/ubuntu/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: Success
    
                    command=/home/ubuntu/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm -s dir --force -t deb -d openssl --deb-recommends libappindicator3-1 --deb-compression xz --architecture arm64 --after-install /tmp/t-phnUa7/0-after-install --after-remove /tmp/t-phnUa7/1-after-remove --description '
     Zed User Interface' --version 0.30.0 --package /home/ubuntu/brim/dist/installers/zui_0.30.0_arm64.deb --name zui --maintainer 'Brim Data <support@brimdata.io>' --url 'https://github.com/brimdata/brim#readme' --vendor 'Brim Data <support@brimdata.io>' --deb-priority optional --license BSD-3-Clause /home/ubuntu/brim/dist/installers/linux-arm64-unpacked/=/opt/Zui /home/ubuntu/brim/dist/installers/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_32.png=/usr/share/icons/hicolor/32x32/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_48x48.png=/usr/share/icons/hicolor/48x48/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_64.png=/usr/share/icons/hicolor/64x64/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_128.png=/usr/share/icons/hicolor/128x128/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_256.png=/usr/share/icons/hicolor/256x256/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/zui.png /home/ubuntu/brim/dist/installers/.icon-set/icon_1024.png=/usr/share/icons/hicolor/1024x1024/apps/zui.png /tmp/t-phnUa7/4-Zui.desktop=/usr/share/applications/zui.desktop
                    workingDir=

We can see it was trying to download and use an x86 package of "fpm". I did some more searches and found jordansissel/fpm#1801 and signalapp/Signal-Desktop#6063 that both seem to show people struggling with the same problem and proposing ways to work around it.

Alas, even if my build had been successful, since we don't have easy access to ARM systems for running CI and builds (actions/runner-images#2536 (comment)) that means we'd not be able to start offering downloadable ARM packages of the app regardless. However, that could certainly change in the future depending on CI availability and/or user demand.

I've changed the title of this issue and will hold it open in hopes other interested users might find it. If anyone does come across this issue and feels they'd benefit from a Linux ARM package of the app, please add a 👍 reaction. Also, if anyone feels game to hack through the build problem described above and add a comment here on what you did, that could surely be helpful to others who want to build the app themselves on a one-off basis in the interim.

@Tigerpanzer02
Copy link

Just to mention... chromebooks with arm would also benefit of building signal finally on the linux substructure of chromeos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants