Skip to content
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

libstd build without backtrace feature broken #64410

Closed
bjorn3 opened this issue Sep 12, 2019 · 5 comments · Fixed by #64444
Closed

libstd build without backtrace feature broken #64410

bjorn3 opened this issue Sep 12, 2019 · 5 comments · Fixed by #64444

Comments

@bjorn3
Copy link
Member

bjorn3 commented Sep 12, 2019

Likely because of #64154.

error[E0432]: unresolved import `crate::sys_common::backtrace`
  --> sysroot_src/src/libstd/backtrace.rs:98:24
   |
98 | use crate::sys_common::backtrace::{output_filename, lock};
   |                        ^^^^^^^^^ could not find `backtrace` in `sys_common`

error[E0432]: unresolved import `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:100:5
    |
100 | use backtrace::BytesOrWideString;
    |     ^^^^^^^^^ help: a similar path exists: `crate::backtrace`
    |
    = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:146:12
    |
146 |     frame: backtrace::Frame,
    |            ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:231:13
    |
231 |             backtrace::trace_unsynchronized(|frame| {
    |             ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:285:35
    |
285 |             (&capture.frames[..], backtrace::PrintFmt::Full)
    |                                   ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:287:55
    |
287 |             (&capture.frames[capture.actual_start..], backtrace::PrintFmt::Short)
    |                                                       ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:299:21
    |
299 |         let mut f = backtrace::BacktraceFmt::new(fmt, style, &mut print_path);
    |                     ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:309:54
    |
309 |                         symbol.name.as_ref().map(|b| backtrace::SymbolName::new(b)),
    |                                                      ^^^^^^^^^ use of undeclared type or module `backtrace`

error[E0433]: failed to resolve: use of undeclared type or module `backtrace`
   --> sysroot_src/src/libstd/backtrace.rs:339:17
    |
339 |                 backtrace::resolve_frame_unsynchronized(&frame.frame, |symbol| {
    |                 ^^^^^^^^^ use of undeclared type or module `backtrace`
@RalfJung
Copy link
Member

@alexcrichton is it expected that building libstd without explicitly also enabling the backtrace feature is broken?
Seems odd to have a feature that must be enabled for things to build.

@alexcrichton
Copy link
Member

Nah I think this is just a bug. We don't happen to test it on CI so I wasn't able to fix it myself :(

I'd be more than happy to review a PR to fix this support though!

@RalfJung
Copy link
Member

RalfJung commented Sep 13, 2019 via email

@sfackler
Copy link
Member

Yep, there's already handling for that case: https://github.com/rust-lang/rust/blob/master/src/libstd/backtrace.rs#L119

@RalfJung
Copy link
Member

I am working on a fix at #64444.

bors added a commit to rust-lang/miri that referenced this issue Sep 14, 2019
temporarily enable backtrace feature

This is a temporary hack to work around rust-lang/rust#64410.
@bors bors closed this as completed in 2a6a342 Sep 16, 2019
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

Successfully merging a pull request may close this issue.

4 participants