cloudflare / cloudflare/boringtun
Unable to Build for Android
- Dominant language
- Rust
- Stars
- 7.2k
- Forks
- 532
- PR merge metrics
- No merged PRs in 30d
Description
On the latest build for boring tun, I have tried to compile using the following command for any Android version, but here's one such Android target:
`cargo build --lib --release --features "jni-bindings" --target armv7-linux-androideabi
`
And the error I get is this:
> Compiling boringtun v0.6.0 (/home/rich/dev/boringtun/boringtun)
> error[E0432]: unresolved import `poll`
> --> boringtun/src/device/mod.rs:46:5
> |
> 46 | use poll::{EventPoll, EventRef, WaitResult};
> | ^^^^ use of undeclared crate or module `poll`
>
> error[E0432]: unresolved import `tun`
> --> boringtun/src/device/mod.rs:49:5
> |
> 49 | use tun::TunSocket;
> | ^^^ use of undeclared crate or module `tun`
>
> error[E0308]: mismatched types
> --> boringtun/src/device/api.rs:68:57
> |
> 68 | "set=1" => api_set(&mut reader, d),
> | ------- ^ types differ in mutability
> | |
> | arguments to this function are incorrect
> |
> = note: expected mutable reference `&mut LockReadGuard<'_, Device, >`
> found reference `&Device`
>
The first two issues seem to be because poll is imported for ios and linux, but not android:
```
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos"))]
#[path = "kqueue.rs"]
pub mod poll;
#[cfg(target_os = "linux")]
#[path = "epoll.rs"]
pub mod poll;
```
I am making the broad assumption that any subsequent error might be connected to this issue.
I don't feel that I am missing a compile switch so is there anything I can do to fix this?
Contributor guide
Assessment
This issue has not been assessed yet.