Skip to content

Snapshot rustc depends on libtinfo.so.5 #9334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sfackler opened this issue Sep 19, 2013 · 4 comments
Closed

Snapshot rustc depends on libtinfo.so.5 #9334

sfackler opened this issue Sep 19, 2013 · 4 comments
Milestone

Comments

@sfackler
Copy link
Member

libtinfo is part of ncurses, but is not always compiled into a separate library. On Arch Linux, for example, trying to compile raises this error:

x86_64-unknown-linux-gnu/stage0/bin/rustc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so] Error 127

Running

sudo ln -s /usr/lib/ncurses.so.5 /usr/lib/libtinfo.so.5

fixes the problem, but isn't a great solution.

@thestinger
Copy link
Contributor

Odd... why does rust link against ncurses at all?

@sfackler
Copy link
Member Author

Grepping through the source, it looks like the only references to tinfo are in llvm, so it may be coming from there.

@alexcrichton
Copy link
Member

Hmm, we may need to configure LLVM differently. We need to figure out how to build only what we want from LLVM, not all of the other nonsense that we're pulling in (JIT tests, random tools, etc.)

@thestinger
Copy link
Contributor

We need to fix this regression for the 0.8 release, so I'm setting it as the milestone.

@brson brson closed this as completed in 597e96b Sep 22, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 7, 2024
…ng-for-multi-dimension-arrays, r=Alexendoo

fix: `manual_memcpy` wrong indexing for multi dimensional arrays

fixes: rust-lang#9334

This PR fixes an invalid suggestion for multi-dimensional arrays.

For example,
```rust
let src = vec![vec![0; 5]; 5];
let mut dst = vec![0; 5];

for i in 0..5 {
    dst[i] = src[i][i];
}
```

For the above code, Clippy suggests `dst.copy_from_slice(&src[i]);`, but it is not compilable because `i` is only used to loop the array.
I adjusted it so that Clippy `manual_memcpy` works properly for multi-dimensional arrays.

changelog: [`manual_memcpy`]: Fixes invalid indexing suggestions for multi-dimensional arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants