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

Compile error: definition of unknown language item `panic_fmt` #2

Closed
trainman419 opened this Issue Jun 15, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@trainman419
Contributor

trainman419 commented Jun 15, 2018

According to https://users.rust-lang.org/t/psa-breaking-change-panic-fmt-language-item-removed-in-favor-of-panic-implementation/17875 , panic_fmt has been changed to panic_implementation. It looks like this is causing a compilation error in this crate:

error[E0522]: definition of an unknown language item: `panic_fmt`
 --> /home/austin/.cargo/registry/src/github.com-1ecc6299db9ec823/msp430-rt-0.1.2/src/lang_items.rs:3:1
  |
3 | #[lang = "panic_fmt"]
  | ^^^^^^^^^^^^^^^^^^^^^ definition of unknown language item `panic_fmt`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0522`.
error: Could not compile `msp430-rt`.

I'm actively playing with this, so I may try to provide a pull request if I can figure out how to fix it.

@trainman419

This comment has been minimized.

Show comment
Hide comment
@trainman419

trainman419 Jun 15, 2018

Contributor

I'm attempting to fix this, but it seems like something is not quite right. With the changes in master...trainman419:master , I'm getting:

error: language item required, but not found: `panic_impl`

error: aborting due to previous error

error: Could not compile `msp430-quickstart`.
Contributor

trainman419 commented Jun 15, 2018

I'm attempting to fix this, but it seems like something is not quite right. With the changes in master...trainman419:master , I'm getting:

error: language item required, but not found: `panic_impl`

error: aborting due to previous error

error: Could not compile `msp430-quickstart`.
@pftbest

This comment has been minimized.

Show comment
Hide comment
@pftbest

pftbest Jun 15, 2018

Collaborator

@trainman419 probably the device crate is pulling in an older version of msp430-rt so you get this error.

Collaborator

pftbest commented Jun 15, 2018

@trainman419 probably the device crate is pulling in an older version of msp430-rt so you get this error.

@pftbest

This comment has been minimized.

Show comment
Hide comment
@pftbest

pftbest Jun 16, 2018

Collaborator

the proper fix would be to remove all the panic stuff from this crate completely and just create a new crate named panic-loop or something, similar to panic-abort and panic-semihosting crates

Collaborator

pftbest commented Jun 16, 2018

the proper fix would be to remove all the panic stuff from this crate completely and just create a new crate named panic-loop or something, similar to panic-abort and panic-semihosting crates

@trainman419

This comment has been minimized.

Show comment
Hide comment
@trainman419

trainman419 Jun 16, 2018

Contributor

Sorry; I'm still a bit of a Rust noob. I updated the Cargo.toml to override the msp430-rt dep from crates.io, and my patches to msp430-rt work now!

Since the panic function is calling msp430-specific functions, it would probably need to be an msp430-panic-loop crate or something similar.

Contributor

trainman419 commented Jun 16, 2018

Sorry; I'm still a bit of a Rust noob. I updated the Cargo.toml to override the msp430-rt dep from crates.io, and my patches to msp430-rt work now!

Since the panic function is calling msp430-specific functions, it would probably need to be an msp430-panic-loop crate or something similar.

@trainman419

This comment has been minimized.

Show comment
Hide comment
@trainman419

trainman419 Jun 16, 2018

Contributor

Submitted my changes as: #3

Contributor

trainman419 commented Jun 16, 2018

Submitted my changes as: #3

@pftbest

This comment has been minimized.

Show comment
Hide comment
@pftbest

pftbest Jun 18, 2018

Collaborator

Thank you

Collaborator

pftbest commented Jun 18, 2018

Thank you

@pftbest pftbest closed this Jun 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment