SnowflakePowered / winfsp-rs

Rust bindings to WinFSP
GNU General Public License v3.0
31 stars 5 forks source link

Unable to compile winfsp.rs #32

Closed biplab5464 closed 7 months ago

biplab5464 commented 7 months ago

Getting this issue when trying to run

here is my Cargo.toml

[dependencies]
winfsp = { version = "0.11", feature = ["stable" ,"system","debug"], default-features = false }

[build-dependencies]
winfsp = "0.11"

Running thought GNU abi din't work due to some dependencies

  --- stderr
  thread 'main' panicked at C:\Users\BIPALB\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winfsp-sys-0.2.2+winfsp-2.0\build.rs:75:9:
  unsupported triple x86_64-pc-windows-gnu

so i went it msvc abi

and still got error

error: failed to run custom build command for `winfsp-sys v0.2.2+winfsp-2.0`

Caused by:
  process didn't exit successfully: `D:\Rust\rust_project\fsp_rs\target\debug\build\winfsp-sys-156959fd134dac13\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-search=C:\Users\BIPALB\.cargo\registry\src\index.crates.io-6f17d22bba15001f\winfsp-sys-0.2.2+winfsp-2.0\winfsp/lib
  cargo:rustc-link-lib=dylib=delayimp
  cargo:rustc-link-lib=dylib=winfsp-x64
  cargo:rustc-link-arg=/DELAYLOAD:winfsp-x64.dll
  cargo:rerun-if-env-changed=TARGET
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  thread 'main' panicked at C:\Users\BIPALB\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.68.1\lib.rs:611:31:
  Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

i have previously install LLVM for gnu abi i can find libclang.dll is present in the bin and also the path is added environment variable
i am trying it compile it from last 2 days can you help me with this issue or figure out what i maybe doing wrong

chyyran commented 7 months ago

install llvm for msvc api. winfsp does that support gnu

chyyran commented 7 months ago

closing because the error message clearly indicates this is a bindgen problem

see instructions on https://github.com/rust-lang/rust-bindgen

biplab5464 commented 6 months ago

Thanks for the help

i was unaware about LLVM for msvc abi

so will be available though visual studio installer