Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

cargo install mdcat fails with llvm error #90

Closed
getaaron opened this issue Sep 9, 2019 · 5 comments
Closed

cargo install mdcat fails with llvm error #90

getaaron opened this issue Sep 9, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@getaaron
Copy link

getaaron commented Sep 9, 2019

cargo install mdcat

Compiles many dependencies successfully, then fails on onig_sys:

   Compiling hyper-tls v0.3.2
   Compiling reqwest v0.9.20
   Compiling onig_sys v69.2.0
error: failed to run custom build command for `onig_sys v69.2.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install57Mtrg/release/build/onig_sys-c69a530df1a224ce/build-script-build` (exit code: 101)
--- stdout
cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (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: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:999:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `mdcat v0.13.0`, intermediate artifacts can be found at `/tmp/cargo-install57Mtrg`

Caused by:
  build failed

Running this on Debian Linux (Debian 10, aka "Buster")

@swsnr
Copy link
Owner

swsnr commented Sep 10, 2019

I’ve also seen this. It’s an issue with onig sys; there’s already a ticket in the rust-onig Github repo.

Not sure if we can fix this in this here; if so I’d appreciate a pull request because I have no time to look at this.

@getaaron
Copy link
Author

Fixed this with:

sudo apt-get install llvm
sudo apt-get install clang
cargo install mdcat

Will open a README PR

@swsnr
Copy link
Owner

swsnr commented Sep 10, 2019

for reference rust-onig/rust-onig#109

@swsnr swsnr added the bug Something isn't working label Sep 10, 2019
swsnr added a commit that referenced this issue Sep 15, 2019
swsnr added a commit that referenced this issue Sep 15, 2019
@swsnr swsnr mentioned this issue Sep 15, 2019
@swsnr swsnr closed this as completed in b4e209c Apr 15, 2020
@swsnr
Copy link
Owner

swsnr commented Apr 15, 2020

Thanks to #131 mdcat 0.16.0 now builds without Clang and LLVM.

@getaaron
Copy link
Author

Nice!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants