electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.57k stars 1.73k forks source link

Unable to build app with node_sqlite3 gyp for Windows on Mac #7670

Closed spamshaker closed 1 year ago

spamshaker commented 1 year ago
  System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 508.48 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.6.7 - ~/.nvm/versions/node/v18.16.0/bin/pnpm
  Browsers:
    Chrome: 114.0.5735.198
    Edge: 114.0.1823.82
    Safari: 16.5.2
  npmPackages:
    electron: ^25.3.0 => 25.3.0 
    electron-builder: ^24.4.0 => 24.4.0 
    electron-debug: ^3.2.0 => 3.2.0 
    electron-devtools-installer: ^3.2.0 => 3.2.0 
    electron-store: ^8.1.0 => 8.1.0 
    electron-util: ^0.17.2 => 0.17.2 
    webpack-electron-reload: ^1.0.1 => 1.0.1

Targeting Mac:dmg works fine but for Win x64 I am getting the following error:

ld: warning: object file (Release/nothing.a(nothing.o)) was built for newer macOS version (10.15) than being linked (10.7)
ld: warning: object file (Release/sqlite3.a(sqlite3.o)) was built for newer macOS version (10.15) than being linked (10.7)
ld: in '/opt/homebrew/opt/llvm@13/lib/libunwind.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/node_sqlite3.node] Error 1
Error: `make` failed with exit code: 2
mmaietta commented 1 year ago

Please try electron-builder 24.6.2. There were some changes that fixed prebuilds

zestones commented 1 year ago

Please try electron-builder 24.6.2. There were some changes that fixed prebuilds

I had the same error, and it worked for me ! thx