electron-builder: qemu signal 11 seg fault error with arm64 mac Just Running `wine` will cause seg fault

  • Electron-Builder Version: 23.0.3
  • Node Version: 18.0.0
  • Electron Version: 4.2.6
  • Electron Type (current, beta, nightly): current?
  • Target: Windows nsis-web
> electron-builder --x64 --win

  • electron-builder  version=23.0.3 os=5.10.104-linuxkit
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=4.2.6 appOutDir=dist/win-unpacked
  • default Electron icon is used  reason=application icon is not set
  ⨯ cannot execute  cause=signal: segmentation fault
                    errorOut=qemu: uncaught target signal 11 (Segmentation fault) - core dumped

                    command=wine /root/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/rcedit-ia32.exe /project/dist/win-unpacked/wrapper-offline-electron.exe --set-version-string FileDescription wrapper-offline-electron --set-version-string ProductName wrapper-offline-electron --set-version-string LegalCopyright 'Copyright © 2022 JackProgramsJP' --set-file-version 0.1.0 --set-product-version 0.1.0.0 --set-version-string InternalName wrapper-offline-electron --set-version-string OriginalFilename '' --set-version-string CompanyName JackProgramsJP
                    workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wrapper-offline-electron@0.1.0 release-win: `electron-builder --x64 --win`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the wrapper-offline-electron@0.1.0 release-win script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jackprograms/.npm/_logs/2022-05-30T19_20_03_513Z-debug.log

I’m getting a QEMU Signal 11 Seg. Fault error.

I’m actually using Docker! The errors for QEMU seg fault online are related to docker-compose, which I don’t know even about.

I changed the platform to linux/amd64, I ran electron-builder as --x64, trying my best to switch to Intel platform, like Rosetta, but NOTHING is working to remove this seg fault error to compile to windows.

#!/bin/bash
# Expected to have MacOS to do this
docker run --rm -ti \
 --platform linux/amd64 \
 --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
 --env ELECTRON_CACHE="/root/.cache/electron" \
 --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
 -v ${PWD}:/project \
 -v ${PWD##*/}-node-modules:/project/node_modules \
 -v ~/.cache/electron:/root/.cache/electron \
 -v ~/.cache/electron-builder:/root/.cache/electron-builder \
 electronuserland/builder:wine \
 /bin/bash -c "npm install && npm run release-win"

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

I also encountered this issue.

Setup: Docker on Apple M1 using electronuserland/builder:wine on a gitlab runner

Apparently there is a bug in the execWine function. I don’t think there should be the argument --ia32 in line 14. The rcedit binary is available in both ia32 and x64 flavour, but not for arm64 or arm.

As far as I know it should be possible to execute the x64 binary on arm64, at least on Docker on Apple ARM, right?

Edit: After some trail and error on a local Ubuntu VM I think that we need a physical amd64 machine, or run it outside of docker.