-
Notifications
You must be signed in to change notification settings - Fork 250
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
error : note: ld: library not found for -lncursesw #89
Comments
Is there a ncursesw package in homebrew? |
Maybe related: Looks like supporting macos might be a bit more complicated : / |
I tried a target-specific |
You can specify the dependency in [dependencies.cursive]
git = "https://github.com/gyscos/Cursive"
branch = "macos" |
Hi there. I've had the same issue with ncursesw lib, and macos branch didn't solve the problem, unfortunately. |
Looks like the reason the macos branch still fails is rust-lang/cargo#1197 |
This actually worked for me. I was having the WORST time trying to fix this. But this compiled and so far seems to work. |
Some newer versions of cargo may have a better dependency resolving system? @mmiecz , could you try upgrading cargo and see if it changes anything? |
Hi, I've updated cargo, and everything seems to be working fine now. Thanks! |
Actually, I've run into some really weird problem. Whenever I try to compile example code without any changes, Cursive gets recompiled every time. Sometimes it gets recompiled without any error, and sometimes old error comes back: MacBook-Air-Micha:terminal-tests mhl$ cargo run
Compiling cursive v0.3.5 (https://github.com/gyscos/Cursive?branch=macos#451d0522)
Compiling terminal-tests v0.1.0 (file:///Users/mhl/Sources/terminal-tests)
Finished debug [unoptimized + debuginfo] target(s) in 5.45 secs
Running `target/debug/terminal-tests`
MacBook-Air-Micha:terminal-tests mhl$ cargo run
Compiling cursive v0.3.5 (https://github.com/gyscos/Cursive?branch=macos#451d0522)
Compiling terminal-tests v0.1.0 (file:///Users/mhl/Sources/terminal-tests)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/terminal_tests-d163a702128509ba.0.o" "-o" "/Users/mhl/Sources/terminal-tests/target/debug/deps/terminal_tests-d163a702128509ba" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/mhl/Sources/terminal-tests/target/debug/deps" "-L" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libcursive-589ffaec46642e7b.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libunicode_segmentation-1400e9f38485b222.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libncurses-64b8ed169553261c.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libtoml-5130c1b472bb88f9.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libunicode_width-a8b627b65c290dac.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/liblibc-73c6422e7b19c2f3.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/librustc_serialize-03b62901d97343ea.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libodds-798c90752ba21e6f.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-713ad88203512705.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8db31eff4f3f5d1c.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-9d903f075d9d1ed3.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librand-15da1025aec585ac.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcollections-eba7f19f0aae5f37.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-0fa051c7d0594505.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-9dddbb08233542f3.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-72ccf8e77ba91924.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-d3fcdc16d2a25b3a.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-407db9a296a50c43.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-dfc954c33c85abed.rlib" "-l" "ncursesw" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m"
= note: ld: library not found for -lncursesw
clang: error: linker command failed with exit code 1 (use -v to see invocation) This looks like cargo error. |
That's weird indeed. Maybe the cargo cache got messed up with an upgrade? |
I've done MacBook-Air-Micha:terminal-tests mhl$ cargo clean
MacBook-Air-Micha:terminal-tests mhl$ cargo build
Compiling rustc-serialize v0.3.22
Compiling odds v0.2.25
Compiling unicode-segmentation v0.1.3
Compiling cursive v0.3.5 (https://github.com/gyscos/Cursive?branch=macos#451d0522)
Compiling unicode-width v0.1.3
Compiling libc v0.2.18
Compiling ncurses v5.84.0
Compiling toml v0.2.1
Compiling terminal-tests v0.1.0 (file:///Users/mhl/Sources/terminal-tests)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/terminal_tests-d163a702128509ba.0.o" "-o" "/Users/mhl/Sources/terminal-tests/target/debug/deps/terminal_tests-d163a702128509ba" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/mhl/Sources/terminal-tests/target/debug/deps" "-L" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libcursive-589ffaec46642e7b.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libunicode_segmentation-1400e9f38485b222.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libncurses-64b8ed169553261c.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libtoml-5130c1b472bb88f9.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libunicode_width-a8b627b65c290dac.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/liblibc-73c6422e7b19c2f3.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/librustc_serialize-03b62901d97343ea.rlib" "/Users/mhl/Sources/terminal-tests/target/debug/deps/libodds-798c90752ba21e6f.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-713ad88203512705.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-8db31eff4f3f5d1c.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-9d903f075d9d1ed3.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librand-15da1025aec585ac.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcollections-eba7f19f0aae5f37.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-0fa051c7d0594505.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-9dddbb08233542f3.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-72ccf8e77ba91924.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-d3fcdc16d2a25b3a.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-407db9a296a50c43.rlib" "/Users/mhl/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-dfc954c33c85abed.rlib" "-l" "ncursesw" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m"
= note: ld: library not found for -lncursesw
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `terminal-tests`.
To learn more, run the command again with --verbose.
MacBook-Air-Micha:terminal-tests mhl$ cargo build
Compiling ncurses v5.84.0
Compiling cursive v0.3.5 (https://github.com/gyscos/Cursive?branch=macos#451d0522)
Compiling terminal-tests v0.1.0 (file:///Users/mhl/Sources/terminal-tests)
Finished debug [unoptimized + debuginfo] target(s) in 6.47 secs
MacBook-Air-Micha:terminal-tests mhl$ |
Doh. Looks like cargo is not quite stable just yet. |
Hopefully jeaye/ncurses-rs#123 will make this easier. |
You can try the latest master branch, it should fix this problem in a more stable way. |
Yes, everything now is OK. |
Great! :D |
hello
i am on macos how to install that library to my system
$ brew install ncurses
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
skinny
Warning: homebrew/dupes/ncurses-6.0_2 already installed
The text was updated successfully, but these errors were encountered: