Skip to content

(E0603) "function run_compiler is private" fail during building miri #79582

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
IdrisKalp opened this issue Dec 1, 2020 · 6 comments
Closed
Labels
A-miri Area: The miri tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@IdrisKalp
Copy link

Platform: Linux x86_64
Distro: PisiLinux 2.1.2

Building rust 1.48.0 from source with existing rust installed on system or with a binary package from site, build throws this error.

Building stage1 tool miri (x86_64-unknown-linux-gnu)
   Compiling getrandom v0.2.0
   Compiling miri v0.1.0 (/var/pisi/rust-1.48.0-17/work/rustc-1.48.0-src/src/tools/miri)
error[E0603]: function `run_compiler` is private
   --> src/tools/miri/src/bin/miri.rs:160:23
    |
160 |         rustc_driver::run_compiler(&args, callbacks, None, None, None)
    |                       ^^^^^^^^^^^^ private function
    |
note: the function `run_compiler` is defined here
   --> /var/pisi/rust-1.48.0-17/work/rustc-1.48.0-src/compiler/rustc_driver/src/lib.rs:182:1
    |
182 | / fn run_compiler(
183 | |     at_args: &[String],
184 | |     callbacks: &mut (dyn Callbacks + Send),
185 | |     file_loader: Option<Box<dyn FileLoader + Send + Sync>>,
...   |
189 | |     >,
190 | | ) -> interface::Result<()> {
    | |__________________________^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0603`.
error: could not compile `miri`

But process still continues and build finishes. Is it important or am I missing something?

@jyn514
Copy link
Member

jyn514 commented Dec 1, 2020

@IdrisKalp miri is only supported on nightly (and 'supported' is not really the right word - maybe 'distributed'). Since miri is maintained out of tree, when the rustc API changes, miri won't build successfully until the submodule is updated; 1.48 happened to get released while it was broken.

I recommend using rustup + a nightly version of miri instead.

@camelid camelid added the A-miri Area: The miri tool label Dec 1, 2020
@IdrisKalp
Copy link
Author

@IdrisKalp miri is only supported on nightly (and 'supported' is not really the right word - maybe 'distributed'). Since miri is maintained out of tree, when the rustc API changes, miri won't build successfully until the submodule is updated; 1.48 happened to get released while it was broken.

I recommend using rustup + a nightly version of miri instead.

Thanks for answer. Actually I'm not a user, I'm a package maintainer at PisiLinux which is a small distribution. And because of the error above, build fails at our farm. So I want to ask is there a way to disable to build miri?

@jyn514
Copy link
Member

jyn514 commented Dec 1, 2020

How are you building currently? It should be disabled by default.

@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Dec 1, 2020
@Mark-Simulacrum
Copy link
Member

I'm going to go ahead and close this as a duplicate of #74709 -- we ideally wouldn't even try to build it, but otherwise it's totally fine to ignore this in build logs.

@IdrisKalp
Copy link
Author

With ./x.py dist

@maruel
Copy link

maruel commented Dec 11, 2020

Got this with ./x.py install with the user/maintainer profile.

boklm pushed a commit to boklm/tor-browser-build that referenced this issue Jan 22, 2021
We pick up the latest (currently) Rust stable version, 1.48.0.

miri fails to compile (even though the build succeeds) which is
okay-ish.

See:

rust-lang/rust#79582 and
rust-lang/rust#74709

for more details.

It's not clear why exactly we need to specify the host as a target now,
too. But I guess previously things just worked by chance. The correct
thing to do is to specify `x86_64-unknown-linux` as target, too, given
that we are targetting it, e.g. with `cbindgen`.

Note: we could think about specifying `--host` here too, but it seems we
can avoid that extra configure argument, see:

rust-lang/rust#76990.
waybackarchiver pushed a commit to tor-actions/tor-browser-build that referenced this issue Apr 11, 2021
We pick up the latest (currently) Rust stable version, 1.48.0.

miri fails to compile (even though the build succeeds) which is
okay-ish.

See:

rust-lang/rust#79582 and
rust-lang/rust#74709

for more details.

It's not clear why exactly we need to specify the host as a target now,
too. But I guess previously things just worked by chance. The correct
thing to do is to specify `x86_64-unknown-linux` as target, too, given
that we are targetting it, e.g. with `cbindgen`.

Note: we could think about specifying `--host` here too, but it seems we
can avoid that extra configure argument, see:

rust-lang/rust#76990.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-miri Area: The miri tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants