orhun / binsider

Analyze ELF binaries like a boss 😼🕵️‍♂️
https://binsider.dev/
Apache License 2.0
2.76k stars 61 forks source link

unresolved import `libc::user_regs_struct` #57

Closed Martinfx closed 1 month ago

Martinfx commented 1 month ago

Hi, i tried build this project on FreeBSD amd64

FreeBSD hades 13.3-RELEASE-p6 FreeBSD 13.3-RELEASE-p6 GENERIC amd64 cargo 1.80.0-nightly (05364cb2f 2024-05-03)

Describe the bug

cargo build
   Compiling lurk-cli v0.3.8
error[E0432]: unresolved import `libc::user_regs_struct`
 --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/arch/mod.rs:3:33
  |
3 | use libc::{c_long, c_ulonglong, user_regs_struct};
  |                                 ^^^^^^^^^^^^^^^^ no `user_regs_struct` in the root

error[E0432]: unresolved import `nix::sys::ptrace::Options`
 --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/arch/mod.rs:5:5
  |
5 | use nix::sys::ptrace::Options;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `Options` in `sys::ptrace`

error[E0432]: unresolved import `libc::user_regs_struct`
 --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/arch/x86_64.rs:2:25
  |
2 | use libc::{c_ulonglong, user_regs_struct};
  |                         ^^^^^^^^^^^^^^^^ no `user_regs_struct` in the root
  |
  = help: consider importing this unresolved item through its public re-export instead:
          crate::arch::user_regs_struct

error[E0432]: unresolved import `libc::user_regs_struct`
 --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/syscall_info.rs:3:25
  |
3 | use libc::{c_ulonglong, user_regs_struct};
  |                         ^^^^^^^^^^^^^^^^ no `user_regs_struct` in the root

error[E0432]: unresolved import `libc::user_regs_struct`
  --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/lib.rs:77:5
   |
77 | use libc::user_regs_struct;
   |     ^^^^^^^^^^^^^^^^^^^^^^ no `user_regs_struct` in the root

error[E0432]: unresolved imports `linux_personality::personality`, `linux_personality::ADDR_NO_RANDOMIZE`
  --> /home/maxfx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lurk-cli-0.3.8/src/lib.rs:78:25
   |
78 | use linux_personality::{personality, ADDR_NO_RANDOMIZE};
   |                         ^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^ no `ADDR_NO_RANDOMIZE` in the root
   |                         |
   |                         no `personality` in the root
   |

To reproduce

  1. Cargo build
orhun commented 1 month ago

duplicate see #56