Build breaks on armv7: the name `type_of_thread_id` is defined multiple times
Closed this issue · 6 comments
error[E0428]: the name `type_of_thread_id` is defined multiple times
--> /wrkdirs/usr/ports/shells/nu_plugin_formats/work/nu_plugin_formats-0.99.1/cargo-crates/nix-0.29.0/src/sys/signal.rs:1110:1
|
1107 | pub type type_of_thread_id = libc::lwpid_t;
| ------------------------------------------- previous definition of the type `type_of_thread_id` here
...
1110 | pub type type_of_thread_id = libc::pid_t;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `type_of_thread_id` redefined here
|
= note: `type_of_thread_id` must be defined only once in the type namespace of this module
error[E0609]: no field `sigev_notify_thread_id` on type `signal::sigevent::ffi::sigevent`
--> /wrkdirs/usr/ports/shells/nu_plugin_formats/work/nu_plugin_formats-0.99.1/cargo-crates/nix-0.29.0/src/sys/signal.rs:1364:25
|
1364 | sev.sigev_notify_thread_id = thread_id;
| ^^^^^^^^^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `sigev_notify`, `sigev_signo`, `sigev_value`, `_sigev_un`
Version: 0.29.0
FreeBSD 15 (CURRENT)
What is your Rust build target? Run the following command to get it:
$ rustc -vV | sed -n 's|host: ||p'
ref: https://stackoverflow.com/a/69816610/14092446
For the first error:
Lines 1105 to 1110 in 7e30152
Your system is FreeBSD, so the first definition should be used. The second definition is for Linux with glibc or uClibc, it is very weird to see it gets matched on a FreeBSD system. 🤔
For the second error:
Lines 1371 to 1376 in 7e30152
The related code is also for Linux rather than FreeBSD
On amd64 it is:
$ rustc -vV | sed -n 's|host: ||p'
x86_64-unknown-freebsd
I don't have access to armv7.
@yurivict are you using rustc from rustup or from the ports tree? If you're using rust from the ports tree, you need 1.82.0 or later. If you're using it from Rustup, you need 328b759142ddeae96da83176f103200009d3e3f1 or later. That is, you need rust nightly-2024-11-08 or later.
rust from the package is used.
It was updated to 1.82.0 on Oct 24.