Giter VIP home page Giter VIP logo

Comments (14)

RazrFalcon avatar RazrFalcon commented on June 24, 2024

What rustc --print=sysroot outputs?

from cargo-bloat.

stefson avatar stefson commented on June 24, 2024

here's the output:

rustc --print=sysroot
/usr

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Do you have rustlib at all?

from cargo-bloat.

stefson avatar stefson commented on June 24, 2024

Sure, I've got full rust toolchain available. It's actually the case that cargo build is executed before cargo bloat, and the error only appears when cargo build has finished it's compile. It's most likely a problem that rustlib resides in /usr/lib64, and the folder isn't scanned by cargo-bloat.

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

The problem is that I don't know where rustlib is. Currently, cargo-bloat uses the same algorithm as rustc.

Maybe your distro has a patched rust?

from cargo-bloat.

stefson avatar stefson commented on June 24, 2024

here's the file list: rust-files.gz

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Looks like a bug of your distro. Library should be in

/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib

and not in

/usr/lib64/rust-1.39.0/rustlib/x86_64-unknown-linux-gnu/lib

from cargo-bloat.

stefson avatar stefson commented on June 24, 2024

I initially thought it was the fact that it resides in /usr/lib64, since all debian based distros don't distinguish lib and lib64, but it makes sense to me. Will test now.

from cargo-bloat.

stefson avatar stefson commented on June 24, 2024

this got triggered by a bug in gentoo, as you mentioned. This is now fixed, gentoo bug for reference: https://bugs.gentoo.org/703744

thanks for pointing me towards it! :)

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Glad to hear, since I'm using Gentoo too. =) Only I'm installing Rust via rustup.

from cargo-bloat.

o01eg avatar o01eg commented on June 24, 2024

Currently, cargo-bloat uses the same algorithm as rustc.

rustc found out alternative libdir because it compiled with alternative CFG_LIBDIR_RELATIVE environment:

https://github.com/rust-lang/rust/blob/a916ac22b9f7f1f0f7aba0a41a789b3ecd765018/src/librustc_session/filesearch.rs#L159

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Can I access it via CLI?

from cargo-bloat.

o01eg avatar o01eg commented on June 24, 2024

No yet, I'm think it better to expose it with --print=libdir or so.

from cargo-bloat.

o01eg avatar o01eg commented on June 24, 2024

@RazrFalcon I've opened PR: rust-lang/rust#69608

from cargo-bloat.

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.