Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: lazy symbol binding failed: Symbol not found: _g_once_impl #2337

Closed
ctrlaltdylan opened this issue Aug 26, 2020 · 7 comments
Closed

dyld: lazy symbol binding failed: Symbol not found: _g_once_impl #2337

ctrlaltdylan opened this issue Aug 26, 2020 · 7 comments

Comments

@ctrlaltdylan
Copy link

ctrlaltdylan commented Aug 26, 2020

Output during fatal error during yarn dev:

dyld: lazy symbol binding failed: Symbol not found: _g_once_impl
  Referenced from: /Users/pierce/dev/verdict/node_modules/sharp/build/Release/sharp.node
  Expected in: /Users/pierce/dev/verdict/node_modules/@vouched/client/node_modules/sharp/build/Release/../../vendor/lib/libvips.42.dylib

dyld: Symbol not found: _g_once_impl
  Referenced from: /Users/pierce/dev/verdict/node_modules/sharp/build/Release/sharp.node
  Expected in: /Users/pierce/dev/verdict/node_modules/@vouched/client/node_modules/sharp/build/Release/../../vendor/lib/libvips.42.dylib

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?

Yes, running sharp@0.26.0

What are the steps to reproduce?

Initialize your application.

What is the expected behaviour?

For the application to start with sharp installed.

Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?

No, it's an infrastructure problem not a code problem.

Are you able to provide a sample image that helps explain the problem?

Screen Shot 2020-08-25 at 10 26 26 PM

What is the output of running npx envinfo --binaries --system?

  System:
    OS: macOS 10.15.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 185.94 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.5.0 - ~/.asdf/installs/nodejs/14.5.0/bin/node
    Yarn: 1.22.4 - ~/.asdf/shims/yarn
    npm: 6.14.5 - ~/.asdf/installs/nodejs/14.5.0/bin/npm
@ctrlaltdylan
Copy link
Author

ctrlaltdylan commented Aug 26, 2020

Building the npm packages from source fixed the issue in my case:

npm install --build-from-source

@lovell
Copy link
Owner

lovell commented Aug 26, 2020

Hi, you shouldn't need to compile from source.

The appearance of vendor/lib/libvips.42.dylib in the error message means this error is not from sharp v0.26.0. The latest version includes the libvips version in the path e.g. vendor/lib/8.10.0/libvips.42.dylib. Please make sure there are no old or mismatched versions in lockfiles etc.

@louh
Copy link

louh commented Sep 7, 2020

This is happening to me. Looking in package-lock.json it seems that the @11ty/eleventy-img package is installing sharp@0.25.4 as a subdependency in a nested node_modules directory, although I specify sharp@0.26.0 in my own dependency.

Why would my require('sharp') use the wrong version? How do I fix this?

@lovell
Copy link
Owner

lovell commented Sep 7, 2020

@louh Please submit a PR to https://github.com/11ty/eleventy-img to upgrade sharp. The latest prebuilt binaries are statically linked and avoid many of these problems.

@letsfire
Copy link

dyld: lazy symbol binding failed: Symbol not found: _g_once_impl
Referenced from: /Users/letsfire/ing-sports.com/efoto-app/grapher-pc/node_modules/sharp/build/Release/sharp.node
Expected in: /usr/local/lib/libvips-cpp.42.dylib
dyld: Symbol not found: _g_once_impl
Referenced from: /Users/letsfire/ing-sports.com/efoto-app/grapher-pc/node_modules/sharp/build/Release/sharp.node
Expected in: /usr/local/lib/libvips-cpp.42.dylib

@0123cf

This comment was marked as off-topic.

@KeitelDOG

This comment was marked as off-topic.

@lovell lovell removed the triage label Jan 21, 2023
Repository owner locked and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants