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

Symbol not found: ____chkstk_darwin error on MacOS using node 14.5.0 #1626

Open
catdad opened this issue Jul 21, 2020 · 5 comments
Open

Symbol not found: ____chkstk_darwin error on MacOS using node 14.5.0 #1626

catdad opened this issue Jul 21, 2020 · 5 comments

Comments

@catdad
Copy link

catdad commented Jul 21, 2020

When running CI jobs in Travis-CI, I get the following error using the module on a Mac agent:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/travis/build/catdad-experiments/svg-render/node_modules/canvas/build/Release/libgobject-2.0.0.dylib (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/travis/build/catdad-experiments/svg-render/node_modules/canvas/build/Release/libgobject-2.0.0.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

The error mentions that the library was built for MacOS 10.15, and I can see that Travis is using 10.13.6. I am not entirely sure of what the support policy for OS versions is. I expect popular CIs to work, so I figured I would ask. Using node 13 and below on the same agents, everything works as expected.

Here is an example build it it helps: https://travis-ci.com/github/catdad-experiments/svg-render/builds/176585143

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas): 2.6.1
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8): MacOS 10.13.6
@yunfanye
Copy link

yunfanye commented Dec 9, 2020

I met the same issue and it is because the library is prebuilt on the latest MacOS 10.15 causing it to be incompatible with 10.13.6. The correct fix would be to create a parallel pipeline for other versions of Mac.

However, given that no other comment in this thread for 5 months, I am assuming only a fairly small number of people met this issue. So I would recommend working around by building from source: specifically,

npm install canvas --build-from-source

Hope this helps!

@remzzer
Copy link

remzzer commented Sep 17, 2021

I have the same issue so I tried to npm install canvas --build-from-source. As my OS is High Sierra 10.13.6 I have first run:

brew install pkg-config cairo pango libpng jpeg giflib librsvg

These packages seem well installed:

  • pkg-config 0.29.2_3
  • cairo 1.16.0_5
  • pango 1.48.10
  • libpng 1.6.37
  • jpeg 9d
  • giflib 5.2.1

Then when the dependencies for rust are installing this error pop:

Last 15 lines from /Users/macbook/Library/Logs/Homebrew/rust/02.make:
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
13 errors generated.
[7/2756] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o
ninja: build stopped: subcommand failed.
thread 'main' panicked at '
command did not execute successfully, got: exit status: 1
build script failed, must exit now', /Users/macbook/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
finished in 91.317 seconds
Build completed unsuccessfully in 0:08:35
make: *** [all] Error 1

If someone find a way to work around it. That will be great !

@LanFly
Copy link

LanFly commented Sep 19, 2021

I have the same issue, but i have solved it.
Just reinstall canvas with version 2.6.1.

npm i canvas@2.6.1

My Environment

  • MacOSX 10.13.5
  • node 8.10.0

@remzzer
Copy link

remzzer commented Sep 20, 2021

@LanFly
Ok now it's working after reinstalling canvas with version 2.6.1 and node 8.10.0.
I needed to downgrade both node and canvas version though!

My Environment

MacOSX 10.13.5
node 8.10.0

@XYShaoKang
Copy link

@remzzer I encountered the same problem, I solved the problem through the following steps, hope to help you

  1. Use rustup to install Rust,Installing Rust

  2. Run brew edit librsvg to edit formulae of librsvg

Comment out the dependency on rust

# depends_on "rust" => :build
# depends_on "cairo"

Add environment variables after def install

The default path installed with rustup is $HOME/.cargo,replace xxx with the corresponding user name.

If you use a custom path to install, replace /User/xxx/.cargo with the corresponding path

ENV["PATH"] = "/User/xxx/.cargo/bin:#{ENV["PATH"]}"
ENV["CARGO"] = "/User/xxx/.cargo/bin/cargo"
ENV["RUSTUP_TOOLCHAIN"] = "stable"

RUSTUP_TOOLCHAIN This environment variable is used to solve error: no override and no default toolchain set

librsvg-install-script

  1. Run brew install librsvg, if all goes well, librsvg will be successfully installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants