Skip to content

Don't require libclang by default #11

@matklad

Description

@matklad

It seems like libappindicator-sys requires libclang to build (possibly due to bindgen):

14:34:30|~/projects/systray-rs|master⚡?
λ cargo run --example systray-example
   Compiling futures-executor v0.3.5
   Compiling libappindicator-sys v0.4.0
error: failed to run custom build command for `libappindicator-sys v0.4.0`

Caused by:
  process didn't exit successfully: `/home/matklad/projects/systray-rs/target/debug/build/libappindicator-sys-bbedb3ed9e28adf0/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=appindicator3
cargo:rustc-link-search=native=/nix/store/qm1h65bw28h0gffcagq88csh0hl8ka15-gtk+3-3.24.13/lib
cargo:rustc-link-search=native=/nix/store/dara95ay6r49srnia5fllxg84n4fr3qc-atk-2.34.1/lib
cargo:rustc-link-search=native=/nix/store/3h14bkgm9har3rdds7924drn75plnhla-glib-2.62.4/lib
cargo:rustc-link-search=native=/nix/store/5nbgbfc68hfmy6hqr9iap8jpl0mb6882-cairo-1.16.0/lib
cargo:rustc-link-search=native=/nix/store/6x2ypk1p1kbij71cdwd92vxpi1jx923z-gdk-pixbuf-2.40.0/lib
cargo:rustc-link-search=native=/nix/store/aqy2zrf4ax7nab6vbfacns9708bhvly2-pango-1.44.7/lib
cargo:rustc-link-search=native=/nix/store/m0j3kjgrb9v9zbkr0m48layw1lj4ssbl-harfbuzz-2.6.4/lib
cargo:rustc-link-search=native=/nix/store/c5w9axdm5damqb0qrjn7rn54q4h3gvjd-libappindicator-gtk3-12.10.0/lib
cargo:rustc-link-search=native=/nix/store/qd126mlckjg6wk1v8zmbvnr3nrlwb26g-libdbusmenu-gtk3-16.04.0/lib
cargo:rustc-link-lib=appindicator3
cargo:rustc-link-lib=dbusmenu-glib
cargo:rustc-link-lib=gtk-3
cargo:rustc-link-lib=gdk-3
cargo:rustc-link-lib=pangocairo-1.0
cargo:rustc-link-lib=pango-1.0
cargo:rustc-link-lib=harfbuzz
cargo:rustc-link-lib=atk-1.0
cargo:rustc-link-lib=cairo-gobject
cargo:rustc-link-lib=cairo
cargo:rustc-link-lib=gdk_pixbuf-2.0
cargo:rustc-link-lib=gio-2.0
cargo:rustc-link-lib=gobject-2.0
cargo:rustc-link-lib=glib-2.0

--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/matklad/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.52.0/src/lib.rs:1895:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed

It seems like this shouldn't be the case though? Would it be possible to vendor generated code ? I would think that libappindicator is ABI-stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions