electron-builder
electron-builder copied to clipboard
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! [email protected] release-win: `electron-builder --x64 --win`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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"
I just realized, this is coming from wine, the error, in docker.
This is definitely coming from wine, what's with the automatic QEMU Seg fault from just running wine??? wine winecfg = segfault, wine hello = seg fault, the only thing not seg fault is calling --version or --help.........
Hmm, what version of wine is it?
Instead of image electronuserland/builder:wine, can you try with electronuserland/builder:14-wine?
Wine 6.0.4 is making that weird QEMU error, I've tried looking online, seems really confusing.
I doubt it has to be due to my "M1" chip, because I've switched the platform to linux/amd64 on Docker
I also tried builder:16-wine, but that resulted in the same error.
Hmm, what version of
wineis it? Instead of imageelectronuserland/builder:wine, can you try withelectronuserland/builder:14-wine?
I tried builder:14-wine too, but the same error displayed.
I see this in the logs
command=wine /root/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/rcedit-ia32.exe
AFAIK, arm64 M1's can't execute ia32 binaries.
How dO I fix that?
I see this in the logs
command=wine /root/.cache/electron-builder/winCodeSign/winCodeSign-2.6.0/rcedit-ia32.exeAFAIK, arm64 M1's can't execute ia32 binaries.
Because wine can't work on the Docker (well at least for me). I'm using Docker, and the wine in the electron-builder from the Docker image doesn't work
i have a same issue.. how to fix this issue? and i have a question, why running .exe file after generated .exe?
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.
This problem has persisted for many years. How can we get around this if we don't have the option of having a physical windows machine?
It is already 2024 and we are faced with the same thing that happened 2 years ago. electronuserland/builder:wine is unable to compile windows app via Docker on Apple Silicon.
@arslc you can bump this issue for more visibility. https://github.com/develar/app-builder/issues/56#issuecomment-1935083672
There's nothing I can do from the electron-builder side without requesting ownership/management of the app-builder repo. Best way to contribute on that project is to open a PR as it doesn't seem like the repo owner actively manages it
@mmaietta does the availability of rcedit-x64.exe here help in any way? https://github.com/electron/rcedit/releases
I also noticed that the app-builder library does invoke rcedit-x64 in certain cases:
- https://github.com/develar/app-builder/blob/be4e7ec9c438e7f803c120a66148950ba294dae5/pkg/rcedit/rcedit.go#L36-L41
- https://github.com/develar/app-builder/blob/master/pkg/rcedit/rcedit.go#L61