Building C++ shared library errors

94 views
Skip to first unread message

Viral Shah

unread,
Dec 2, 2022, 8:18:33 PM12/2/22
to grp...@googlegroups.com
Hello, 

I’m trying to build a GRPC dylib on macOS (v12.2).

Following instructions here to build for C++, I can successfully build libgrpc.a. When I try to build a shared library, I’m hitting below errors. Any help / pointers would be appreciated. 

Steps:
1) git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc
2) cd grpc
3) git submodule update —init
4) mkdir -p cmake/build
5) cd cmake/build
6) cmake -DgRPC_INSTALL=YES -DgRPC_BUILD_TESTS=OFF \
    -DBUILD_SHARED_LIBS=ON ../..
7) make (fails here)

Also tried to use' FetchContent_Declare' of Cmake mentioned on the website. It results in the same error.

Errors:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [third_party/boringssl-with-bazel/libssl.dylib] Error 1
make[1]: *** [third_party/boringssl-with-bazel/CMakeFiles/ssl.dir/all] Error 2
make: *** [all] Error 2

I have attached a partial console log file if it helps. I have tried the latest GRPC version and also tried the 1.35.0 version. 


Thank you.
templog.log

veb...@google.com

unread,
Jun 26, 2023, 3:16:10 AM6/26/23
to grpc.io
Hey Viral,

If you can, it'd be useful to use the latest version of gRPC instead of 1.35.
And I tried to read the attached log file but it seems to be truncated. I couldn't find any error messages from it. Would you double-check the file?

Regards,
Esun.

Reply all
Reply to author
Forward
0 new messages