Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

error[E0433]: failed to resolve: could not find Kind in subst #968

Closed
ghost opened this issue Sep 28, 2019 · 4 comments
Closed

error[E0433]: failed to resolve: could not find Kind in subst #968

ghost opened this issue Sep 28, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Sep 28, 2019

Trying to compile rust master but failing at miri:

     Running `/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/bootstrap/debug/rustc --edition=2018 --crate-name miri src/tools/miri/src/lib.rs --error-format json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C codegen-units=1 -C debuginfo=2 --cfg 'feature="cargo_metadata"' --cfg 'feature="cargo_miri"' --cfg 'feature="default"' --cfg 'feature="directories"' --cfg 'feature="rustc_version"' -C metadata=960a1e56b2c1e818 -C extra-filename=-960a1e56b2c1e818 --out-dir /home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps --extern byteorder=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libbyteorder-5c9cb1f063b0c860.rmeta --extern cargo_metadata=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_metadata-969e7e8b15a1f4f1.rmeta --extern directories=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libdirectories-5c32671ebf694930.rmeta --extern env_logger=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libenv_logger-2fa5d38beb13112d.rmeta --extern getrandom=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libgetrandom-620b152c914e4da1.rmeta --extern hex=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libhex-92c211e267b8806d.rmeta --extern log=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblog-b4b38e6cd472bf04.rmeta --extern num_traits=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libnum_traits-06d72f7cb90df805.rmeta --extern rand=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librand-c8797b447dc11fe1.rmeta --extern rustc_workspace_hack=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_workspace_hack-89619ba16b2748b8.rmeta --extern rustc_version=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_version-2f02f3fe9cbcc2b3.rmeta --extern shell_escape=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libshell_escape-84d7930dd0d0f604.rmeta -Zexternal-macro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zbinary-dep-depinfo -L native=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/backtrace-sys-56f962144e7b44a4/out`
rustc command: "LD_LIBRARY_PATH"="/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib:/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps:/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib" "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--edition=2018" "--crate-name" "miri" "src/tools/miri/src/lib.rs" "--error-format" "json" "--json=diagnostic-rendered-ansi" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=2" "-C" "codegen-units=1" "-C" "debuginfo=2" "--cfg" "feature=\"cargo_metadata\"" "--cfg" "feature=\"cargo_miri\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"directories\"" "--cfg" "feature=\"rustc_version\"" "-C" "metadata=960a1e56b2c1e818" "-C" "extra-filename=-960a1e56b2c1e818" "--out-dir" "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--target" "x86_64-unknown-linux-gnu" "-C" "incremental=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/incremental" "-L" "dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--extern" "byteorder=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libbyteorder-5c9cb1f063b0c860.rmeta" "--extern" "cargo_metadata=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_metadata-969e7e8b15a1f4f1.rmeta" "--extern" "directories=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libdirectories-5c32671ebf694930.rmeta" "--extern" "env_logger=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libenv_logger-2fa5d38beb13112d.rmeta" "--extern" "getrandom=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libgetrandom-620b152c914e4da1.rmeta" "--extern" "hex=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libhex-92c211e267b8806d.rmeta" "--extern" "log=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblog-b4b38e6cd472bf04.rmeta" "--extern" "num_traits=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libnum_traits-06d72f7cb90df805.rmeta" "--extern" "rand=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librand-c8797b447dc11fe1.rmeta" "--extern" "rustc_workspace_hack=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_workspace_hack-89619ba16b2748b8.rmeta" "--extern" "rustc_version=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_version-2f02f3fe9cbcc2b3.rmeta" "--extern" "shell_escape=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libshell_escape-84d7930dd0d0f604.rmeta" "-Zexternal-macro-backtrace" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zbinary-dep-depinfo" "-L" "native=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/backtrace-sys-56f962144e7b44a4/out" "--sysroot" "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2" "-C" "debug-assertions=n"
sysroot: "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2"
libdir: "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib"
error[E0433]: failed to resolve: could not find `Kind` in `subst`
  --> src/tools/miri/src/eval.rs:66:42
   |
66 |             ::std::iter::once(ty::subst::Kind::from(main_ret_ty)))
   |                                          ^^^^ could not find `Kind` in `subst`

error[E0609]: no field `sty` on type `&rustc::ty::TyS<'_>`
   --> src/tools/miri/src/stacked_borrows.rs:619:22
    |
619 |             match ty.sty {
    |                      ^^^

error[E0609]: no field `sty` on type `&'tcx rustc::ty::TyS<'tcx>`
   --> src/tools/miri/src/helpers.rs:214:56
    |
214 |                 let is_unsafe_cell = match v.layout.ty.sty {
    |                                                        ^^^

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0433, E0609.
For more information about an error, try `rustc --explain E0433`.
[RUSTC-TIMING] miri test:false 5.273
error: could not compile `miri`.

Caused by:
  process didn't exit successfully: `/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/bootstrap/debug/rustc --edition=2018 --crate-name miri src/tools/miri/src/lib.rs --error-format json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C codegen-units=1 -C debuginfo=2 --cfg 'feature="cargo_metadata"' --cfg 'feature="cargo_miri"' --cfg 'feature="default"' --cfg 'feature="directories"' --cfg 'feature="rustc_version"' -C metadata=960a1e56b2c1e818 -C extra-filename=-960a1e56b2c1e818 --out-dir /home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C incremental=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/incremental -L dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps --extern byteorder=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libbyteorder-5c9cb1f063b0c860.rmeta --extern cargo_metadata=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libcargo_metadata-969e7e8b15a1f4f1.rmeta --extern directories=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libdirectories-5c32671ebf694930.rmeta --extern env_logger=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libenv_logger-2fa5d38beb13112d.rmeta --extern getrandom=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libgetrandom-620b152c914e4da1.rmeta --extern hex=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libhex-92c211e267b8806d.rmeta --extern log=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblog-b4b38e6cd472bf04.rmeta --extern num_traits=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libnum_traits-06d72f7cb90df805.rmeta --extern rand=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librand-c8797b447dc11fe1.rmeta --extern rustc_workspace_hack=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_workspace_hack-89619ba16b2748b8.rmeta --extern rustc_version=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/librustc_version-2f02f3fe9cbcc2b3.rmeta --extern shell_escape=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libshell_escape-84d7930dd0d0f604.rmeta -Zexternal-macro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zbinary-dep-depinfo -L native=/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/backtrace-sys-56f962144e7b44a4/out` (exit code: 1)
command did not execute successfully: "/home/user/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "-v" "--release" "--manifest-path" "/home/user/build/2nonpkgs/rust.stuff/rust/rust/src/tools/miri/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "./x.py", line 11, in <module>
    bootstrap.main()
  File "/home/user/build/2nonpkgs/rust.stuff/rust/rust/src/bootstrap/bootstrap.py", line 900, in main
    bootstrap(help_triggered)
  File "/home/user/build/2nonpkgs/rust.stuff/rust/rust/src/bootstrap/bootstrap.py", line 886, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/home/user/build/2nonpkgs/rust.stuff/rust/rust/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /home/user/build/2nonpkgs/rust.stuff/rust/rust/build/bootstrap/debug/bootstrap build -vv -j 4

real	36m34.487s
user	108m44.916s
sys	1m50.150s

Compile(failed?:1) took 2194 secs aka 36 minutes 34 seconds. date='Sat 28 Sep 2019 08:05:47 PM CEST'
Cleaning up

^ nproc='4' /proc/loadavg='5.21 5.26 4.96 1/481 1363993' /proc/cmdline='BOOT_IMAGE=/boot/vmlinuz-linux-stable root=UUID=274eb529-31f7-4bd2-8a48-950fb86ae385 rw root_trim=yes rd.luks.allow-discards rd.luks.options=discard ipv6.disable=1 ipv6.disable_ipv6=1 ipv6.autoconf=0 loglevel=15 log_buf_len=16M ignore_loglevel printk.always_kmsg_dump=y printk.time=y printk.devkmsg=on mminit_loglevel=4 memory_corruption_check=1 fbcon=scrollback:4096k fbcon=font:ProFont6x11 net.ifnames=0 nolvm dobtrfs console=tty1 earlyprintk=vga audit=0 systemd.log_target=kmsg systemd.journald.forward_to_console=1 enforcing=0 udev.children-max=1256 rd.udev.children-max=1256 nohz=on oops=panic crashkernel=256M panic=0 page_poison=1 psi=1 sysrq_always_enabled random.trust_cpu=off logo.nologo lpj=0 mce=bootlog reboot=force,cold noexec=on nohibernate scsi_mod.use_blk_mq=1 consoleblank=120 mitigations=off nospectre_v1 nospectre_v2 spectre_v2=off nospec_store_bypass_disable kvm-intel.vmentry_l1d_flush=never l1tf=off nopti pti=off no_stf_barrier noibrs noibpb ssbd=force-off spectre_v2_user=off noretpoline mds=off rd.log=all noefi cpuidle.governor=menu zram.num_devices=3 zswap.enabled=0 zswap.same_filled_pages_enabled=1 zswap.compressor=zstd zswap.max_pool_percent=40 zswap.zpool=z3fold vsyscall=none acpi_backlight=vendor CPUunderclocking tsc=unstable radeon.audio=0 radeon.lockup_timeout=999000 radeon.test=0 radeon.agpmode=-1 radeon.benchmark=0 radeon.tv=0 radeon.hard_reset=1 radeon.msi=1 radeon.pcie_gen2=-1 radeon.no_wb=1 radeon.dynclks=0 radeon.r4xx_atom=0 radeonfb radeon.fastfb=1 radeon.dpm=1 radeon.runpm=1 radeon.modeset=1 radeon.aspm=0 pcie_aspm=off rcu_nocbs=1-3'
-----
$ git submodule status src/tools/miri
 130f9488d3b861e02c9282b686eec717e30912cf src/tools/miri (heads/master-70-g130f9488)
@ghost
Copy link
Author

ghost commented Sep 28, 2019

updating miri to latest miri master doesn't fix it, but here's how I did it:

in pwd /home/user/build/2nonpkgs/rust.stuff/rust/rust 

$ git submodule status src/tools/miri
 130f9488d3b861e02c9282b686eec717e30912cf src/tools/miri (heads/master-70-g130f9488)

$ git update-index --cacheinfo 160000,918a9afe1040f17c845d5d4364eea71c70f0be57,src/tools/miri

$ git submodule status src/tools/miri
+130f9488d3b861e02c9282b686eec717e30912cf src/tools/miri (heads/master-70-g130f9488)

EDIT: hmmm, that updating-to-latest didn't seem to work... investigating
EDIT2: Right, I forgot to do:
$ git submodule update --init --recursive --progress
so now it's updated correctly:

$ git submodule status src/tools/miri
 918a9afe1040f17c845d5d4364eea71c70f0be57 src/tools/miri (remotes/origin/HEAD)

compiling... will update when done

@ghost
Copy link
Author

ghost commented Sep 28, 2019

updating miri to latest miri master does fix it

@ghost ghost closed this as completed Sep 28, 2019
@ghost
Copy link
Author

ghost commented Sep 28, 2019

it was fixed by 28e814a

@RalfJung
Copy link
Member

Right, Miri master should work but the submodule has not been updated yet.

Cc rust-lang/rust#64798

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant