Building process fails with a weird wine error, even though wine is installed.
Log:
• electron-builder version=20.38.4
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
• no native production dependencies
• packaging platform=darwin arch=x64 electron=3.0.13 appOutDir=dist/mac
• map async taskCount=2
• map async taskCount=1
• map async taskCount=327
• unresolved deps nodeModuleDir=/Users/akepinski/DEV/elcalc/node_modules round=0 unresolved=simple-swizzle
• path resolved outputFormat=icns path=/Users/akepinski/DEV/elcalc/build/icon.icns
• skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
1) 020EFAC5B9774E289420890B8DF9705BE7F5A7B2 "com.apple.idms.appleid.prd.6256525a56544a37304a333277682b6f6c76694c48413d3d"
1 identities found
Valid identities only
1) 020EFAC5B9774E289420890B8DF9705BE7F5A7B2 "com.apple.idms.appleid.prd.6256525a56544a37304a333277682b6f6c76694c48413d3d"
1 valid identities found
• building target=macOS zip arch=x64 file=dist/elcalc-5.0.1-mac.zip
• building target=DMG arch=x64 file=dist/elcalc-5.0.1.dmg
• no native production dependencies
• packaging platform=linux arch=x64 electron=3.0.13 appOutDir=dist/linux-unpacked
• map async taskCount=2
• map async taskCount=1
• map async taskCount=70
• unresolved deps nodeModuleDir=/Users/akepinski/DEV/elcalc/node_modules round=0 unresolved=simple-swizzle
• building target=AppImage arch=x64 file=dist/elcalc 5.0.1.AppImage
• no native production dependencies
• packaging platform=win32 arch=x64 electron=3.0.13 appOutDir=dist/win-unpacked
• map async taskCount=2
• map async taskCount=1
• map async taskCount=116
• path doesn't exist path=/Users/akepinski/DEV/elcalc/build/icons
• path doesn't exist path=/Users/akepinski/DEV/elcalc/icons
• path resolved outputFormat=set path=/Users/akepinski/DEV/elcalc/build/icon.png
• map async taskCount=1
• found existing path=/Users/akepinski/Library/Caches/electron-builder/appimage/appimage-9.1.0
• copy files from=/Users/akepinski/Library/Caches/electron-builder/appimage/appimage-9.1.0/lib/x64 isUseHardLinks=true to=/Users/akepinski/DEV/elcalc/dist/__appImage-x64/usr/lib
• copy files from=/Users/akepinski/DEV/elcalc/dist/linux-unpacked isUseHardLinks=true to=/Users/akepinski/DEV/elcalc/dist/__appImage-x64
• found existing path=/Users/akepinski/Library/Caches/electron-builder/appimage/appimage-9.1.0
• execute command args=/Users/akepinski/Library/Caches/electron-builder/appimage/appimage-9.1.0/darwin/mksquashfs /Users/akepinski/DEV/elcalc/dist/__appImage-x64 /Users/akepinski/DEV/elcalc/dist/elcalc 5.0.1.AppImage -offset 100024 -all-root -noappend -no-progress -quiet -no-xattrs -no-fragments path=/Users/akepinski/Library/Caches/electron-builder/appimage/appimage-9.1.0/darwin/mksquashfs
• unresolved deps nodeModuleDir=/Users/akepinski/DEV/elcalc/node_modules round=0 unresolved=simple-swizzle
• path resolved outputFormat=ico path=/Users/akepinski/DEV/elcalc/build/icon.ico
• found existing path=/Users/akepinski/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.4.0
• found existing path=/Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13
• execute command args=/Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine /Users/akepinski/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.4.0/rcedit-ia32.exe /Users/akepinski/DEV/elcalc/dist/win-unpacked/elcalc.exe --set-version-string FileDescription elcalc --set-version-string ProductName elcalc --set-version-string LegalCopyright Copyright © 2018 Antoni Kepinski --set-file-version 5.0.1 --set-product-version 5.0.1.0 --set-version-string InternalName elcalc --set-version-string OriginalFilename --set-version-string CompanyName Antoni Kepinski --set-icon /Users/akepinski/DEV/elcalc/build/icon.ico path=/Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine
⨯ error: exit status 1
path: /Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine
args: /Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine /Users/akepinski/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.4.0/rcedit-ia32.exe /Users/akepinski/DEV/elcalc/dist/win-unpacked/elcalc.exe --set-version-string FileDescription elcalc --set-version-string ProductName elcalc --set-version-string LegalCopyright Copyright © 2018 Antoni Kepinski --set-file-version 5.0.1 --set-product-version 5.0.1.0 --set-version-string InternalName elcalc --set-version-string OriginalFilename --set-version-string CompanyName Antoni Kepinski --set-icon /Users/akepinski/DEV/elcalc/build/icon.ico
output:
error output:wine: failed to initialize: dlopen(/tmp/wine-stage/wine/usr/lib/wine/ntdll.dll.so, 258): image not found
github.com/develar/app-builder/pkg/util.Execute
/Volumes/data/Documents/app-builder/pkg/util/util.go:75
github.com/develar/app-builder/pkg/wine.execWine
/Volumes/data/Documents/app-builder/pkg/wine/wine.go:75
github.com/develar/app-builder/pkg/wine.ConfigureCommand.func2
/Volumes/data/Documents/app-builder/pkg/wine/wine.go:43
github.com/alecthomas/kingpin.(*actionMixin).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
/Volumes/data/go/pkg/mod/github.com/alecthomas/[email protected]+incompatible/app.go:222
main.main
/Volumes/data/Documents/app-builder/main.go:78
runtime.main
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/proc.go:201
runtime.goexit
/usr/local/Cellar/go/1.11.4/libexec/src/runtime/asm_amd64.s:1333
Error: /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/node_modules/app-builder-bin/mac/app-builder exited with code 1
at ChildProcess.childProcess.once.code (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/node_modules/builder-util/src/util.ts:244:14)
at Object.onceWrapper (events.js:273:13)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
From previous event:
at runCallback (timers.js:693:18)
at tryOnImmediate (timers.js:664:5)
at processImmediate (timers.js:646:5)
From previous event:
at WinPackager.signAndEditResources (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/winPackager.ts:260:158)
at _bluebirdLst.default.map.file (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/winPackager.ts:363:21)
at go$readdir$cb (/Users/akepinski/DEV/elcalc/node_modules/graceful-fs/graceful-fs.js:149:14)
at FSReqWrap.oncomplete (fs.js:139:20)
From previous event:
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/winPackager.ts:361:27
at Generator.next (<anonymous>)
From previous event:
at WinPackager.signApp (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/winPackager.ts:355:73)
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/platformPackager.ts:250:16
From previous event:
at WinPackager.doPack (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/platformPackager.ts:113:16
at Generator.next (<anonymous>)
From previous event:
at WinPackager.pack (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/platformPackager.ts:111:95)
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:430:24
at Generator.next (<anonymous>)
at runCallback (timers.js:693:18)
at tryOnImmediate (timers.js:664:5)
at processImmediate (timers.js:646:5)
From previous event:
at Packager.doBuild (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:396:24)
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:366:57
at Generator.next (<anonymous>)
at /Users/akepinski/DEV/elcalc/node_modules/graceful-fs/graceful-fs.js:99:16
at /Users/akepinski/DEV/elcalc/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:139:20)
From previous event:
at Packager._build (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:335:133)
at /Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:331:23
at Generator.next (<anonymous>)
at runCallback (timers.js:693:18)
at tryOnImmediate (timers.js:664:5)
at processImmediate (timers.js:646:5)
From previous event:
at Packager.build (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/packager.ts:288:14)
at build (/Users/akepinski/DEV/elcalc/node_modules/app-builder-lib/src/index.ts:59:28)
at build (/Users/akepinski/DEV/elcalc/node_modules/electron-builder/src/builder.ts:227:10)
at then (/Users/akepinski/DEV/elcalc/node_modules/electron-builder/src/cli/cli.ts:46:19)
• building target=deb arch=x64 file=dist/elcalc_5.0.1_amd64.deb
• found existing path=/Users/akepinski/Library/Caches/electron-builder/linux/linux-tools-mac-10.12.3
• found existing path=/Users/akepinski/Library/Caches/electron-builder/fpm/fpm-1.9.3-20150715-2.2.2-mac
• building embedded block map file=dist/elcalc-5.0.1-mac.zip
error Command failed with exit code 1.
Having the same problem on v20.38.4
error output:wine: failed to initialize: dlopen(/tmp/wine-stage/wine/usr/lib/wine/ntdll.dll.so, 258): image not found
I'm using circleci
macos:
xcode: "9.0"
This was working before updating from v20.31.2
__UPDATE__
Updating the mac container in circle fixes the problem 🎉
macos:
xcode: "10.1.0"
See version info: https://circle-macos-docs.s3.amazonaws.com/image-manifest/build-474/index.html
@xxczaki It doesn't use the installed wine. It downloads its own copy:
• execute command args=/Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine /Users/akepinski/Library/Caches/electron-builder/winCodeSign/winCodeSign-2.4.0/rcedit-ia32.exe /Users/akepinski/DEV/elcalc/dist/win-unpacked/elcalc.exe --set-version-string FileDescription elcalc --set-version-string ProductName elcalc --set-version-string LegalCopyright Copyright © 2018 Antoni Kepinski --set-file-version 5.0.1 --set-product-version 5.0.1.0 --set-version-string InternalName elcalc --set-version-string OriginalFilename --set-version-string CompanyName Antoni Kepinski --set-icon /Users/akepinski/DEV/elcalc/build/icon.ico path=/Users/akepinski/Library/Caches/electron-builder/wine/wine-2.0.3-mac-10.13/bin/wine
facing the same issue while creating the build for windows on macOS.
I have a similar problem when building for windows on linux. And the docker image with wine which is mentioned in the documentation also doesn't work. I get the error wine 1.8+ is required, but your version is :( Wine is of course installed.
Upgrading to Mojave solves the issue in my case
I had a wine error because of running electron-builder with sudo a first time. Removing the dist folder and re-running electron-builder without sudo solved the issue.
I have same issue in [email protected]. Electron-builder downloads wine-2.0.3-mac-10.13 of wine, but my OS is macOS 10.12. And I don't want to upgrade to 10.13
Upgrading to Mojave solves the issue in my case
I upgraded to mojave and installing xcode has solved this problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a workaround for those who aren't ready to upgrade to mojave or above just to fix this issue, but want to make a windows binary from osx. I noted the last two lines of my stack trace when I hit this same issue, note that, unlike above, I get (on electron-builder 21.2.0) a download url logged just before my failed open:
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/wine-2.0.3-mac-10.13/wine-2.0.3-mac-10.13.7z duration=14.572s
⨯ cannot execute cause=exit status 1
errorOut=wine: failed to initialize: dlopen(/tmp/wine-stage/wine/usr/lib/wine/ntdll.dll.so, 258): image not found
Because of the version mismatch, some (unlogged) operation fails to unpack the downloaded wine to that /tmp location, and as you can see, failiure doesn't prevent the script continuing to try and open the unpacked files. So, I went and found the previous packaged wine release at https://github.com/electron-userland/electron-builder-binaries/releases
here it is:
https://github.com/electron-userland/electron-builder-binaries/releases/tag/wine-2.0.1-mac-10.12
so, download the archive: https://github.com/electron-userland/electron-builder-binaries/releases/download/wine-2.0.1-mac-10.12/wine-2.0.1-mac-10.12.7z and unpack it, then
mkdir -p /tmp/wine-stage/wine/usr
and copy in the wine files such that the lookup for ntdll.dll.so is satisfied.
Build again and all is well
A real fix, given the use case, seems to me to be simple and still necessary though: boy are there a lot of reasons to upgrade things very carefully when doing cross-platform bare-metal development!
@tonywoode legend, Thanks man!
I think you missed it's an absolute link: it doesn't matter where you run
it from
On Mon, 21 Sep 2020 at 10:35, RahulGarg notifications@github.com wrote:
@tonywoode https://github.com/tonywoode thank you for your solution. I
am not clear where to run this command: "mkdir -p /tmp/wine-stage/wine/usr"
in the root or inside project folder?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/electron-userland/electron-builder/issues/3562#issuecomment-696005946,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA2K4SWM3SKIALEM4BJECY3SG4M4PANCNFSM4GLMO27A
.
I think you missed it's an absolute link: it doesn't matter where you run it from
…
On Mon, 21 Sep 2020 at 10:35, RahulGarg @.*> wrote: @tonywoode https://github.com/tonywoode thank you for your solution. I am not clear where to run this command: "mkdir -p /tmp/wine-stage/wine/usr" in the root or inside project folder? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#3562 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2K4SWM3SKIALEM4BJECY3SG4M4PANCNFSM4GLMO27A .
Actually I ran this command after downloading:
cp -Ra ~/Downloads/electron-builder-binaries-wine-2.0.1-mac-10.12/. /tmp/wine-stage/wine/usr it copied all the stuff of around 15 Mb download, but after running I am still facing this issue, may you please help me with what I missed?
notice the error I printed above from the installer states:
errorOut=wine: failed to initialize: dlopen(/tmp/wine-stage/wine/usr/lib/wine/ntdll.dll.so, 258): image not found
you have to copy the downloaded files, preserving hierarchy, into the hierarchy such that the lookup for ntdll.dll.so is satisfied ie: copy so that ntdll.dll.so is found at the location the installer it trying to open it from - perhaps you copied the hierarchy into the wrong place in the destination
(also doesn't the -a flag to CP already include -R?)
@tonywoode I created this folder as provided using:
mkdir -p /tmp/wine-stage/wine/usr
and then copy-paste all the files and folders which are extracted from https://github.com/electron-userland/electron-builder-binaries/releases/tag/wine-2.0.1-mac-10.12 in the /tmp/wine-stage/wine/usr by the command mentioned above.
Rest I am unable to find ntdll.dll.so in the extracted folder. Not sure what I am missing.
Most helpful comment
I have same issue in
[email protected]. Electron-builder downloadswine-2.0.3-mac-10.13of wine, but my OS is macOS 10.12. And I don't want to upgrade to 10.13