GithubHelp home page GithubHelp logo

Comments (7)

alexcrichton avatar alexcrichton commented on May 28, 2024

The libgit2-sys library specifies the links manifest key which allows overrides, but the system library is almost never the right version so that's why the check isn't currently implemented.

from git2-rs.

codyps avatar codyps commented on May 28, 2024

I still think this is an issue, perhaps more accurately stated as:

libgit2-sys provides no way to use a system provided libgit2 via pkg-config

Notably, this means that pkg-config would need to be driven by an external program and it's output translated into something like the overrides for links (only to be converted later by cargo back into the original form). That seems rather awkward and unnecessary.

from git2-rs.

alexcrichton avatar alexcrichton commented on May 28, 2024

Right, this was explicitly removed in b5334b0 because the depended-upon version of libgit2 is rarely found in the wild, and future versions of libgit2 frequently break ABI compatibility, so it really does need to use a precise version for now until the ABI stabilizes.

from git2-rs.

codyps avatar codyps commented on May 28, 2024

I opened this because right now I am packaging a recent enough libgit2, and have to add this nasty patch to git2-rs to get it to be used: https://github.com/jmesmon/meta-rust/blob/master/recipes/cargo/files/git2-rs/0002-libgit2-sys-avoid-the-build-script-it-is-a-disaster.patch

I'd expect it might be a good idea to at least allow some type of override to get the expected pkg-config behavior so packagers can hack up packages a bit less.

from git2-rs.

alexcrichton avatar alexcrichton commented on May 28, 2024

Hm ok, how about something like if the LIBGIT2_SYS_USE_PKG_CONFIG environment variable is set, then pkg-config is queried first, but otherwise it's not used at all. Would that work?

from git2-rs.

codyps avatar codyps commented on May 28, 2024

That would be fine.

from git2-rs.

alexcrichton avatar alexcrichton commented on May 28, 2024

Ok! I've added this in alexcrichton@ed629d7

from git2-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.