Artemis21 / ptrace-inject

Shared library injection for *nix using ptrace, in Rust.
13 stars 2 forks source link

build fail for android #2

Open yujack008 opened 4 months ago

yujack008 commented 4 months ago
PS D:\notes\Projects\ptrace-inject> cargo build --target aarch64-linux-android --features cli Compiling ptrace-inject v0.1.2 (D:\notes\Projects\ptrace-inject) error[E0412]: cannot find type Registers in crate pete
--> src\injection.rs:21:28
21 saved_registers: pete::Registers, ^^^^^^^^^ not found in pete
note: found an item that was configured out --> E:\Rust.cargo\registry\src\index.crates.io-6f17d22bba15001f\pete-0.9.0\src\lib.rs:34:18 34 pub use ptracer::Registers; ^^^^^^^^^ = note: the item is gated behind the x86_64 feature help: consider importing this type alias
1 + use pete::ptracer::Registers; help: if you import Registers, refer to it directly

21 - saved_registers: pete::Registers, 21 + saved_registers: Registers, |

error[E0422]: cannot find struct, variant or union type Registers in crate pete --> src\injection.rs:147:34 147 .set_registers(pete::Registers { ^^^^^^^^^ not found in pete
note: found an item that was configured out --> E:\Rust.cargo\registry\src\index.crates.io-6f17d22bba15001f\pete-0.9.0\src\lib.rs:34:18 34 pub use ptracer::Registers; ^^^^^^^^^ = note: the item is gated behind the x86_64 feature help: consider importing this type alias
1 + use pete::ptracer::Registers; help: if you import Registers, refer to it directly

147 - .set_registers(pete::Registers { 147 + .set_registers(Registers { |

error[E0609]: no field rax on type user_pt_regs --> src\injection.rs:169:14 169 .rax; ^^^ unknown field
= note: available fields are: `regs`, `sp`, `pc`, `pstate`
error[E0609]: no field rip on type user_pt_regs --> src\injection.rs:194:59 194 let rip = tracee.registers().unwrap().rip; ^^^ unknown field
= note: available fields are: `regs`, `sp`, `pc`, `pstate`

Some errors have detailed explanations: E0412, E0422, E0609. For more information about an error, try rustc --explain E0412. error: could not compile ptrace-inject (lib) due to 4 previous errors

Artemis21 commented 4 months ago

Hi, thanks for the report. Currently, only x86_64 processors are supported -- it looks like you might be trying to build for a different processor architecture?