Code Monkey home page Code Monkey logo

Comments (6)

alexcrichton avatar alexcrichton commented on August 15, 2024

Does configuring this crate work?

from pkg-config-rs.

golddranks avatar golddranks commented on August 15, 2024

It doesn't work, since the is_system check on this row: https://github.com/alexcrichton/pkg-config-rs/blob/master/src/lib.rs#L433 prevents static build even if the flags are set.

from pkg-config-rs.

alexcrichton avatar alexcrichton commented on August 15, 2024

Sounds like a bug to fix then!

from pkg-config-rs.

golddranks avatar golddranks commented on August 15, 2024

I'll look into it in the near future!

from pkg-config-rs.

golddranks avatar golddranks commented on August 15, 2024

#37 Sent a PR.

I left the check with empty directory list as is, because it seems reasonable to think a library is a system lib if no search path is specified. But I fixed two other problems.

from pkg-config-rs.

golddranks avatar golddranks commented on August 15, 2024

There's still one problem:

The is_system check prevents library from being linked statically. But if people use system-provided musl-dev libs, they are in the system dirs (for example, /usr/lib/x86_64-linux-musl/), and it's reasonable to link against them.

I don't know if there even exists a simple, non-distro specific heuristic that is able to prevent obviously wrong choices while allowing the correct ones. (One of reasonable candidates is checking whether the path contains word "musl"; that works at least on Debian and Arch, but that would be not only distro-specific, but also target-specific. Not sure if we even have other static targets than musl, though.)

from pkg-config-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.