Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile on Windows #135

Closed
Adarma opened this issue Mar 3, 2020 · 3 comments
Closed

Can't compile on Windows #135

Adarma opened this issue Mar 3, 2020 · 3 comments

Comments

@Adarma
Copy link

Adarma commented Mar 3, 2020

Windows 7, toolchain:
stable-x86_64-pc-windows-msvc

running cargo run --example simple:

error: failed to run custom build command for `onig_sys v69.2.0 (C:\CODE\Rust\rust-onig\onig_sys)`

Caused by:
  process didn't exit successfully: `C:\CODE\Rust\rust-onig\target\debug\build\onig_sys-fcd2de2891f1f796\build-script-build` (exit code: 101)
--- stdout
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: [])"', src\libcore\result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Does something else need to be installed?
From the ReadMe, it sounded like it will build from source

@oovm
Copy link

oovm commented Mar 7, 2020

Same problem: https://github.com/GalAster/carbon-rs/runs/492035660

   Compiling onig_sys v69.2.0
     Running `rustc --crate-name build_script_build C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\onig_sys-69.2.0\build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=523edfba9713ec13 -C extra-filename=-523edfba9713ec13 --out-dir D:\a\carbon-rs\carbon-rs\target\release\build\onig_sys-523edfba9713ec13 -L dependency=D:\a\carbon-rs\carbon-rs\target\release\deps --extern bindgen=D:\a\carbon-rs\carbon-rs\target\release\deps\libbindgen-aa80d456a78fa41c.rlib --extern cc=D:\a\carbon-rs\carbon-rs\target\release\deps\libcc-6c97d0e1bec95bbf.rlib --extern pkg_config=D:\a\carbon-rs\carbon-rs\target\release\deps\libpkg_config-d357e1153e3965c7.rlib --cap-lints allow`
     Running `D:\a\carbon-rs\carbon-rs\target\release\build\onig_sys-523edfba9713ec13\build-script-build`
error: failed to run custom build command for `onig_sys v69.2.0`

Caused by:
  process didn't exit successfully: `D:\a\carbon-rs\carbon-rs\target\release\build\onig_sys-523edfba9713ec13\build-script-build` (exit code: 101)
--- stdout
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: [])"', src\libcore\result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

##[error]Process completed with exit code 1.

@iwillspeak
Copy link
Collaborator

Both of these errors appear to be a lack of the llvm-config too which the bindgen crate uses to generate bindings.

I plan on updating this crate to pre-pack the bindings for common platforms. That work is being tracked in #126.

In the mean time you'll need LLVM installed to get llvm-config available for bindgen to use.

@Keats
Copy link
Contributor

Keats commented May 16, 2020

The new version can disable the bindgen build now.

@Keats Keats closed this as completed May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants