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

no method named si_pid found for struct siginfo_t for armv7-unknown-linux-uclibceabihf #118190

Closed
asomers opened this issue Nov 23, 2023 · 12 comments
Labels
C-bug Category: This is a bug. O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@asomers
Copy link
Contributor

asomers commented Nov 23, 2023

I tried this code:

fn main() {
    println!("Hello, world!");
}
cargo check -Zbuild-std --target armv7-unknown-linux-uclibceabihf

I expected to see this happen: it should work

Instead, this happened: the build fails like this:

error[E0599]: no method named `si_pid` found for struct `siginfo_t` in the current scope
   --> /localhome/somers/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/std/src/sys/unix/process/process_unix.rs:879:33
    |
879 |             if unsafe { siginfo.si_pid() } == 0 {
    |                                 ^^^^^^ method not found in `siginfo_t`

error[E0599]: no method named `si_status` found for struct `siginfo_t` in the current scope
   --> /localhome/somers/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/std/src/sys/unix/process/process_unix.rs:917:39
    |
917 |         let status = unsafe { siginfo.si_status() };
    |                                       ^^^^^^^^^ method not found in `siginfo_t`

For more information about this error, try `rustc --explain E0599`.

Meta

rustc --version --verbose:

rustc 1.76.0-nightly (2f8d81f9d 2023-11-21)
binary: rustc
commit-hash: 2f8d81f9dbac6b8df982199f69da04a4c8357227
commit-date: 2023-11-21
host: x86_64-unknown-freebsd
release: 1.76.0-nightly
LLVM version: 17.0.5
@asomers asomers added the C-bug Category: This is a bug. label Nov 23, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 23, 2023
@the8472
Copy link
Member

the8472 commented Nov 23, 2023

I'm assuming that the linux kernel on that target still uses pretty much the same signal structure as most other ones so this is probably a libc issue that it lacks those accessors.

@asomers
Copy link
Contributor Author

asomers commented Nov 23, 2023

Probably, but it's a problem in the libc that's bundled with std, not the standalone crate. And since std itself doesn't compile, it's hard to bisect the standalone crate.

@the8472
Copy link
Member

the8472 commented Nov 23, 2023

Bisecting shouldn't be needed, the uses in std were added in #117957.

@SteveLauC
Copy link
Contributor

SteveLauC commented Nov 23, 2023

More context: nightly-2023-11-20 should be the first version of toolchain that is affected

@jieyouxu
Copy link
Member

Hi, since rust-lang/libc#3529 is merged, is this still an issue?

@asomers
Copy link
Contributor Author

asomers commented Feb 14, 2024

@jieyouxu that only fixes the problem in the libc crate. libc is vendored within the standard library, so it's necessary to update the vendored version.

@jieyouxu
Copy link
Member

@rustbot label +O-Arm +T-libs -needs-triage

@rustbot rustbot added O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 14, 2024
@operutka
Copy link
Contributor

@jieyouxu it's been merged into rust-lang/libc:main but the latest libc release 0.2.153 still does not contain it.

@operutka
Copy link
Contributor

operutka commented Sep 5, 2024

I believe this issue has been fixed in libc v0.2.156.

@SteveLauC
Copy link
Contributor

SteveLauC commented Sep 6, 2024

Build failure for armv7-unknown-linux-uclibceabihf nix-rust/nix#2200

Let me give it a test on the Nix side.

@SteveLauC
Copy link
Contributor

SteveLauC commented Sep 8, 2024

Let me give it a test on the Nix side.

Yeah, tested on the Nix side, nix-rust/nix#2487, I think this issue can be closed now.

@asomers
Copy link
Contributor Author

asomers commented Nov 8, 2024

Closing, since @SteveLauC confirmed it to be fixed.

@asomers asomers closed this as completed Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants