Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52247 closed defect (fixed)

rust 1.11.0 build hangs indefinitely on macos 10.12 (Sierra)

Reported by: r.keoni@… Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: sierra Cc: elventear (Pepe Barbe), grimreaper (Eitan Adler), computergeek125 (Ryan Smith)
Port: rust

Description

I upgraded last week to macOS Sierra and found that the configure stage of rust 1.11.0 never completes (infinite loop).

This appears related to a known defect fixed in the 1.12 master branch, currently in beta: https://github.com/rust-lang/rust/issues/35938 . Quoting: "The 1.11.0 compiler bootstraps from the 1.10.0 compiler, which is known to fail on OSX 10.12. We've backported the fix to 1.11.0 so the compilers we ship should work, but otherwise this is an unfortunate case where 1.11.0 won't be able to bootstrap on OSX 10.12."

A fix may need to wait until 1.12 exits beta, unless 1.11.0 can be bootstrapped using a 1.11.0 binary off the rust site as a stage0?

Attachments (1)

Portfile (6.5 KB) - added by r.keoni@… 8 years ago.
preliminary portfile (builds and activates)

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Keywords: sierra added
Owner: changed from macports-tickets@… to g5pw@…

In the future, please Cc the port maintainers (port info --maintainers rust), if any.

comment:2 Changed 8 years ago by r.keoni@…

I did a quick and unsuccessful attempt to build using the beta channel binaries as stage0. That gets past the configure hang but would require further patching of the 1.11 sources, on the very weak assumption the #[feature] tags are redundant when using that stage0 binary. Possibly worth trying using the 1.11.0 binary eventually intended for use in building the release 1.12?

Relevant changes to Portfile that I tried:

set stage0(date)        2016-08-17
set stage0(version)     beta 
    default {checksums-append   ${stage0(distfile)} \
                            rmd160  c30a0c2e92bb26117270e622b0918eade050452c \
                            sha256  c268352695b155ff24fe3d65de163a87d32e1371698562d89461fcef6c65b438}

Example error in the build:

:info:build error[E0554]: #[feature] may not be used on the beta release channel
:info:build   --> src/libcore/lib.rs:64:1
:info:build    |
:info:build 64 | #![feature(allow_internal_unstable)]
:info:build    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:info:build 

comment:3 Changed 8 years ago by elventear (Pepe Barbe)

Cc: elventear@… added

Cc Me!

comment:4 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Hmm... we can

  • Disable 1.11 on Sierra
  • Move to the development version (i'm slightly against that)
  • Build a corrected 1.10 compiler and host it somewhere
Last edited 8 years ago by g5pw (Aljaž Srebrnič) (previous) (diff)

Changed 8 years ago by r.keoni@…

Attachment: Portfile added

preliminary portfile (builds and activates)

comment:5 in reply to:  4 Changed 8 years ago by r.keoni@…

Replying to g5pw@…:

Hmm... we can

  • Disable 1.11 on Sierra
  • Move to the development version (i'm slightly against that)
  • Build a corrected 1.10 compiler and host it somewhere

1.12.0 dropped late last month, making the patched 1.11.0 stage0 ready-for-consumption. I did a quick update to the Portfile to point to the new stage0 and the 1.12.0 sources, and was able to get a build out of it. Patch was removed. i386 checksums have not been updated.

See attachment for the new Portfile, hopefully useful at least as a starting point.

comment:6 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Thanks, r.keoni. Unfortunately 1.12 doesn't build successfully on macOS 10.11, but I'm looking into that. In future, please consider submitting a diff between the old and the improved Portfile so we can better review the changes. Did you test it on Sierra?

Last edited 8 years ago by g5pw (Aljaž Srebrnič) (previous) (diff)

comment:7 Changed 8 years ago by raimue (Rainer Müller)

The Portfile attached here does not update the checksums for i386, so the one submitted in #52469 should be preferred. I tested the patch to 1.12.0 from #52469 on Sierra, which works fine for me.

comment:8 in reply to:  6 Changed 8 years ago by r.keoni@…

Replying to g5pw@…:

Thanks, r.keoni. Unfortunately 1.12 doesn't build successfully on macOS 10.11, but I'm looking into that. In future, please consider submitting a diff between the old and the improved Portfile so we can better review the changes. Did you test it on Sierra?

Yes, I built on Sierra and was able to successfully do some basic compilation. I'll look at trying the patch from #52469 some time today.

comment:9 Changed 8 years ago by raimue (Rainer Müller)

Now that Rust 1.13 is out, can we just skip the failing 1.11 version and bootstrap with 1.12?

comment:10 in reply to:  9 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Replying to raimue:

Now that Rust 1.13 is out, can we just skip the failing 1.11 version and bootstrap with 1.12?

Definitely. I'm testing the build on El Cap as we speak.

comment:11 Changed 8 years ago by g5pw (Aljaž Srebrnič)

1.13 still fails for me in El Cap. :(

comment:12 Changed 8 years ago by hmeine (Hans Meine)

With 1.12, cargo does not build, apparently due to too strict linting. (At least, rust itself builds again on Sierra.)

I managed to make it build by removing the offending process from the use line:

:info:build  --> src/cargo/ops/cargo_run.rs:4:31
:info:build   |
:info:build 4 | use util::{self, CargoResult, process, ProcessError};
:info:build   |                               ^^^^^^^

Probably, cargo also deserves a version bump (from 0.11 to something like 0.14).

Last edited 8 years ago by hmeine (Hans Meine) (previous) (diff)

comment:13 Changed 8 years ago by grimreaper (Eitan Adler)

Cc: grimreaper added

comment:14 Changed 8 years ago by mohd-akram (Mohamed Akram)

Rust is at 1.14.0 now.

comment:15 Changed 8 years ago by computergeek125 (Ryan Smith)

Cc: computergeek125 added

comment:16 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: newclosed

updated to 1.14 in [1e793e4776/macports-ports].

Last edited 8 years ago by g5pw (Aljaž Srebrnič) (previous) (diff)
Note: See TracTickets for help on using tickets.