Skip to content

ICE with *-*-ios targets without ios developer stuff installed #29812

Closed

Description

@wthrowe
$ echo 'fn main() {}' | rustc - -Z unstable-options --pretty=normal --target=x86_64-apple-ios
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 'failed to get iphonesimulator SDK path: No such file or directory (os error 2)', src/librustc_back/target/apple_ios_base.rs:59

I don't expect to be able to actually compile anything with those targets, but it shouldn't ICE and most of the --pretty modes should probably work. (--pretty works with all other targets, except for --pretty=typed because that needs libstd.)

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Nov 13, 2015
  2. cardoe commented on Jul 27, 2016

    @cardoe
    Contributor

    This should likely improve with #34980.

  3. japaric commented on Sep 14, 2016

    @japaric
    Contributor

    Triage: Still happens with 1.11.0:

    $ rustup run stable rustc -V
    rustc 1.11.0 (9b21dcd6a 2016-08-15)
    
    $ rustup run stable rustc --target aarch64-apple-ios --print cfg
    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
    thread 'rustc' panicked at 'failed to get iphoneos SDK path: No such file or directory (os error 2)', ../src/librustc_back/target/apple_ios_base.rs:59
    

    Copying Alex's comment on a duplicate issue here so it doesn't get lost:

    I believe this has essentially always been the case, but I'd love to have a fix! I think the best choice here is to delay the pieces of the iOS target that are fallible until we actually need them, for example at link time.

  4. cardoe commented on Sep 15, 2016

    @cardoe
    Contributor

    @japaric The change I mentioned didn't land until 1.12.0. I've removed the explicit panic!() call and now its returning a Result which I believe is now handled gracefully. I'd love if you could test it for me.

    $ rustup run beta rustc --target aarch64-apple-ios --print cfg
    

    My Mac has Xcode installed now and I haven't had the time to uninstall it to test this.

  5. cardoe commented on Nov 28, 2016

    @cardoe
    Contributor

    This is confirmed to not ICE and can be closed.

  6. alexcrichton commented on Nov 28, 2016

    @alexcrichton
    Member

    Yay!

  7. added a commit that references this issue on May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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