overdrivenpotato / rust-psp

Rust on PSP. Panic and allocation support. Access PSP system libraries.
Other
588 stars 31 forks source link

can't build any program #154

Closed cofeek-codes closed 9 months ago

cofeek-codes commented 9 months ago

situation is like #151, but another error


cargo psp
    Blocking waiting for file lock on package cache
   Compiling psp v0.3.6 (/home/cofeek/Desktop/codes/rustlang/rust-psp/psp)
error[E0432]: unresolved import `core::panic::BoxMeUp`
  --> /home/cofeek/Desktop/codes/rustlang/rust-psp/psp/src/panic.rs:15:13
   |
15 |     panic::{BoxMeUp, Location, PanicInfo},
   |             ^^^^^^^ no `BoxMeUp` in `panic`

warning: the feature `lang_items` is internal to the compiler or standard library
  --> /home/cofeek/Desktop/codes/rustlang/rust-psp/psp/src/lib.rs:10:5
   |
10 |     lang_items
   |     ^^^^^^^^^^
   |
   = note: using it is strongly discouraged
   = note: `#[warn(internal_features)]` on by default

For more information about this error, try `rustc --explain E0432`.
warning: `psp` (lib) generated 1 warning
error: could not compile `psp` (lib) due to previous error; 1 warning emitted
`cargo build` command exited with status: ExitStatus(unix_wait_status(25856))

Compilation exited abnormally with code 101 at Sat Sep 23 22:40:16
hatmajster commented 9 months ago

Also see this. To reproduce:

cargo init demo
cd demo
cargo add psp
cargo psp
hatmajster commented 9 months ago

Downgrading psp to 0.3.5 and using rust nightly-2023-08-01 is a workaround for me

rustup default nightly-2023-08-01
rustup component add rust-src --toolchain nightly-2023-08-01-x86_64-unknown-linux-gnu

If I may digress as much as I really like rust as I learn it, the requirement of this nightly compilers in almost every package I use is very annoying. But I understand its a price of cutting edge:/ Good thing I am able to somehow easily go back at least.

zetanumbers commented 9 months ago

Should be solved by #155

zetanumbers commented 9 months ago

Downgrading psp to 0.3.5 and using rust nightly-2023-08-01 is a workaround for me

Next time you can use toolchain that is specified in README.md on line 59.

If I may digress as much as I really like rust as I learn it, the requirement of this nightly compilers in almost every package I use is very annoying. But I understand its a price of cutting edge:/ Good thing I am able to somehow easily go back at least.

Sorry, i'll look into reducing nighlty features or gate them under cargo features. However please understand that there's no way yet not to use unstable features, just because of -Zbuild-std.

hatmajster commented 9 months ago

Next time you can use toolchain that is specified in README.md on line 59.

I knew it was stated somewhere;)

Sorry, i'll look into reducing nighlty features or gate them under cargo features.

No, please don't, this was just my general rant about rust reality. There are magnitude of packages that don't do anything special like math or whatever and suddenly use some nightly unstable features just because someone wanted to be smart or cool. It's annoying because you can't be sure to use it in a real production environment. However, this is a rather hacky and complex solution to really niche and fun problem, and I really appreciate the great work. As its still work in progress, I don't think it will help the project at all. Probably when its completed it would be great to reduce dependency on nightly, but not yet. Introducing feature gates will only complicate things i think... And besides, rust-psp is rather a base-level library it doesn't hurt much to use unstable rust with it. Its other libraries that should minimize unstable stuff...