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

执行cmake的时候hang住 #242

Open
Lowpower opened this issue Aug 29, 2023 · 8 comments
Open

执行cmake的时候hang住 #242

Lowpower opened this issue Aug 29, 2023 · 8 comments

Comments

@Lowpower
Copy link

如图:
image

uname -a如下
5.15.0-1035-raspi #38-Ubuntu SMP PREEMPT aarch64 aarch64 aarch64 GNU/Linux

@matrixji
Copy link
Collaborator

在下载依赖grpc,需要科学上网+耐心等待。
It's fetching the grpc from github which may require a proxy and wait for a long time.

@Lowpower
Copy link
Author

grpc能否加到install_deps.sh里呢?

@matrixji
Copy link
Collaborator

grpc能否加到install_deps.sh里呢?
你可以尝试: 手动编译安装grpc, cmake 的时候 cmake -DMILVUS_WITH_GRPC=package

目前下面这些包都是可以尝试使用系统的(默认是从Github下载编译)

define_option_string(MILVUS_WITH_GRPC           "Using gRPC from"       "module" "package" "module")
define_option_string(MILVUS_WITH_ZLIB           "Using Zlib from"       "module" "package" "module")
define_option_string(MILVUS_WITH_NLOHMANN_JSON  "nlohmann json from"    "module" "package" "module")
define_option_string(MILVUS_WITH_GTEST          "Using GTest from"      "module" "package" "module")

@Lowpower
Copy link
Author

Lowpower commented Sep 8, 2023

function milvus::MilvusClientImpl::CreateCollection(milvus::CollectionSchema const&)::{lambda()#1}::operator()() const: error: undefined reference to 'google::protobuf::internal::ArenaStringPtr::Set(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::Arena*)'
应用程序链接libmilvus_sdk.a的时候报这个错误,是不是编译的.a有问题?

@matrixji
Copy link
Collaborator

.a 只是一个archive,并不解决相关依赖。所以还是需要链接上 grpc等依赖库。

@dingjianfei
Copy link

麻烦能写一个事例教程吗?make install 之后也引入grpc依赖库,依然报错。
format_request.cc:(.text+0xb76): undefined reference to absl::lts_20220623::StrAppend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, absl::lts_20220623::AlphaNum const&)' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(format_request.cc.o): in function grpc_httpcli_format_put_request(grpc_http_request const*, char const*, char const*)':
format_request.cc:(.text+0xfe0): undefined reference to absl::lts_20220623::StrAppend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, absl::lts_20220623::AlphaNum const&)' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(socket_factory_posix.cc.o): in function grpc_socket_factory_init(grpc_socket_factory*, grpc_socket_factory_vtable const*)':
socket_factory_posix.cc:(.text+0x30): undefined reference to gpr_ref_init' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(socket_factory_posix.cc.o): in function grpc_socket_factory_ref(grpc_socket_factory*)':
socket_factory_posix.cc:(.text+0x141): undefined reference to gpr_ref' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(socket_factory_posix.cc.o): in function grpc_socket_factory_unref(grpc_socket_factory*)':
socket_factory_posix.cc:(.text+0x167): undefined reference to gpr_unref' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_counter.cc.o): in function maybe_copy_error_msg(char const*, char**)':
alts_counter.cc:(.text+0x36): undefined reference to gpr_malloc' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_counter.cc.o): in function alts_counter_create(bool, unsigned long, unsigned long, alts_counter**, char**)':
alts_counter.cc:(.text+0x1a3): undefined reference to gpr_malloc' /usr/bin/ld: alts_counter.cc:(.text+0x1da): undefined reference to gpr_zalloc'
/usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_counter.cc.o): in function alts_counter_destroy(alts_counter*)': alts_counter.cc:(.text+0x3db): undefined reference to gpr_free'
/usr/bin/ld: alts_counter.cc:(.text+0x3e7): undefined reference to gpr_free' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_crypter.cc.o): in function maybe_copy_error_msg(char const*, char**)':
alts_crypter.cc:(.text+0x36): undefined reference to gpr_malloc' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_crypter.cc.o): in function alts_crypter_destroy(alts_crypter*)':
alts_crypter.cc:(.text+0x22e): undefined reference to gpr_free' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_record_protocol_crypter_common.cc.o): in function maybe_copy_error_msg(char const*, char**)':
alts_record_protocol_crypter_common.cc:(.text+0x36): undefined reference to gpr_malloc' /usr/bin/ld: ../third_party//grpc_install/lib/libgrpc.a(alts_record_protocol_crypter_common.cc.o): in function alts_crypter_create_common(gsec_aead_crypter*, bool, unsigned long, char**)':
alts_record_protocol_crypter_common.cc:(.text+0x338): undefined reference to `gpr_malloc'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/milvus_test_code.dir/build.make:171: milvus_test_code] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/milvus_test_code.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

@dingjianfei
Copy link

通过cmake -DCMAKE_INSTALL_PREFIX 指定路径,能把所有的依赖环境都make install到指定目录吗?现在这样,编译出来的依赖库,太难用了!

@matrixji
Copy link
Collaborator

#240 add an install, then make install should be right now supported.

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

3 participants