Giter Site home page Giter Site logo

Comments (8)

NobodyXu avatar NobodyXu commented on June 25, 2024 2

Thanks for the feedback @JCallicoat @tyilo

I will also add PR for lib64 glibc and fallback to cargo without the --target

from cargo-binstall.

NobodyXu avatar NobodyXu commented on June 25, 2024 1

Is there a reason for not always using the same target as cargo install does?

On NixOS, there isn't a global libc in /lib, the glibc is put in a different location as a separate nix package.

If someone installed rustc on NixOS with glibc, the rustc -vV will give x86_64-unknown-linux-gnu, however downloaded gnu binaries cannot run due to missing libc.

from cargo-binstall.

JCallicoat avatar JCallicoat commented on June 25, 2024 1

I was about to post about this same issue. I checked on arch and fedora37 - 39/rawhide and they all have the vanilla GNU libc instead of ubuntu's GLIBC in the ld-linux output, but I just saw @NobodyXu fixed that in 104b399.

Another problem is that fedora ld-linux is under /lib64/ld-linux-x86-64.so.2 / /usr/lib64/ld-linux-x86-64.so.2 so it would not be found by the three locations here.

format!("/lib/ld-linux-{cpu_arch_suffix}.so.2"),
format!("/lib/{cpu_arch}-linux-gnu/ld-linux-{cpu_arch_suffix}.so.2"),
format!("/usr/lib/{cpu_arch}-linux-gnu/ld-linux-{cpu_arch_suffix}.so.2"),

from cargo-binstall.

tyilo avatar tyilo commented on June 25, 2024 1

It seems to me that the target for building shouldn't necessarily be the same as for downloading.
For building it should always be a target that is installed, otherwise it would fail anyway. So if the user only has one of musl and gnu targets, that target should always be picked no matter what the detection algorithm determines.

from cargo-binstall.

NobodyXu avatar NobodyXu commented on June 25, 2024

Thanks, I will submit a fix for this shortly.

It is surprising how glibc from different distro behaves so differently.

from cargo-binstall.

tyilo avatar tyilo commented on June 25, 2024

Is there a reason for not always using the same target as cargo install does?

from cargo-binstall.

tyilo avatar tyilo commented on June 25, 2024

Shouldn't a user of such as system configure cargo to use x86_64-unknown-linux-musl as the default target?

from cargo-binstall.

NobodyXu avatar NobodyXu commented on June 25, 2024

@tyilo Opened #1430 for your idea

from cargo-binstall.

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.