bartnv / proxymuxer

Multiplex a single SOCKS5 proxy into multiple SSH tunnels
4 stars 1 forks source link

building error #1

Open fearocanity opened 9 months ago

fearocanity commented 9 months ago

I got an error while building.

error[E0425]: cannot find function `set_name` in crate `prctl`
   --> src/main.rs:258:14
    |
258 |       prctl::set_name(&format!("Server {}", server.id)).expect("Failed to set p...
    |              ^^^^^^^^ not found in `prctl`

error[E0425]: cannot find function `set_name` in crate `prctl`
   --> src/main.rs:507:18
    |
507 | ...   prctl::set_name(&format!("Rule {}", rule.rule)).expect("Failed to set pro...
    |              ^^^^^^^^ not found in `prctl`

error[E0425]: cannot find function `set_name` in crate `prctl`
   --> src/main.rs:518:16
    |
518 | ...   prctl::set_name(&format!("Hash {}", hashhost)).expect("Failed to set proc...
    |              ^^^^^^^^ not found in `prctl`

error[E0425]: cannot find function `set_name` in crate `prctl`
   --> src/main.rs:721:16
    |
721 |         prctl::set_name("Reader").expect("Failed to set process name");
    |                ^^^^^^^^ not found in `prctl`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `proxymuxer` (bin "proxymuxer") due to 4 previous errors
bartnv commented 9 months ago

I'm not quite sure how you get this error. The prctl crate hasn't changed in years and most definitely has a set_name function. Are you compiling on Linux? I don't think other platforms have an equivalent to set_name.

fearocanity commented 9 months ago

I'm not quite sure how you get this error. The prctl crate hasn't changed in years and most definitely has a set_name function. Are you compiling on Linux? I don't think other platforms have an equivalent to set_name.

I'm specifically building it in Termux (I haven't tried on my actual linux ones since i'm specifically using this tool on android for some testings). I have tried reinstalling proxymuxer, i have still no dice. (Btw i'm new to rust, 'so sorry for trouble) 20240217_103157

The prctl package installed came from https://github.com/rust-lang/crates.io-index#prctl@1.0.0.

bartnv commented 9 months ago

The prctl crate probably doesn't have bindings for your target architecture. I should make the set_name calls conditional, since they are just eye-candy anyway. Can you run cargo version -v please so I can see what architecture Termux reports?

fearocanity commented 9 months ago

The prctl crate probably doesn't have bindings for your target architecture. I should make the set_name calls conditional, since they are just eye-candy anyway. Can you run cargo version -v please so I can see what architecture Termux reports?

I got:

cargo 1.75.0
release: 1.75.0
host: aarch64-linux-android
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/3.1.4)
os: Android [unknown bitness]
bartnv commented 9 months ago

I've pushed a new version which switches prctl handling to the nix crate. This may work better for you. Would you mind testing and reporting back please?

fearocanity commented 9 months ago

I've pushed a new version which switches prctl handling to the nix crate. This may work better for you. Would you mind testing and reporting back please?

Sure, I tried it. But it gives an error again. 20240303_080146