smol: Failed to build on Windows MSVC
Ran cargo run --example chat-server and the following error occurred:
error: failed to run custom build command for `wepoll-sys v1.0.4`
Caused by:
process didn't exit successfully: `C:\Users\yoshu\Code\smol\target\debug\build\wepoll-sys-117e2f9800108a96\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
DEBUG = Some("true")
running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "C:\\Users\\yoshu\\Code\\smol\\target\\debug\\build\\wepoll-sys-1dae2e165fd4cfb0\\out\\wepoll-build" "-W4" "-FoC:\\Users\\yoshu\\Code\\smol\\target\\debug\\build\\wepoll-sys-1dae2e165fd4cfb0\\out\\wepoll-build\\wepoll.o" "-c" "C:\\Users\\yoshu\\Code\\smol\\target\\debug\\build\\wepoll-sys-1dae2e165fd4cfb0\\out\\wepoll-build\\wepoll.c"
wepoll.c
exit code: 0
AR_x86_64-pc-windows-msvc = None
AR_x86_64_pc_windows_msvc = None
HOST_AR = None
AR = None
running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX64\\x64\\lib.exe" "-out:C:\\Users\\yoshu\\Code\\smol\\target\\debug\\build\\wepoll-sys-1dae2e165fd4cfb0\\out\\wepoll-build\\libwepoll.a" "-nologo" "C:\\Users\\yoshu\\Code\\smol\\target\\debug\\build\\wepoll-sys-1dae2e165fd4cfb0\\out\\wepoll-build\\wepoll.o"
exit code: 0
cargo:rustc-link-lib=static=wepoll
cargo:rustc-link-search=native=C:\Users\yoshu\Code\smol\target\debug\build\wepoll-sys-1dae2e165fd4cfb0\out\wepoll-build
cargo:rustc-link-lib=static=wepoll
cargo:rustc-link-search=C:\Users\yoshu\Code\smol\target\debug\build\wepoll-sys-1dae2e165fd4cfb0\out\wepoll-build
cargo:warning=couldn't execute `llvm-config --prefix` (error: The system cannot find the file specified. (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
--- stderr
thread 'main' panicked at '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: [])"', C:\Users\yoshu\scoop\persist\rustup\.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
PS C:\Users\yoshu\Code\smol>
I don’t have the libc-based toolchain installed locally because it’s a pain to setup; I haven’t yet confirmed whether it also fails with it installed.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (2 by maintainers)
Commits related to this issue
- feat: update to wepoll-bindings@2.0 Closes #23 — committed to smol-rs/smol by dignifiedquire 4 years ago
- feat: update to wepoll-bindings@2.0 Closes #23 — committed to smol-rs/smol by dignifiedquire 4 years ago
Thanks to @dignifiedquire, wepoll-sys no longer requires LLVM. I have pushed new versions (2.0.0) of both wepoll-sys and wepoll-binding, which include these changes.
As I mentioned in the GitLab issue, I’m happy to include the bindings in the repository. The wepoll C code rarely changes, and updating the bindings could be automated easily. I’ll take a look this weekend to see if I can get the bindings generated on one of my Windows VMs.