Skip to content

Could not compile libc when following the  #56259

Closed
@Mikee-3000

Description

@Mikee-3000

After adding the 'rand' crate to Cargo.toml:

asteroid Projects/guessing_game ‹master*› » cargo build            
   Compiling libc v0.2.44
thread 'main' panicked at 'specified instant was later than self', libstd/sys/unix/time.rs:292:17
stack backtrace:                                                       
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace        
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49          
   1: std::sys_common::backtrace::print                                
             at libstd/sys_common/backtrace.rs:71                      
             at libstd/sys_common/backtrace.rs:59                      
   2: std::panicking::default_hook::{{closure}}                        
             at libstd/panicking.rs:211                                
   3: std::panicking::default_hook                                     
             at libstd/panicking.rs:227                                
   4: rustc::util::common::panic_hook                                  
   5: std::panicking::rust_panic_with_hook                             
             at libstd/panicking.rs:481                                
   6: std::panicking::begin_panic                                      
             at libstd/panicking.rs:411                                
   7: std::sys::unix::time::inner::Instant::sub_instant::{{closure}}   
             at libstd/sys/unix/time.rs:292                            
   8: std::time::Instant::elapsed                                      
             at libcore/result.rs:774                                  
             at libstd/sys/unix/time.rs:291                            
             at libstd/time.rs:185                                     
             at libstd/time.rs:250                                     
             at libstd/time.rs:209                                     
   9: rustc::util::profiling::SelfProfiler::end_activity               
  10: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  11: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  12: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::type_of
  13: <rustc_typeck::collect::CollectItemTypesVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
  14: rustc::hir::Crate::visit_all_item_likes                          
  15: rustc::util::common::time                                        
  16: rustc_typeck::check_crate                                        
  17: rustc::ty::context::tls::enter_context                           
  18: <std::thread::local::LocalKey<T>>::with                          
  19: rustc::ty::context::TyCtxt::create_and_enter                     
  20: rustc_driver::driver::compile_input                              
  21: rustc_driver::run_compiler_with_pool                             
  22: rustc_driver::driver::spawn_thread_pool                          
  23: rustc_driver::run_compiler                                       
  24: <scoped_tls::ScopedKey<T>>::set                                  
  25: syntax::with_globals                                             
  26: __rust_maybe_catch_panic                                         
             at libpanic_unwind/lib.rs:103                             
  27: rustc_driver::run                                                
  28: rustc_driver::main                                               
  29: std::rt::lang_start::{{closure}}                                 
  30: std::panicking::try::do_call                                     
             at libstd/rt.rs:59                                        
             at libstd/panicking.rs:310                                
  31: __rust_maybe_catch_panic                                         
             at libpanic_unwind/lib.rs:103                             
  32: std::rt::lang_start_internal                                     
             at libstd/panicking.rs:289                                
             at libstd/panic.rs:392                                    
             at libstd/rt.rs:58                                        
  33: main                                                             
  34: __libc_start_main                                                
  35: <unknown>                                                        
query stack during panic:                                              
end of query stack                                                     
                                                                       
error: internal compiler error: unexpected panic                       
                                                                       
note: the compiler unexpectedly panicked. this is a bug.               
                                                                       
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
                                                                       
note: rustc 1.30.1 (1433507eb 2018-11-07) running on aarch64-unknown-linux-gnu
                                                                       
note: compiler flags: -C debuginfo=2 --crate-type lib                  
                                                                       
note: some of the compiler flags provided by cargo are hidden          
                                                                       
error: Could not compile `libc`.                                       

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateO-linuxOperating system: Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions