Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building error #1

Open
fearocanity opened this issue Feb 12, 2024 · 6 comments
Open

building error #1

fearocanity opened this issue Feb 12, 2024 · 6 comments
Assignees

Comments

@fearocanity
Copy link

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 bartnv self-assigned this Feb 16, 2024
@bartnv
Copy link
Owner

bartnv commented Feb 16, 2024

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
Copy link
Author

fearocanity commented Feb 17, 2024

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
Copy link
Owner

bartnv commented Feb 19, 2024

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
Copy link
Author

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
Copy link
Owner

bartnv commented Mar 2, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants