Skip to content

Instantly share code, notes, and snippets.

@tnzk
Last active May 9, 2021 14:54
Show Gist options
  • Save tnzk/384081b7ea9e7217ab78571cc1023bff to your computer and use it in GitHub Desktop.
Save tnzk/384081b7ea9e7217ab78571cc1023bff to your computer and use it in GitHub Desktop.
$ cargo install pijul --version "~1.0.0-alpha"
Updating crates.io index
Installing pijul v1.0.0-alpha.48
Compiling libc v0.2.94
Compiling cfg-if v1.0.0
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.26
Compiling unicode-xid v0.2.2
Compiling syn v1.0.72
error: linking with `cc` failed: exit code: 1
...
= note: ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@tnzk
Copy link
Author

tnzk commented May 9, 2021

Fixed by following:

  1. $ brew install zstd xxhash
  2. Add rustflags below in ~/.cargo/config:
[target.x86_64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment