katyo / oboe-rs

Rust bindings for Oboe high-performance audio IO Android library
65 stars 22 forks source link

Broken build with "generate-bindings" feature "error: environment variable `OUT_DIR` not defined #1

Closed inferrna closed 3 years ago

inferrna commented 4 years ago
error: environment variable `OUT_DIR` not defined
 --> /home/inferno/.cargo/registry/src/github.com-1ecc6299db9ec823/oboe-sys-0.1.0/src/lib.rs:9:18
  |
9 | include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
  |    

Build command:

cargo build --target arm-linux-androideabi
katyo commented 4 years ago

This is so strange because OUT_DIR should be set by Cargo in any case. See https://doc.rust-lang.org/1.30.0/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates

inferrna commented 4 years ago

My android app based on https://github.com/Dushistov/rust_swig crate. I just added your "play sine" example to it's example app and got the same error. Can you please look on it? https://github.com/inferrna/rust_swig

katyo commented 3 years ago

@inferrna It seems I fixed this. I had missing "build.rs" listed in 'include' field in cargo manifest, so cargo had not add build script to package on publishing.

v0.2.1 should works as expected

katyo commented 3 years ago

I have tried to use flapigen with my app. It compiles and works fine.