RustAudio / coreaudio-rs

A friendly rust interface to Apple's Core Audio API.
Apache License 2.0
221 stars 44 forks source link

Please explicitly update coreaudio-sys #68

Open sanbox-irl opened 5 years ago

sanbox-irl commented 5 years ago

Hello!

This repo currently relies upon coreaudio-sys, and just lists version "0.2". My Cargo is defaulting that to "0.2.2", but "0.2.3" of coreaudio-sys has upgraded its bindgen version to the much more recent v0.5.0. 0.2.2 however, is still stuck on 0.32.3.

This is a problem as I have another package which uses a more recent bindgen, and cargo can't let me use both packages at once. For now, I essentially can't use this package, cpal, or rodio.

Here's the error message cargo gives me incase there's a simpler solution for me personally:

error: multiple packages link to native library `clang`, but a native library can be linked only once

package `clang-sys v0.21.2`
    ... which is depended on by `bindgen v0.32.3`
    ... which is depended on by `coreaudio-sys v0.2.2`
    ... which is depended on by `coreaudio-rs v0.9.1`
    ... which is depended on by `cpal v0.10.0`
    ... which is depended on by `rodio v0.10.0`
    ... which is depended on by `clockwork v0.1.0 (/Users/jjspira/Documents/Rust/clockwork)`
links to native library `clang`

package `clang-sys v0.26.4`
    ... which is depended on by `bindgen v0.47.3`
    ... which is depended on by `rustcord-sys v0.2.2`
    ... which is depended on by `rustcord v0.2.2`
    ... which is depended on by `clockwork v0.1.0 (/Users/jjspira/Documents/Rust/clockwork)`
also links to native library `clang`

Thanks guys!

open-trade commented 4 years ago

Author please!

est31 commented 4 years ago

@sanbox-irl if cargo update -p coreaudio-sys can't solve your issue, then explicitly updating the dependency requirement won't solve it either, because then cargo will just select an older version of the coreaudio-rs crate.

Ralith commented 4 years ago

coreaudio-sys could be made much less fragile and heavyweight by including pregenerated bindings rather than invoking bindgen.

est31 commented 4 years ago

@Ralith that's a separate suggestion, also best done at https://github.com/RustAudio/coreaudio-sys

est31 commented 4 years ago

One potential issue is copyright. Are the headers compatible with the license of coreaudio-sys, or are they apple-proprietary?