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

ppc64le: ioctl-sys: error[E0432]: unresolved import this_arch_not_supported #1546

Closed
vt-alt opened this issue Jun 1, 2024 · 2 comments
Closed

Comments

@vt-alt
Copy link

vt-alt commented Jun 1, 2024

JFYI. Build failure on ppc64le with --features full due to some problem in ioctl-sys crate.

[00:00:21]    Compiling ioctl-sys v0.8.0
[00:00:21]      Running `rustc --crate-name ioctl_sys --edition=2015 /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 -C metadata=14ebc488175388c6 -C extra-filename=-14ebc488175388c6 --out-dir /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/target/release/deps -L dependency=/usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=1 --cfg=rustix_use_libc`
...
[00:00:22]      Running `/usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/target/release/build/generic-array-e76d77914febfa3f/build-script-build`
[00:00:22] error[E0432]: unresolved import `self::consts`
[00:00:22]   --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/linux.rs:61:15
[00:00:22]    |
[00:00:22] 61 | pub use self::consts::*;
[00:00:22]    |               ^^^^^^ could not find `consts` in `self`
[00:00:22] 
[00:00:22] error[E0432]: unresolved import `this_arch_not_supported`
[00:00:22]   --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/linux.rs:37:5
[00:00:22]    |
[00:00:22] 37 | use this_arch_not_supported;
[00:00:22]    |     ^^^^^^^^^^^^^^^^^^^^^^^ no `this_arch_not_supported` in the root
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `SIZEBITS` in this scope
[00:00:22]   --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:28:39
[00:00:22]    |
[00:00:22] 28 | pub const DIRSHIFT: u32 = SIZESHIFT + SIZEBITS as u32;
[00:00:22]    |                                       ^^^^^^^^ not found in this scope
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `SIZEBITS` in this scope
[00:00:22]   --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:35:33
[00:00:22]    |
[00:00:22] 35 | pub const SIZEMASK: u32 = (1 << SIZEBITS) - 1;
[00:00:22]    |                                 ^^^^^^^^ not found in this scope
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `DIRBITS` in this scope
[00:00:22]   --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:37:32
[00:00:22]    |
[00:00:22] 2  | pub const NRBITS: u32 = 8;
[00:00:22]    | -------------------------- similarly named constant `NRBITS` defined here
[00:00:22] ...
[00:00:22] 37 | pub const DIRMASK: u32 = (1 << DIRBITS) - 1;
[00:00:22]    |                                ^^^^^^^ help: a constant with a similar name exists: `NRBITS`
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `WRITE` in this scope
[00:00:22]    --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:261:22
[00:00:22]     |
[00:00:22] 261 | pub const IN: u32 = (WRITE as u32) << DIRSHIFT;
[00:00:22]     |                      ^^^^^ not found in this scope
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `READ` in this scope
[00:00:22]    --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:263:23
[00:00:22]     |
[00:00:22] 263 | pub const OUT: u32 = (READ as u32) << DIRSHIFT;
[00:00:22]     |                       ^^^^ not found in this scope
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `READ` in this scope
[00:00:22]    --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:265:26
[00:00:22]     |
[00:00:22] 265 | pub const INOUT: u32 = ((READ | WRITE) as u32) << DIRSHIFT;
[00:00:22]     |                          ^^^^ not found in this scope
[00:00:22] 
[00:00:22] error[E0425]: cannot find value `WRITE` in this scope
[00:00:22]    --> /usr/src/RPM/BUILD/shadowsocks-rust-1.19.0/vendor/ioctl-sys/src/platform/mod.rs:265:33
[00:00:22]     |
[00:00:22] 265 | pub const INOUT: u32 = ((READ | WRITE) as u32) << DIRSHIFT;
[00:00:22]     |                                 ^^^^^ not found in this scope

I also filed upstream bug codyps/ioctl#29

When building with default features there is no build failure. Perhaps, this is because of local-tun feature included in full.

@zonyitoo
Copy link
Collaborator

zonyitoo commented Jun 1, 2024

Yes. It is an known issue. ioctl seems to be abandoned.

I have opened an issue to replace ioctl with nix: meh/rust-tun#87 , but not accepted yet.

@vt-alt
Copy link
Author

vt-alt commented Jun 1, 2024

Thank you!

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