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

linker error during build on macos #19

Closed
davidbrai opened this issue Apr 7, 2022 · 1 comment
Closed

linker error during build on macos #19

davidbrai opened this issue Apr 7, 2022 · 1 comment

Comments

@davidbrai
Copy link

Hi,

I ran cargo build on my macos and got the following error:

➜  cow-dex-solver git:(main) cargo build
   Compiling ethcontract-derive v0.15.3
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/Users/...
...
  = note: ld: reference to symbol (which has not been assigned an address) __ZN4curl4init9INIT_CTOR17h32bbb45c3dd2c85aE in '__ZN4curl4init17h65fffcaa4ea77c83E' from /Users/david/projects/crypto/cow-dex-solver/target/debug/deps/libcurl-4fcdd02a82e2cd5f.rlib(curl-4fcdd02a82e2cd5f.curl.779571c0-cgu.15.rcgu.o) for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `ethcontract-derive` due to previous error

Any ideas what's the issue / how to fix?

@davidbrai
Copy link
Author

ok, I found a workaround.
in case someone else encounters this:

this will work:

export MACOSX_DEPLOYMENT_TARGET=10.7
cargo clean
cargo build/run/etc

thanks to:
alexcrichton/curl-rust#417
rust-lang/rust#90342

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

1 participant