dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin

Viewed 2073

I have some problem with electron builder. I always get this errors in console when I try to build windows nsis or portable version of my app

ExecError: /Users/yx/Library/Caches/electron-builder/nsis/nsis-3.0.4.1/mac/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Error output:

Error output:
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/yx/Library/Caches/electron-builder/nsis/nsis-3.0.4.1/mac/makensis (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/yx/Library/Caches/electron-builder/nsis/nsis-3.0.4.1/mac/makensis (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib


    at ChildProcess.<anonymous> (/Users/yx/Sites/test-app/electron-app/node_modules/vue-cli-plugin-electron-builder/node_modules/builder-util/src/util.ts:243:14)
    at Object.onceWrapper (node:events:483:26)
    at ChildProcess.emit (node:events:376:20)
    at maybeClose (node:internal/child_process:1063:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5) {
  exitCode: null,
  alreadyLogged: false,
  code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}

I'm looking on the github repo but the only usggested solution is to downgrade electron builder. I've checked my package.json file and it seems that the installed version of electron builder is "electron-builder": "^21.2.0" but when the build process start it will print a different version inside the vue ui console

 INFO  Building app with electron-builder:
  • electron-builder  version=22.9.1 os=17.7.0

  • packaging       platform=win32 arch=ia32 electron=11.0.3 appOutDir=build/win-ia32-unpacked

  • 
building        target=portable file=build/test-portable.exe archs=ia32

Is there any fix to this problem?

1 Answers

The issue appears on macOS 10.13 and earlier. I don't know about 10.14, but on 10.15 there's no such an issue.

I fixed that by installing electron-builder 22.10.5 (last version which works on old macOS).

If your actual builder version is not the same as in package.json, try

npm r electron-builder
npm i -D electron-builder@22.10.5
Related