2.22.1 fails to build due to fs_at crate
0323pin opened this issue Β· 9 comments
Describe the bug
2.22.1 fails to build on NetBSD.
Versions:
- OS: NetBSD-current (development branch)
- Rust-1.68.2
Additional context
Build fails due to fs_at
as follows:
Compiling fs_at v0.1.4
error[E0425]: cannot find value `O_PATH` in crate `libc`
--> /usr/pkgsrc/wip/navi/work/vendor/fs_at-0.1.4/src/unix.rs:130:55
|
130 | libc::O_RDONLY | libc::O_NOFOLLOW | libc::O_PATH | libc::O_CLOEXEC | libc::O_NOCTTY;
| ^^^^^^ not found in `libc`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `fs_at` due to previous error
warning: build failed, waiting for other jobs to finish...
*** Error code 101
Stop.
make[1]: stopped in /usr/pkgsrc/wip/navi
*** Error code 1
Stop.
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)
Could you please try to use the same versions as defined by the repo?
Namely, rust 1.67.0 instead of 1.68.2 with locked dependencies from Cargo.lock?
I'm the NetBSD package maintainer and all our package builds are done in offline mode. The crate dependency versions used are the ones specified in Cargo.lock
.
I don't see how downgrading Rust would help solving an issue related to a unknown variable.
I understand that this is basically not a navi
issue, rather a problem in fs_at
but, our package is currently stuck at 2.20.1 which, didn't depend on fs_at
.
EDIT: Building fs_at
standalone:
fs_at-0.1.4 > cargo build --release --locked
Updating crates.io index
Downloaded static_assertions v1.1.0
Downloaded nix v0.26.2
Downloaded cfg-if v0.1.10
Downloaded bitflags v1.3.2
Downloaded libc v0.2.140
Downloaded cvt v0.1.1
Downloaded cfg-if v1.0.0
Downloaded 7 crates (1010.8 KB) in 1.19s
Compiling libc v0.2.140
Compiling bitflags v1.3.2
Compiling static_assertions v1.1.0
Compiling cfg-if v0.1.10
Compiling cfg-if v1.0.0
Compiling cvt v0.1.1
Compiling nix v0.26.2
Compiling fs_at v0.1.4 (/home/pin/Downloads/fs_at-0.1.4)
error[E0425]: cannot find value `O_PATH` in crate `libc`
--> src/unix.rs:130:55
|
130 | libc::O_RDONLY | libc::O_NOFOLLOW | libc::O_PATH | libc::O_CLOEXEC | libc::O_NOCTTY;
| ^^^^^^ not found in `libc`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `fs_at` due to previous error
Exception: cargo exited with 101
@denisidoro This is worst than I thought, although I was afraid this would be the case :(
~ > grep -r "O_PATH" libc-0.2.141
...
libc-0.2.141/src/unix/bsd/freebsdlike/freebsd/mod.rs:pub const O_PATH: ::c_int = 0x00400000;
libc-0.2.141/src/unix/linux_like/android/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/emscripten/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b32/mod.rs: pub const O_PATH: ::c_int = 0x1000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b32/mod.rs: pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs:pub const O_PATH: ::c_int = 2097152;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/s390x.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs:pub const O_PATH: ::c_int = 0x1000000;
libc-0.2.141/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/musl/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/uclibc/arm/mod.rs:pub const O_PATH: ::c_int = 0o10000000;
libc-0.2.141/src/unix/linux_like/linux/uclibc/mips/mod.rs:pub const O_PATH: ::c_int = 0o010000000;
No NetBSD support in libc
:(
When I find some time, I'll check cargo tree
to understand why fs_at
is being included.
If it's not being used by the core logic, in theory I could put the logic behind a cargo feature so that we can build a more stripped down version for NetBSD
Seria Γ³ptimo, se for possΓvel. Obrigado!
navi v2.22.1 (/home/pin/Downloads/navi)
βββ anyhow v1.0.70
βββ clap v4.2.1
β βββ clap_builder v4.2.1
β β βββ anstream v0.2.6
β β β βββ anstyle v0.3.5
β β β βββ anstyle-parse v0.1.1
β β β β βββ utf8parse v0.2.1
β β β βββ concolor-override v1.0.0
β β β βββ concolor-query v0.3.3
β β β βββ is-terminal v0.4.6
β β β β βββ io-lifetimes v1.0.9
β β β β β βββ libc v0.2.140
β β β β βββ rustix v0.37.7
β β β β βββ bitflags v1.3.2
β β β β βββ errno v0.3.0
β β β β β βββ libc v0.2.140
β β β β βββ io-lifetimes v1.0.9 (*)
β β β β βββ libc v0.2.140
β β β βββ utf8parse v0.2.1
β β βββ anstyle v0.3.5
β β βββ bitflags v1.3.2
β β βββ clap_lex v0.4.1
β β βββ once_cell v1.17.1
β β βββ strsim v0.10.0
β βββ clap_derive v4.2.0 (proc-macro)
β β βββ heck v0.4.0
β β βββ proc-macro2 v1.0.56
β β β βββ unicode-ident v1.0.8
β β βββ quote v1.0.26
β β β βββ proc-macro2 v1.0.56 (*)
β β βββ syn v2.0.13
β β βββ proc-macro2 v1.0.56 (*)
β β βββ quote v1.0.26 (*)
β β βββ unicode-ident v1.0.8
β βββ once_cell v1.17.1
βββ crossterm v0.26.1
β βββ bitflags v1.3.2
β βββ libc v0.2.140
β βββ mio v0.8.3
β β βββ libc v0.2.140
β β βββ log v0.4.14
β β βββ cfg-if v1.0.0
β βββ parking_lot v0.12.0
β β βββ lock_api v0.4.6
β β β βββ scopeguard v1.1.0
β β βββ parking_lot_core v0.9.1
β β βββ cfg-if v1.0.0
β β βββ libc v0.2.140
β β βββ smallvec v1.10.0
β βββ signal-hook v0.3.13
β β βββ libc v0.2.140
β β βββ signal-hook-registry v1.4.0
β β βββ libc v0.2.140
β βββ signal-hook-mio v0.2.3
β βββ libc v0.2.140
β βββ mio v0.8.3 (*)
β βββ signal-hook v0.3.13 (*)
βββ directories-next v2.0.0
β βββ cfg-if v1.0.0
β βββ dirs-sys-next v0.1.2
β βββ libc v0.2.140
βββ dns_common v0.2.1
β βββ anyhow v1.0.70
β βββ directories-next v2.0.0 (*)
β βββ serde v1.0.159
β β βββ serde_derive v1.0.159 (proc-macro)
β β βββ proc-macro2 v1.0.56 (*)
β β βββ quote v1.0.26 (*)
β β βββ syn v2.0.13 (*)
β βββ serde_json v1.0.95
β β βββ itoa v1.0.6
β β βββ ryu v1.0.9
β β βββ serde v1.0.159 (*)
β βββ serde_yaml v0.9.21
β β βββ indexmap v1.9.3
β β β βββ hashbrown v0.12.3
β β β [build-dependencies]
β β β βββ autocfg v1.0.1
β β βββ itoa v1.0.6
β β βββ ryu v1.0.9
β β βββ serde v1.0.159 (*)
β β βββ unsafe-libyaml v0.2.8
β βββ tracing v0.1.37
β β βββ cfg-if v1.0.0
β β βββ pin-project-lite v0.2.9
β β βββ tracing-attributes v0.1.23 (proc-macro)
β β β βββ proc-macro2 v1.0.56 (*)
β β β βββ quote v1.0.26 (*)
β β β βββ syn v1.0.109
β β β βββ proc-macro2 v1.0.56 (*)
β β β βββ quote v1.0.26 (*)
β β β βββ unicode-ident v1.0.8
β β βββ tracing-core v0.1.30
β β βββ once_cell v1.17.1
β βββ tracing-subscriber v0.3.16
β βββ matchers v0.1.0
β β βββ regex-automata v0.1.10
β β βββ regex-syntax v0.6.29
β βββ nu-ansi-term v0.46.0
β β βββ overload v0.1.1
β βββ once_cell v1.17.1
β βββ regex v1.7.3
β β βββ aho-corasick v0.7.18
β β β βββ memchr v2.4.0
β β βββ memchr v2.4.0
β β βββ regex-syntax v0.6.29
β βββ sharded-slab v0.1.4
β β βββ lazy_static v1.4.0
β βββ smallvec v1.10.0
β βββ thread_local v1.1.7
β β βββ cfg-if v1.0.0
β β βββ once_cell v1.17.1
β βββ tracing v0.1.37 (*)
β βββ tracing-core v0.1.30 (*)
β βββ tracing-log v0.1.3
β βββ lazy_static v1.4.0
β βββ log v0.4.14 (*)
β βββ tracing-core v0.1.30 (*)
βββ dns_common_derive v0.2.1 (proc-macro)
β βββ proc-macro2 v1.0.56 (*)
β βββ quote v1.0.26 (*)
β βββ synstructure v0.12.6
β βββ proc-macro2 v1.0.56 (*)
β βββ quote v1.0.26 (*)
β βββ syn v1.0.109 (*)
β βββ unicode-xid v0.2.2
βββ edit v0.1.4
β βββ tempfile v3.2.0
β β βββ cfg-if v1.0.0
β β βββ libc v0.2.140
β β βββ rand v0.8.3
β β β βββ libc v0.2.140
β β β βββ rand_chacha v0.3.1
β β β β βββ ppv-lite86 v0.2.10
β β β β βββ rand_core v0.6.2
β β β β βββ getrandom v0.2.3
β β β β βββ cfg-if v1.0.0
β β β β βββ libc v0.2.140
β β β βββ rand_core v0.6.2 (*)
β β βββ remove_dir_all v0.5.3
β βββ which v4.1.0
β βββ either v1.6.1
β βββ libc v0.2.140
βββ lazy_static v1.4.0
βββ regex v1.7.3 (*)
βββ remove_dir_all v0.8.2
β βββ cfg-if v1.0.0
β βββ cvt v0.1.2
β β βββ cfg-if v1.0.0
β βββ fs_at v0.1.4
β β βββ cfg-if v1.0.0
β β βββ cvt v0.1.2 (*)
β β βββ libc v0.2.140
β β βββ nix v0.26.2
β β βββ bitflags v1.3.2
β β βββ cfg-if v1.0.0
β β βββ libc v0.2.140
β β βββ static_assertions v1.1.0
β βββ lazy_static v1.4.0
β βββ libc v0.2.140
β βββ normpath v1.1.1
βββ serde v1.0.159 (*)
βββ serde_yaml v0.9.21 (*)
βββ shellwords v1.1.0
β βββ lazy_static v1.4.0
β βββ regex v1.7.3 (*)
βββ strip-ansi-escapes v0.1.1
β βββ vte v0.10.1
β βββ arrayvec v0.5.2
β βββ utf8parse v0.2.1
β βββ vte_generate_state_changes v0.1.1 (proc-macro)
β βββ proc-macro2 v1.0.56 (*)
β βββ quote v1.0.26 (*)
βββ thiserror v1.0.40
β βββ thiserror-impl v1.0.40 (proc-macro)
β βββ proc-macro2 v1.0.56 (*)
β βββ quote v1.0.26 (*)
β βββ syn v2.0.13 (*)
βββ unicode-width v0.1.10
βββ walkdir v2.3.3
βββ same-file v1.0.6
Looks like remove_dir_all
v0.8.2 is pulling it in.
@denisidoro Workaround patch submitted, rbtcollins/fs_at#74
...
Compiling navi v2.22.1 (/usr/pkgsrc/wip/navi/work/navi-2.22.1)
Finished release [optimized] target(s) in 3m 48s