Closed randomshinichi closed 2 years ago
Did you cargo build
or cargo psp
?
cargo psp
This is odd, the same toolchain version works on linux for me. Maybe the lld version is off, or perhaps you have conflicting rust-lld
s somehow. Can you run the following from the hello-world
directory:
rustc --print sysroot
And then also, to check the rust-lld
version:
cd ~/.rustup/toolchains/nightly-2021-12-05-x86_64-unknown-linux-gnu/lib
LD_LIBRARY_PATH=. ./rustlib/x86_64-unknown-linux-gnu/bin/rust-lld -flavor gnu -v
shinichi@asuka:~/source/rust-psp/examples/rust-std-hello-world[master] rustc --print sysroot
/home/shinichi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
shinichi@asuka:~/source/rust-psp/examples/rust-std-hello-world[master] cd ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib
shinichi@asuka:~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib LD_LIBRARY_PATH=. ./rustlib/x86_64-unknown-linux-gnu/bin/rust-ll
rust-lld rust-llvm-dwp
shinichi@asuka:~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib LD_LIBRARY_PATH=. ./rustlib/x86_64-unknown-linux-gnu/bin/rust-lld -flavor gnu -v
LLD 13.0.0 (compatible with GNU linkers)
Today I tried to run cargo psp
again, for some reason it wanted to recompile rust-psp. Then it seems every macro doesn't work...
error: cannot find macro `concat` in this scope
--> /home/shinichi/source/rust-psp/psp/src/sys/macros.rs:176:25
|
176 | concat!(
| ^^^^^^
|
::: /home/shinichi/source/rust-psp/psp/src/sys/display.rs:38:1
|
38 | / psp_extern! {
39 | | #![name = "sceDisplay"]
40 | | #![flags = 0x4001]
41 | | #![version = (0, 0)]
... |
145 | | pub fn sceDisplayIsVblank() -> i32;
146 | | }
| |_- in this macro invocation
|
= note: consider importing this macro:
core::concat
= note: this error originates in the macro `psp_extern` (in Nightly builds, run with -Z macro-backtrace for more info)
Maybe my rustup toolchain is completely broken and I should reinstall everything?
Could be. Try this in the hello-world
directory:
cargo uninstall cargo-psp
rustup toolchain uninstall nightly
rustup toolchain install --profile default nightly
rustup override set nightly
rustup component add rust-src
cargo install cargo-psp
cargo clean
cargo psp
Are you trying to use std? That isn't ready/recommended at this time.
Was this resolved on your end, or possibly by one of the new library versions? I'll keep the issue open if it's still causing trouble.
I'm assuming this has been fixed with a toolchain update, as I cannot reproduce this. Feel free to re-open this issue if it is still causing problems.
Fresh install, was looking to get started homebrewing somewhere. I still have a PSP, but what sold the deal was the incredible integration into Rust! Just like developing a normal Rust program.
Compiling the hello world example, however, failed with this.
Environment:
Error