Switching to stable-gnu toolchain causes build issues

In regards to this post where I was having issues with gdb,

I found this article:
https://stackoverflow.com/questions/45822612/gdb-doesnt-find-debugging-symbols-in-rust-executable

So I switched the default tool change to stable-gnu

So with complete fresh new projects I can build just fine and get gdb to work with it, but with older projects it will not build and I would get this error:

 process didn't exit successfully: `C:\Users\Joe\Desktop\Testing\project\target\debug\build\project-16cedd632aa89860\build-script-build` (exit code: 1)
  --- stdout
  package.metadata does not exist

  --- stderr
  Error: Error { kind: NotFound, message: "program not found" }

Any ideas why this is happening?

It looks like the build script for the project crate is trying to start a program and failing because it isn't available. Because the error message doesn't say what wasn't found, you'll need to look through the source code and figure it out for yourself.

If they are using anyhow for error handling, you might be lucky and get a backtrace pointing at the offending line when you set the RUST_BACKTRACE environment variable.

I was using hte default toolchain but I switched to this and now I get this error so I am not sure how to fix it?

I was considering using x86_64-pc-windows-gnu instead, but using rustup to install it doesn't work with this error message:

warning: (partial) target triple specified instead of toolchain name
error: no candidate toolchains found
error: toolchain 'x86_64-pc-windows-gnu' is not installed

Any idea how to install this toolchain then?

OK removed build.rs and it is fine with the new target.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.