Linux x64 build fails when arm build is performed before
- Electron-Builder Version: 22.8.0
- Node Version: 12
- Electron Version: 10.1.1
- Electron Type (current, beta, nightly): current
- Target: linux snap/deb/zip/AppImage, archs arm64/armv7l/x64, see config below for more details
I'm trying to build for both arm architectures and x64 under Linux. Before, I just had x64 as target which worked fine, however now I've added arm64 and armv7l as targets, and now the x64 target is failing which I don't really understand since that worked fine before.
The build is executed on an Github action runner. The complete output log is here: https://github.com/lukasbach/yana/runs/4722014157?check_suite_focus=true#step:6:351 (marked line is where the error happens) This is how the config file looks like: https://github.com/lukasbach/yana/blob/6955233158610ea75564fd38fe52bc4436cf4d59/electron-builder.json
Relevant snippet from the config:
{
"linux": {
"target": [
{
"target": "snap",
"arch": ["arm64", "armv7l", "x64"]
},
{
"target": "deb",
"arch": ["x64"]
},
{
"target": "zip",
"arch": ["arm64", "armv7l", "x64"]
},
{
"target": "AppImage",
"arch": ["arm64", "armv7l", "x64"]
}
],
"publish": ["github"]
},
}
Relevant outout log part:
$ electron-builder --publish=always
• electron-builder version=22.8.0 os=5.11.0-1022-azure
• loaded configuration file=/home/runner/work/yana/yana/electron-builder.json
• electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies
To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
• rebuilding native dependencies [email protected] platform=linux arch=arm64
• rebuilding native dependency name=sqlite3 version=5.0.0
• packaging platform=linux arch=arm64 electron=10.1.1 appOutDir=out/linux-arm64-unpacked
• downloading url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-arm64.zip size=80 MB parts=4
• downloaded url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-arm64.zip duration=3.637s
• building target=snap arch=arm64 file=out/yana_1.0.15_arm64.snap
• building target=zip arch=arm64 file=out/yana-1.0.15-arm64.zip
• building target=AppImage arch=arm64 file=out/Yana-1.0.15-arm64.AppImage
• rebuilding native dependencies [email protected] platform=linux arch=armv7l
• rebuilding native dependency name=sqlite3 version=5.0.0
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/appimage-12.0.1/appimage-12.0.1.7z size=1.6 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/appimage-12.0.1/appimage-12.0.1.7z duration=553ms
⨯ snapcraft is not installed, please: sudo snap install snapcraft --classic
• publishing publisher=Github (owner: lukasbach, project: yana, version: 1.0.15)
• uploading file=Yana-1.0.15-arm64.AppImage provider=GitHub
• creating GitHub release reason=release doesn't exist tag=v1.0.15 version=1.0.15
• packaging platform=linux arch=armv7l electron=10.1.1 appOutDir=out/linux-armv7l-unpacked
• downloading url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-armv7l.zip size=65 MB parts=4
• downloaded url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-armv7l.zip duration=2.61s
• building target=snap arch=armv7l file=out/yana_1.0.15_armhf.snap
• building target=zip arch=armv7l file=out/yana-1.0.15-armv7l.zip
• building target=AppImage arch=armv7l file=out/Yana-1.0.15-armv7l.AppImage
• rebuilding native dependencies [email protected] platform=linux arch=x64
• rebuilding native dependency name=sqlite3 version=5.0.0
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/snap-template-4.0-1/snap-template-electron-4.0-1-armhf.tar.7z size=1.3 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/snap-template-4.0-1/snap-template-electron-4.0-1-armhf.tar.7z duration=623ms
• packaging platform=linux arch=x64 electron=10.1.1 appOutDir=out/linux-unpacked
• downloading url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-x64.zip size=75 MB parts=4
• downloaded url=https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-x64.zip duration=5.037s
• building target=snap arch=x64 file=out/yana_1.0.15_amd64.snap
• building target=zip arch=x64 file=out/yana-1.0.15.zip
• building target=AppImage arch=x64 file=out/Yana-1.0.15.AppImage
⨯ /home/runner/work/yana/yana/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: /home/runner/work/yana/yana/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/home/runner/work/yana/yana/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:421:26)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/snap-template-4.0-2/snap-template-electron-4.0-2-amd64.tar.7z size=1.5 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/snap-template-4.0-2/snap-template-electron-4.0-2-amd64.tar.7z duration=684ms
• publishing publisher=Github (owner: lukasbach, project: yana, version: 1.0.15)
• uploading file=yana-1.0.15-arm64.zip provider=GitHub
• uploading file=Yana-1.0.15-armv7l.AppImage provider=GitHub
• uploading file=Yana-1.0.15.AppImage provider=GitHub
• uploading file=yana_1.0.15_armhf.snap provider=GitHub
• uploading file=yana_1.0.15_amd64.snap provider=GitHub
• uploading file=yana-1.0.15-armv7l.zip provider=GitHub
• building target=deb arch=x64 file=out/yana_1.0.15_amd64.deb
• uploading file=yana-1.0.15.zip provider=GitHub
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86_64/fpm-1.9.3-2.3.1-linux-x86_64.7z size=5.0 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86_64/fpm-1.9.3-2.3.1-linux-x86_64.7z duration=570ms
⨯ cannot execute cause=exit status 1
out={:timestamp=>"2022-01-06T01:10:43.639534+0000", :message=>"No such file (for after_install): \"/tmp/t-SlsXJ3/0-after-install\"", :level=>:error}
errorOut=/home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/lib/fpm/command.rb:444:in `read': No such file or directory @ rb_sysopen - /tmp/t-SlsXJ3/0-after-install (Errno::ENOENT)
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/lib/fpm/command.rb:444:in `block in execute'
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/lib/fpm/command.rb:448:in `execute'
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/vendor/ruby/2.3.0/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/lib/fpm/command.rb:574:in `run'
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/vendor/ruby/2.3.0/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
from /home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/lib/app/bin/fpm:7:in `<main>'
command=/home/runner/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64/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 amd64 --name yana --after-install /tmp/t-SlsXJ3/0-after-install --after-remove /tmp/t-SlsXJ3/1-after-remove --description '
Yana notebook app' --version 1.0.15 --package /home/runner/work/yana/yana/out/yana_1.0.15_amd64.deb --maintainer 'Lukas Bach <[email protected]>' --url 'https://github.com/lukasbach/yana#readme' --vendor 'Lukas Bach <[email protected]>' --license MIT /home/runner/work/yana/yana/out/linux-unpacked/=/opt/Yana /home/runner/work/yana/yana/out/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_32x32.png=/usr/share/icons/hicolor/32x32/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_48x48.png=/usr/share/icons/hicolor/48x48/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_64x64.png=/usr/share/icons/hicolor/64x64/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_128x128.png=/usr/share/icons/hicolor/128x128/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_256x256.png=/usr/share/icons/hicolor/256x256/apps/yana.png /home/runner/work/yana/yana/out/.icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/yana.png /tmp/t-8LDsu0/2-Yana.desktop=/usr/share/applications/yana.desktop
workingDir=
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Is there an issue with electron builder, since the previously working x64 build now fails if a arm build is performed previously, or has it something to do with my config? Thanks in advance!
For further details, this is the output log and config from before when it only built x64 targets and was still working. Output log: https://github.com/lukasbach/yana/runs/4697222778?check_suite_focus=true#step:6:298 Config: https://github.com/lukasbach/yana/blob/5f9c4390ce68c90aba8e3b99d710cf77f402052d/electron-builder.json
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.
Still relevant to my knowledge
If someone wants to make fpm in electron-builder work for arm64/aarch64 I wrote a guide how to do so here: https://github.com/signalapp/Signal-Desktop/issues/6063#issuecomment-1307001166
Feel free to pick up that work, I don't have time to do so.
Were you able to overcome this @lukasbach? I'm trying to build app for Linux arm64 using the electron.builder Docker image in a GitHub runner and I'm stuck in the same place: snapcraft is not installed, please: sudo snap install snapcraft --classic
@rmartins90 no sorry, after it was not working I didn't investigate this any further.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
adff
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
asdf
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
Covfefe