Skip to content

1.54.0 compilation fault with nightly, miri and parallel-compiler #87623

Closed
rust-lang/miri
#1863
@Miezhiko

Description

@Miezhiko
error[E0308]: mismatched types
  --> src/tools/miri/src/bin/miri.rs:44:30
   |
44 |                 Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
   |                              ^^^^^^^^^^^^^^^^^ expected struct `Rc`, found struct `Arc`
   |
   = note: expected mutable reference `&mut Rc<_>`
              found mutable reference `&mut Arc<CrateSource>`

error[E0609]: no field `rlib` on type `&mut _`
  --> src/tools/miri/src/bin/miri.rs:44:49
   |
44 |                 Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All));
   |                                                 ^^^^

Activity

Urgau

Urgau commented on Jul 30, 2021

@Urgau
Member

Miri is a nightly-only tool, not a stable one. You shouldn't being able to built it from a stable release.
See #86436 for more informations.

Miezhiko

Miezhiko commented on Jul 30, 2021

@Miezhiko
Author

I use nightly flag too, I'm just using release sources.

Urgau

Urgau commented on Jul 30, 2021

@Urgau
Member

The release source shouldn't include miri, in fact I don't see it in the release source. Where did you download it ? Have you used the official tarballs ?

Miri is also one of the few tools that are allow to not always compile, see the Rustup Components History. So it's perfectly possible that when the beta-cut happen miri was not compiling at the moment.

Miezhiko

Miezhiko commented on Jul 30, 2021

@Miezhiko
Author

miri can be set as additional tool in tools in config.toml before build, it needs nightly flag too (I have it), yes I use official tarballs, I wonder if there is patch for it already, maybe this issue should be on miri repository.

ghost

ghost commented on Jul 30, 2021

@ghost
   = note: expected mutable reference `&mut Rc<_>`
             found mutable reference `&mut Arc<CrateSource>`

That looks like a parallel_compiler issue rather than a toolstate issue.

Miezhiko

Miezhiko commented on Jul 30, 2021

@Miezhiko
Author
   = note: expected mutable reference `&mut Rc<_>`
             found mutable reference `&mut Arc<CrateSource>`

That looks like a parallel_compiler issue rather than a toolstate issue.

Okay, what is parallel_compiler? Is it related with parallel compilation (many jobs) or is it some crate?

Miezhiko

Miezhiko commented on Jul 30, 2021

@Miezhiko
Author

Sub-module hashtag for 1.54.0 tag is the same as for master at the moment https://github.com/rust-lang/rust/tree/1.54.0/src/tools

ghost

ghost commented on Jul 30, 2021

@ghost

Okay, what is parallel_compiler? Does it related with parallel rust compilation (many jobs) or is it some crate?

rust/config.toml.example

Lines 457 to 459 in 1195bea

# Build a multi-threaded rustc
# FIXME(#75760): Some UI tests fail when this option is enabled.
#parallel-compiler = false

Miezhiko

Miezhiko commented on Jul 30, 2021

@Miezhiko
Author

@hyd-dev yes I have it enabled too

changed the title [-]1.54.0 compilation fault with miri[/-] [+]1.54.0 compilation fault with miri and parallel-compiler[/+] on Jul 30, 2021
changed the title [-]1.54.0 compilation fault with miri and parallel-compiler[/-] [+]1.54.0 compilation fault with nightly, miri and parallel-compiler[/+] on Jul 30, 2021
Urgau

Urgau commented on Jul 30, 2021

@Urgau
Member

miri can be set as additional tool in tools in config.toml before build, it needs nightly flag too (I have it), yes I use official tarballs, I wonder if there is patch for it already, maybe this issue should be on miri repository.

Yes, but as I said before miri as no guarantee to build with any rust version or even master.
Because 1.54.0 was cut many weeks ago, the problem has already be fixed on master.

Sub-module hashtag for 1.54.0 tag is the same as for master at the moment https://github.com/rust-lang/rust/tree/1.54.0/src/tools

I don't know were you are looking, but it's not the case, the 1.54.0 beta-cut happen 6 weeks ago. There have been many commit since.

ghost

ghost commented on Jul 30, 2021

@ghost

the problem has already be fixed on master

I don't think Miri on master works with parallel-compiler = true. The code still uses Rc which would not be work with parallel-compiler = true:
https://github.com/rust-lang/miri/blob/453e3ef7dab5aad6450bee09b2c02de94c5b18cb/src/bin/miri.rs#L45.
I don't know whether Miri is intended to work with parallel-compiler = true or not, at least it's not tested in CI.

13 remaining items

Loading
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

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@Urgau@Mark-Simulacrum@Miezhiko

      Issue actions

        1.54.0 compilation fault with nightly, miri and parallel-compiler · Issue #87623 · rust-lang/rust