Giter Site home page Giter Site logo

Comments (7)

siddontang avatar siddontang commented on September 18, 2024

PTAL @BusyJay

from grpc-rs.

BusyJay avatar BusyJay commented on September 18, 2024

That's because grpc-sys use embed boringssl instead of openssl by default. So the -l ssl will link to the ssl library shipped with this crate, which doesn't contains the SSL_ctrl symbol.
If you want to link to openssl instead, you can build grpc core library by yourself. And then link to it by setting environment variable GRPCIO_SYS_USE_PKG_CONFIG=1. Then pkg-config is used to get the required linking information.

from grpc-rs.

domohawk avatar domohawk commented on September 18, 2024

Thanks for the quick reply!

Would this happen any time then a crate depended both on grpcio and another crate with a transitive dependency on openssl? Is there a way to add a guard to the grpcio crate to warn/error with a friendly message?

Also, why does grpcio-proto need ssl if grpcio (without secure) does not?

from grpc-rs.

BusyJay avatar BusyJay commented on September 18, 2024

Would this happen...

Yes.

Is there a way to add a guard to the grpcio crate to warn/error with a friendly message?

AFAIK, I don't think a crate can tell exactly if another crate is involved at compile time.

... why does grpcio-proto need ssl...

Because grpcio-proto includes some useful functions for writing interop tests which needs secure features. Although I believe they can be compiled conditionally.

from grpc-rs.

domohawk avatar domohawk commented on September 18, 2024

So building pingcap/grpc was straightforward, and happy to be onward with my project, but as a Rust newbie I am curious to ask:

What is the downside to not embed an ssl impl (or other link requirements) in the crate, and by default use the one on the system? Would that not be more portable?

from grpc-rs.

BusyJay avatar BusyJay commented on September 18, 2024

We enable it by default to make things simple, so that users can simply run cargo build and get things done. Otherwise user is required to install openssl-devel or any package similar to move forward. And using a built-in one can also make binary/tests more deterministic.

from grpc-rs.

domohawk avatar domohawk commented on September 18, 2024

I see, I guess I don't really have enough experience with Rust or this type of build system. I'm used to fetching all needed C++ sources to build aside from standard system libs.

Thanks for your help!

from grpc-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.