Skip to content
New issue

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

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

Already on GitHub? # to your account

Core_Libs build fails on compling sys_metrics (Alpine/PostmarketOS | ARCH=aarch64 | glibc=musl) #250

Closed
etihwjd opened this issue Dec 9, 2024 · 4 comments

Comments

@etihwjd
Copy link

etihwjd commented Dec 9, 2024

I was trying to build this for my tablet as there isn't a pre-compiled package for Alpine/PMOS. The build (somewhat unsurprisingly) fell at the error below. I don't know if this is a problem with the glibc -> musl conversion, if it's an issue with the crate itself, or a problem between the chair and keyboard!

error[E0425]: cannot find value `USER_PROCESS` in crate `libc`
---> /home/xan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sys_metrics-0.2.7/src/host/sys/linux/users.rs:31:54
     |
31   |         if cuser[0] != 0 && cbuffer.ut_type == libc::USER_PROCESS {
     |                                                ^^^^^^^^^^^^ help: a constant with a similar name exists: `PRIO_PROCESS`
     |
    :::  /home/xan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/linux_like/linux/musl/mod.rs:727:1
     |
727  | pub const PRIO_PROCESS: ::c_int = 0;
     | ------------------------------- similarly named constant `PRIO_PROCESS` defined here
 
    Compiling mdns-sd v0.10.4 (https://github.com/Martichou/mdns-sd?branch=unsolicited#c3d6ec2e)
 For more information about this error, try `rustc --explain E0425`.
 error: could not compile `sys_metrics` (lib) due to 1 previous error

I don't have any rust/programming experience (I'm a healthcare professional! 👍 ), but I'm happy to have my handheld to help squish any bugs!

@Martichou
Copy link
Owner

What is your Rust target? (rustup target list)

@etihwjd
Copy link
Author

etihwjd commented Dec 10, 2024

Hi Martin, apologies for the delay. The output of rustup shownon-priviledged is:

Default host: aarch64-unknown-linux-musl
rustup home:  ~/.rustup

stable-aarch64-unknown-linux-musl (default)
rustc 1.83.0 (90b35a623 2024-11-26)

Running the same command as root (sudo) is:

Default host: aarch64-unknown-linux-musl
rustup home:  /root/.rustup

stable-aarch64-unknown-linux-musl (default)
rustc 1.83.0 (90b35a623 2024-11-26)

@Martichou
Copy link
Owner

Just fixed the issue you reported, if you face another one, feel free to comment here and I'll reopen :)

@etihwjd
Copy link
Author

etihwjd commented Dec 19, 2024 via email

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

No branches or pull requests

2 participants