Skip to content

compiler panic on OS X: 'can't create relative paths across filesystems' (regression) #23140

Closed
@comex

Description

@comex

The -C rpath option, which has always been nonfunctional on OS X, now causes a compiler panic. (I only came across this by accident, because I never removed the option from my makefile after attempting to use it at the time I filed that issue.)
In this case, relativize in src/librustc_back/rpath.rs is being called with the arguments "/opt/lru/lib/rustlib/x86_64-apple-darwin/lib" and "/private/tmp". There is actually only one filesystem involved, although I'm not sure why mounts would prevent relative paths from being created.

/tmp % echo 'fn main() {}' > hello.rs
/tmp % RUST_BACKTRACE=1 rustc -C rpath hello.rs
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'can't create relative paths across filesystems', /usr/src/rust/src/librustc_back/rpath.rs:116

stack backtrace:
   1:        0x1085b19f2 - sys::backtrace::write::h89574ef9ad8da186IDA
   2:        0x1085e06e4 - panicking::on_panic::h1655b4d25b76f374KsJ
   3:        0x1084fea17 - rt::unwind::begin_unwind_inner::h3ddd849238a7da75gbJ
   4:        0x107b3d7ef - rt::unwind::begin_unwind::h7573310346249346792
   5:        0x107b4cbc1 - iter::Map<I, F>.Iterator::next::h396994352844314702
   6:        0x107b4a030 - rpath::get_rpath_flags::ha1faad453319fd57kJa
   7:        0x1053d7dff - back::link::link_args::hd057865f4867d7c3P8a
   8:        0x1053cf610 - back::link::link_natively::h36f064e1db73f7151Ya
   9:        0x1053c9b92 - back::link::link_binary::h097ac40aed1612f9Xua
  10:        0x104e38831 - driver::phase_6_link_output::h70b0959e4cea3cc2wQa
  11:        0x104e12809 - driver::compile_input::h0d9defea3d543c79Nba
  12:        0x104edf98e - run_compiler::h398e6070731ba5e8x6b
  13:        0x104edcf17 - thunk::F.Invoke<A, R>::invoke::h5983203227732868562
  14:        0x104edba5f - rt::unwind::try::try_fn::h17247463931895016429
  15:        0x10865fdc8 - rust_try_inner
  16:        0x10865fdb5 - rust_try
  17:        0x104edc298 - thunk::F.Invoke<A, R>::invoke::h9014748806194985157
  18:        0x1085c8f42 - sys::thread::thread_start::h00dcf94d31b0c0c312E
  19:     0x7fff86d7c267 - _pthread_body
  20:     0x7fff86d7c1e4 - _pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions