Bug 1408435 - error[E0463]: can't find crate for `std`
Summary: error[E0463]: can't find crate for `std`
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cargo
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josh Stone
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-23 11:45 UTC by Florian "der-flo" Lehner
Modified: 2017-02-02 15:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-24 12:49:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian "der-flo" Lehner 2016-12-23 11:45:09 UTC
Description of problem:
The Rust standard library[1] is available to all Rust crates by default. So it is an important part to develop in Rust on Fedora. 

[1] https://doc.rust-lang.org/std/

Version-Release number of selected component (if applicable):

$ rpm -qa | grep rust
rust-std-static-1.13.0-1.fc25.x86_64
rust-1.13.0-1.fc25.x86_64
$ rpm -qa | grep cargo
cargo-0.14.0-2.fc25.x86_64


How reproducible:


Steps to Reproduce:
1. cargo new testProject --bin
2. cd testProject/
3. cargo build

Actual results:
$ cargo build
   Compiling testProject v0.1.0 (file:///home/flo/testProject)
error[E0463]: can't find crate for `std`

error: aborting due to previous error

error: Could not compile `testProject`.


Expected results:
cargo should build the project successfully.

Comment 1 Florian "der-flo" Lehner 2016-12-24 12:49:37 UTC
Hey!
I did some further investigation.

In my case, there is a folder called "rustlib" in /usr/lib64/ which is empty.
There is also a folder called "rustlib" in /usr/lib/ which contains the .rlib files.
So I deleted the empty "rustlib" folder in /usr/lib64. Now cargo builds and runs the projects as expected.

-> Closing Report.

Comment 2 Josh Stone 2016-12-30 00:45:43 UTC
Hmm, we used to package it as /usr/lib64/rustlib/, but switched to /usr/lib/ in the 1.13 update so that multilib could work all in the same place.  I wonder why your system left an empty folder?  Well, I'm glad you got it working!

Comment 3 Christophe Fergeau 2016-12-30 21:38:19 UTC
For what it's worth, I hit the same issue, empty /usr/lib64/rustlib package which led to a seemingly totally unrelated failure (I don't think I would have figured it out if I hadn't found this bug).

Comment 4 Tom Tromey 2017-02-02 15:44:00 UTC
This happened to me as well.
I was using the fedora copr repository previously, I wonder if that
could have caused the problem?
Anyway I was glad to find this bug, pretty sure I never would have
found the solution on my own.


Note You need to log in before you can comment on or make changes to this bug.