JoshuaWise / integer

Native 64-bit integers with overflow protection.
MIT License
19 stars 9 forks source link

dyld: lazy symbol binding failed: Symbol not found #12

Closed barbalex closed 5 years ago

barbalex commented 5 years ago

After updating dependencies in my electron app I get this error when running yarn dev:

dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
  Referenced from: /Users/alexandergabriel/awel-personal/app/node_modules/integer/build/Release/integer.node
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
  Referenced from: /Users/alexandergabriel/awel-personal/app/node_modules/integer/build/Release/integer.node
  Expected in: flat namespace

Seems that integer is a dependency of better-sqlite3, this extract from the yarn.lock file:

better-sqlite3@5.3.0:
  version "5.3.0"
  resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-5.3.0.tgz#64b5614582886eb5e6c2becfec03d9949f1e101a"
  integrity sha512-IZWjZsbS00Ys3DHeaB6WzJcJsC4SFiNP5p6doLhYfmZqGOEL84j/O2N/GjvsEmLJzTlYlBu7iVsv2CMbUPPfvg==
  dependencies:
    integer "^2.1.0"
    tar "^4.4.6"

So maybe this happens because I updated better-sqlite3 from v5.2.1 to v5.3.0

barbalex commented 5 years ago

Nope: downgraded to better-sqlite3 v5.2.1 and still get above error

barbalex commented 5 years ago

I rolled everything back but still get this error. Seems that this project can not be built any more :-(

barbalex commented 5 years ago

I tried using different node versions (10.15.0, 11.6.0) but to no avail

barbalex commented 5 years ago

I work on a MacOS notebook and a windows PC. On Windows this does not happen :-)

JoshuaWise commented 5 years ago

@barbalex Have you tried using electron-rebuild?

barbalex commented 5 years ago

I haven't needed it. electron-builder does it's job of rebuilding native depencencies like integer in my case.

I tried to use it according to it's readme but got an error (fatal error: 'openssl/opensslv.h' file not found). See https://github.com/electron/electron-rebuild/issues/216#issuecomment-455588840

JoshuaWise commented 5 years ago

@barbalex In the past, issues like this have been resolved by using rm -rf on all installed packages and build artifacts, and starting from scratch with npm install. Though, I can't say for sure what caused the issue in your case.

barbalex commented 5 years ago

About 4 hours of debugging later I have now progressed via a slew of problems installing MacPorts to get electron-rebuild find openssl to a different error that may be caused by using specific node versions or maybe different node versions in electron and on my mac.

Any way: this is not integer's fault. So closing.