tikv / grpc-rs

The gRPC library for Rust built on C Core library and futures
Apache License 2.0
1.81k stars 253 forks source link

hope grpc can static link with libstdc++.so #535

Closed SSebo closed 3 years ago

SSebo commented 3 years ago

Is your feature request related to a problem? Please describe. compile env and production env not identical, like compile on centos 6 with higher version of gcc, but production env gcc is lower. grpc can not start on production env, currently mv libstdc++ to /usr/lib64.

Describe the solution you'd like can static link with libstdc++ by some feature enabled.

Describe alternatives you've considered currently mv libstdc++ to /usr/lib64 on production env.

Additional context Add any other context or screenshots about the feature request here.

BusyJay commented 3 years ago

We use some tricks to link to C++ statically in TiKV, you can do the same in your application:

https://github.com/tikv/rust-rocksdb/blob/master/librocksdb_sys/build.rs#L86-L126

. We are also OK to accept a patch to do it inside grpc-rs.

SSebo commented 3 years ago

Thanks a lot