c++ - 如何在 C++ 中成功构建 gRPC?
问题描述
我正在尝试按照c++ gRPC 安装在 C++ 中构建 gRPC 。我的操作系统是安装在 Raspberry Pi 4 上的 Ubuntu20.4 LTS。
当我输入这个命令“make -j”
$ cd grpc
$ mkdir -p cmake/build
$ pushd cmake/build
$ cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
../..
$ make -j
发生此错误。
[ 1%] Built target zlibstatic
・
・
[ 97%] Built target mimics_pcre_test
[ 97%] Built target possible_match_test
[ 97%] Built target set_test
[ 97%] Built target regexp_test
[ 97%] Built target search_test
[ 97%] Linking CXX executable bssl
/usr/bin/ld: CMakeFiles/bssl.dir/src/tool/transport_common.cc.o: in function `PrintConnectionInfo(bio_st*, ssl_st const*)':
transport_common.cc:(.text+0xd40): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: transport_common.cc:(.text+0xd74): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x50): undefined reference to `voprf_exp2_generate_key'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x58): undefined reference to `voprf_exp2_client_key_from_bytes'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x60): undefined reference to `voprf_exp2_issuer_key_from_bytes'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x68): undefined reference to `voprf_exp2_blind'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x70): undefined reference to `voprf_exp2_sign'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x78): undefined reference to `voprf_exp2_unblind'
/usr/bin/ld: libcrypto.a(trust_token.c.o):(.data.rel.ro+0x80): undefined reference to `voprf_exp2_read'
/usr/bin/ld: libcrypto.a(x509_vfy.c.o): in function `reject_dns_name_in_common_name':
x509_vfy.c:(.text+0x16dc): undefined reference to `ASN1_STRING_to_UTF8'
/usr/bin/ld: libcrypto.a(x_name.c.o): in function `asn1_string_canon':
x_name.c:(.text+0xe94): undefined reference to `ASN1_STRING_to_UTF8'
/usr/bin/ld: libcrypto.a(v3_crld.c.o): in function `print_distpoint':
v3_crld.c:(.text+0x1304): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: libcrypto.a(v3_utl.c.o): in function `do_check_string':
v3_utl.c:(.text+0x288c): undefined reference to `ASN1_STRING_to_UTF8'
/usr/bin/ld: libcrypto.a(algorithm.c.o): in function `x509_digest_sign_algorithm':
algorithm.c:(.text+0xac): undefined reference to `x509_rsa_ctx_to_pss'
/usr/bin/ld: libcrypto.a(algorithm.c.o): in function `x509_digest_verify_init':
algorithm.c:(.text+0x2c4): undefined reference to `x509_rsa_pss_to_ctx'
/usr/bin/ld: libcrypto.a(v3_alt.c.o): in function `GENERAL_NAME_print':
v3_alt.c:(.text+0x7c4): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: libcrypto.a(t_x509.c.o): in function `X509_print_ex':
t_x509.c:(.text+0x404): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: t_x509.c:(.text+0x52c): undefined reference to `X509_NAME_print_ex'
/usr/bin/ld: libcrypto.a(t_x509.c.o): in function `X509_signature_print':
t_x509.c:(.text+0xb7c): undefined reference to `x509_print_rsa_pss_params'
collect2: error: ld returned 1 exit status
make[2]: *** [third_party/boringssl-with-bazel/CMakeFiles/bssl.dir/build.make:339: third_party/boringssl-with-bazel/bssl] Error 1
make[1]: *** [CMakeFiles/Makefile2:4800: third_party/boringssl-with-bazel/CMakeFiles/bssl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
请帮我解决这个问题。
解决方案
推荐阅读
- c# - Customer 类的装饰器模式
- javascript - 如何通过类对象阻止一个函数与另一个函数一起运行
- wordpress - 我制作了一个多步骤幻灯片来购买产品(现在我想将它与 woocommerce 链接)
- visual-studio-code - 如何创建默认任务?
- javascript - 如何从引导下拉列表中检索所选选项的 ID?
- r - 根据列号和单独的索引向量替换数据表中的值
- javascript - 由于“没有函数对象”,Onchange 事件无法打开 JavaScript 函数
- java - 如何为 tomcat 配置 maven-war-plugin
- javascript - 如何在 pug/Jade 中关闭浏览器窗口
- html - 需要根据表头的条件申请类