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

Fails on arm64 linux Ubuntu, e-b tries to use x86 executable #6116

Open
quinton-ashley opened this issue Jul 31, 2021 · 7 comments
Open

Fails on arm64 linux Ubuntu, e-b tries to use x86 executable #6116

quinton-ashley opened this issue Jul 31, 2021 · 7 comments
Labels

Comments

@quinton-ashley
Copy link

electron-builder -l deb
  • electron-builder  version=22.11.7 os=5.4.0-80-generic
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=sharp@0.27.2, usb@1.7.1 platform=linux arch=arm64
  • install prebuilt binary  name=usb version=1.7.1 platform=linux arch=arm64 napi= 
  • install prebuilt binary  name=sharp version=0.27.2 platform=linux arch=arm64 napi= 
  • packaging       platform=linux arch=arm64 electron=13.1.7 appOutDir=dist/linux-arm64-unpacked
  • building        target=deb arch=arm64 file=dist/nostlan_1.21.13_arm64.deb
  • 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=4.322s
  ⨯ cannot execute  cause=exit status 1
                    errorOut=/home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/qashto/.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/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: Success
    
                    command=/home/qashto/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm -s dir --force -t deb -d libgtk-3-0 -d libnotify4 -d libnss3 -d libxss1 -d libxtst6 -d xdg-utils -d libatspi2.0-0 -d libuuid1 -d libappindicator3-1 -d libsecret-1-0 --deb-compression xz --architecture arm64 --after-install /tmp/t-EECOha/0-after-install --after-remove /tmp/t-EECOha/1-after-remove --description '
     Nostlan is a nostlagia launcher for retro and current gen video game emulators!' --version 1.21.13 --package /home/qashto/nostlan/dist/nostlan_1.21.13_arm64.deb --name nostlan --maintainer 'quinton-ashley <qashto@gmail.com>' --url 'https://github.com/quinton-ashley/nostlan#readme' --vendor 'quinton-ashley <qashto@gmail.com>' --deb-priority optional --license MIT /home/qashto/nostlan/dist/linux-arm64-unpacked/=/opt/nostlan /home/qashto/nostlan/build/icon.png=/usr/share/icons/hicolor/0x0/apps/nostlan.png /tmp/t-EECOha/2-nostlan.desktop=/usr/share/applications/nostlan.desktop
                    workingDir=
@stale
Copy link

stale bot commented Oct 2, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Oct 2, 2021
@quinton-ashley
Copy link
Author

still relevant

@stale stale bot removed the backlog label Oct 2, 2021
@3nprob
Copy link

3nprob commented Dec 23, 2021

Same here. arm64, debian bullseye

$ electron-builder --arm64
  • electron-builder  version=22.14.5 os=5.10.69-rockchip64
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=arm64 electron=13.5.2 appOutDir=dist/linux-arm64-unpacked
  • building        target=deb arch=arm64 file=dist/element-desktop_1.9.8_arm64.deb
  ⨯ cannot execute  cause=exit status 1
                    errorOut=/home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/user/.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/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: Success
    
                    command=/home/user/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm [...]

@3nprob
Copy link

3nprob commented Dec 23, 2021

Until this is fixed, one can supply their own version of fpm as a workaround:

$ gem install fpm
$ USE_SYSTEM_FPM=true electron-builder --arm64 [...]

@alariej
Copy link

alariej commented Apr 7, 2022

Ran into the same issue, trying to build an arm64 .deb on a Raspberry Pi. The above solution from @3nprob works, but only when Ruby is installed from the Ubuntu repo, not as a snap. So my steps were:

  • sudo apt-get install ruby-dev build-essential
  • sudo gem install fpm
  • export USE_SYSTEM_FPM=true (must be done before each build)
  • npm run <build script: electron-builder --linux deb --config [...]>

@mkurz
Copy link

mkurz commented Nov 8, 2022

If someone wants to make fpm in electron-builder work for arm64/aarch64 I wrote a guide how to do so here: signalapp/Signal-Desktop#6063 (comment)
Feel free to pick up that work, I don't have time to do so.

@learncodingforweb
Copy link

Getting same issue, while building on raspberry pi 4

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

No branches or pull requests

5 participants