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

Unable to Build for Android #428

Open
richshepard opened this issue Jan 14, 2025 · 0 comments
Open

Unable to Build for Android #428

richshepard opened this issue Jan 14, 2025 · 0 comments

Comments

@richshepard
Copy link

richshepard commented Jan 14, 2025

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?

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

1 participant