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

rustc panic: 'adding a def'n for node-id ... previous def'n exists #40394

Closed
jeiea opened this issue Mar 9, 2017 · 2 comments
Closed

rustc panic: 'adding a def'n for node-id ... previous def'n exists #40394

jeiea opened this issue Mar 9, 2017 · 2 comments

Comments

@jeiea
Copy link

jeiea commented Mar 9, 2017

I just tried building minhook-rs and got the following error message.

$ cargo build --verbose
       Fresh lazy_static v0.2.4
       Fresh gcc v0.3.43
       Fresh winapi v0.2.8
       Fresh winapi-build v0.1.1
       Fresh libc v0.2.21
       Fresh kernel32-sys v0.2.2
   Compiling minhook v0.1.0 (file:///D:/minhook-rs)
     Running `rustc --crate-name minhook 'src\lib.rs' --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=384f87550bb58999 -C extra-filename=-384f87550bb58999 --out-dir 'D:\minhook-rs\target\debug\deps' -L 'dependency=D:\minhook-rs\target\debug\deps' --extern 'libc=D:\minhook-rs\target\debug\deps\liblibc-5dc7b85e748840b4.rlib' --extern 'winapi=D:\minhook-rs\target\debug\deps\libwinapi-a5898d7aceb63fac.rlib' --extern 'lazy_static=D:\minhook-rs\target\debug\deps\liblazy_static-ab7caa853791a68a.rlib' --extern 'kernel32=D:\minhook-rs\target\debug\deps\libkernel32-835ed4d4f4dc2d3e.rlib' -L 'native=D:\minhook-rs\target\debug\build\minhook-ad589a5fdd12ea38\out' -l static=minhook`
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 'adding a def'n for node-id NodeId(141) and data Initializer but a previous def'n exists: DefKey { parent: Some(DefIndex(34)), disambiguated_data: DisambiguatedDefPathData { data: ValueNs("fmt"), disambiguator: 0 } }', src\librustc\hir\map\definitions.rs:337
stack backtrace:
   0: mingw_set_invalid_parameter_handler
   1: mingw_set_invalid_parameter_handler
   2: mingw_set_invalid_parameter_handler
   3: mingw_set_invalid_parameter_handler
   4: mingw_set_invalid_parameter_handler
   5: mingw_set_invalid_parameter_handler
   6: mingw_set_invalid_parameter_handler
   7: mingw_set_invalid_parameter_handler
   8: mingw_set_invalid_parameter_handler
   9: mingw_set_invalid_parameter_handler
  10: mingw_set_invalid_parameter_handler
  11: mingw_set_invalid_parameter_handler
  12: mingw_set_invalid_parameter_handler
  13: mingw_set_invalid_parameter_handler
  14: mingw_set_invalid_parameter_handler
  15: mingw_set_invalid_parameter_handler
  16: mingw_set_invalid_parameter_handler
  17: mingw_set_invalid_parameter_handler
  18: mingw_set_invalid_parameter_handler
  19: mingw_set_invalid_parameter_handler
  20: mingw_set_invalid_parameter_handler
  21: mingw_set_invalid_parameter_handler
  22: mingw_set_invalid_parameter_handler
  23: mingw_set_invalid_parameter_handler

error: Could not compile `minhook`.

Caused by:
  process didn't exit successfully: `rustc --crate-name minhook src\lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=384f87550bb58999 -C extra-filename=-384f87550bb58999 --out-dir D:\minhook-rs\target\debug\deps -L dependency=D:\minhook-rs\target\debug\deps --extern libc=D:\minhook-rs\target\debug\deps\liblibc-5dc7b85e748840b4.rlib --extern winapi=D:\minhook-rs\target\debug\deps\libwinapi-a5898d7aceb63fac.rlib --extern lazy_static=D:\minhook-rs\target\debug\deps\liblazy_static-ab7caa853791a68a.rlib --extern kernel32=D:\minhook-rs\target\debug\deps\libkernel32-835ed4d4f4dc2d3e.rlib -L native=D:\minhook-rs\target\debug\build\minhook-ad589a5fdd12ea38\out -l static=minhook` (exit code: 101)
$ rustc --version --verbose
rustc 1.17.0-nightly (b1e31766d 2017-03-03)
binary: rustc
commit-hash: b1e31766da75b188062c59f38cd6e8544b902afd
commit-date: 2017-03-03
host: x86_64-pc-windows-gnu
release: 1.17.0-nightly
LLVM version: 3.9

I used mingw64 of msys2.

@TimNN
Copy link
Contributor

TimNN commented Mar 9, 2017

Duplicate of #40136, should be fixed by #40272 which will be available in the next nightly.

@jeiea
Copy link
Author

jeiea commented Mar 10, 2017

I checked it has no problem with master branch. Close this.

@jeiea jeiea closed this as completed Mar 10, 2017
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

2 participants