-
Notifications
You must be signed in to change notification settings - Fork 31
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
Getting error when running on macOS Monterey M1? #77
Comments
Not M1 is OK, I will try in M1 tomorrow. @uzador I'm sorry I'm not professional enough Finished dev [unoptimized + debuginfo] target(s) in 0.49s
Running `target/debug/examples/simple_app`
2022-12-05T15:22:48.233522Z DEBUG nacos_sdk::common::remote::grpc: register_bi_call_handler key=ConfigChangeNotifyRequest
2022-12-05T15:22:48.233687Z INFO nacos_sdk::common::remote::grpc::grpc_client: init grpc client: 0.0.0.0:9848
^C
caihongwen@caidage [23:22:56] [~/IdeaProjects/nacos-sdk-rust] [main]
-> % gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
caihongwen@caidage [23:23:08] [~/IdeaProjects/nacos-sdk-rust] [main]
-> % g++ --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
caihongwen@caidage [23:23:31] [~/IdeaProjects/nacos-sdk-rust] [main]
-> % cmake --version
cmake version 3.23.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
caihongwen@caidage [23:23:43] [~/IdeaProjects/nacos-sdk-rust] [main]
-> % rustc --version
rustc 1.64.0 (a55dd71d5 2022-09-19)
|
@CherishCai if you could try it would be great! |
@uzador My M1 doesn't have this problem,Perhaps the impact is due to the gcc version? warning: `nacos-sdk` (example "simple_app") generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 17.16s
Running `target/debug/examples/simple_app`
2022-12-06T02:30:25.042465Z DEBUG nacos_sdk::common::remote::grpc: register_bi_call_handler key=ConfigChangeNotifyRequest
2022-12-06T02:30:25.042709Z INFO nacos_sdk::common::remote::grpc::grpc_client: init grpc client: 0.0.0.0:9848
Error: ClientUnhealthy("can't connect target server, please check network or the server address if it's wrong.")
[~/IdeaProjects/nacos-sdk-rust] [main]
-> % gcc --version
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[~/IdeaProjects/nacos-sdk-rust] [main]
-> % g++ --version
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[~/IdeaProjects/nacos-sdk-rust] [main]
-> % cmake --version
cmake version 3.24.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
[~/IdeaProjects/nacos-sdk-rust] [main]
-> % rustc --version
rustc 1.65.0 (897e37553 2022-11-02)
|
@CherishCai It was my bad :) I even couldn't think that rust's nightly version could break the app. After changing to stable one I don't see any issues! Thanks. |
current stable version is 1.66.1, I get the same error #92 |
cargo build
works fineWhen I run example
cargo r --example simple_app
then it fails :(error: linking with
cc
failed: exit status: 1|
= note: "cc" "-arch" "arm64" "/var/folders/75/zhdmjhsd4svgjtv3281gbcxm0000gp/T/rustchw5hAI/symbols.o" "/.../nacos-sdk-rust/target/debug/examples/simple_app-f81418a421323162.111jv2pm79r6org0.rcgu.o" "/.../nacos-sdk-rust/target/debug/examples/simple_app-f81418a421323162.11eq76cjlcfn2lm5.rcgu.o"
.
.
.
.
"/.../.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-d567ed3625eefebc.rlib" "-framework" "Security" "-framework" "CoreFoundation" "-lc++" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/.../rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/.../nacos-sdk-rust/target/debug/examples/simple_app-f81418a421323162" "-Wl,-dead_strip" "-nodefaultlibs"
= note: ld: warning: directory not found for option '-L/.../nacos-sdk-rust/target/debug/build/libz-sys-aa02c4250e7bfed2/out/build'
Undefined symbols for architecture arm64:
"_res_9_getservers", referenced from:
_init_by_resolv_conf in libgrpcio_sys-94980c6c5e8bf971.rlib(ares_init.c.o)
"_res_9_ndestroy", referenced from:
_init_by_resolv_conf in libgrpcio_sys-94980c6c5e8bf971.rlib(ares_init.c.o)
"_res_9_ninit", referenced from:
_init_by_resolv_conf in libgrpcio_sys-94980c6c5e8bf971.rlib(ares_init.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My env:
Could you advice if I've missed anything?
The text was updated successfully, but these errors were encountered: