overdrivenpotato / rust-psp

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

Problem with rust-lld #116

Closed MrCesar107 closed 2 years ago

MrCesar107 commented 2 years ago

Hello there.

When I try to compile with cargo psp I get stuck on this error

error: linking with `rust-lld` failed: exit status: 1
= note: rust-lld: error: undefined symbol: strlen
          >>> referenced by c_str.rs:408 (src/ffi/c_str.rs:408)
          >>>               alloc-65f2e8dec69d54dc.alloc.1e0b9b8f-cgu.6.rcgu.o:(alloc::ffi::c_str::CString::from_raw::hf8e528a7891a1756) in archive /Users/mrcesar107/Documents/psp-dev/rust/target/mipsel-sony-psp/debug/deps/liballoc-65f2e8dec69d54dc.rlib

I'm trying to use it in a mac with m1 chip and also with a linux x64 computer

I'll appreciate a lot if anyone can help me with this problem. Thank you ;)

diamant3 commented 2 years ago

same issue, i'm using windows x64 ryzen 3

PS C:\Users\diamant3\Desktop\rust-psp-controller\psp-controller> cargo psp
   Compiling psp-controller v0.1.0 (C:\Users\diamant3\Desktop\rust-psp-controller\psp-controller)
error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "gnu" "--emit-relocs" "C:\\Users\\diamant3\\AppData\\Local\\Temp\\rustcRkcUrH\\symbols.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.1gc0ftx74v41ozp3.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.2sijscnsq4h7lb6k.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.34lodsrd92axvci8.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.36v9jv55s0xah1w1.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.3kme5kfc246n4nv3.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.3z6ndfepyhsj4y1z.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.4j0drg9ac7253i5u.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.4p7hl621m1hv24di.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.4rm8g0ty594cj513.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.4s9z3au9x0oyiqwi.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.4w1fggg6inp8j3eo.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.5302iox0z4sugrmm.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.bqk59ls32q8mb2b.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.dqtmyyy8vmav5rg.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.htq8mlj4wdsbysh.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.pmr8o45dmezyrye.rcgu.o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266.rjpde0t8ducf132.rcgu.o" "--as-needed" "-L" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps" "-L" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\debug\\deps" "-L" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\build\\psp-484627b85d9c7058\\out" "-L" "C:\\Users\\diamant3\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\mipsel-sony-psp\\lib" "--start-group" "-Bstatic" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libpsp-cf3d6d7a0d99006c.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libbitflags-f65c9e34270b295d.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libnum_enum-9d115b7905a527a8.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libpanic_unwind-ba05bc5903be911b.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libunwind-0a2771cc7255a48a.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\liblibc-0e65b27b5ebe8c4c.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libcfg_if-e138785267ba0b60.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\liballoc-f798fe47d3dc43b0.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libpaste-c448f7d1ebcb0f94.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\librustc_std_workspace_core-8b48471c592764ef.rlib" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libcore-cb121d7c83a2097c.rlib" "--end-group" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\libcompiler_builtins-ece5444b323d432f.rlib" "-Bdynamic" "--script" "C:\\Users\\diamant3\\AppData\\Local\\Temp\\rustcRkcUrH\\rustc-mipsel-sony-psp-linkfile.ld" "--eh-frame-hdr" "-znoexecstack" "-L" "C:\\Users\\diamant3\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\mipsel-sony-psp\\lib" "-o" "C:\\Users\\diamant3\\Desktop\\rust-psp-controller\\psp-controller\\target\\mipsel-sony-psp\\debug\\deps\\psp_controller-66385f3228f69266" "-O1"
  = note: rust-lld: error: undefined symbol: strlen
          >>> referenced by c_str.rs:408 (src\ffi\c_str.rs:408)
          >>>               alloc-f798fe47d3dc43b0.alloc.ac21a3fe-cgu.6.rcgu.o:(alloc::ffi::c_str::CString::from_raw::hea710123b1e37e35) in archive C:\Users\diamant3\Desktop\rust-psp-controller\psp-controller\target\mipsel-sony-psp\debug\deps\liballoc-f798fe47d3dc43b0.rlib     

error: could not compile `psp-controller` due to previous error
overdrivenpotato commented 2 years ago

I just published psp = "0.2.2", this should fix the issue.

diamant3 commented 2 years ago

its fixed to me, thanks

MrCesar107 commented 2 years ago

Thank you for responding. I have fixed the promblem also with @overdrivenpotato comment. I'll mark this issue as resolved.