spack: bat build fails, waiting on upstream fix

This is a placeholder bug, hopefully it’ll save folks a bit of time.

There are a couple of rust packages, including bat, that depend on onig/onig_sys, that fail with errors like the following:

   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/george.hartzell/spack-stage/spack-stage-bat-0.12.1-dwomjln4rqjvhzclufu6ib2p3cu7v5lr/spack-src/target/release/build/onig_sys-40e748545d4c894e/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: [])"', /compbio/home/george.hartzell/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.50.1/src/lib.rs:1711:13
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 `bat v0.12.1 (/tmp/george.hartzell/spack-stage/spack-stage-bat-0.12.1-dwomjln4rqjvhzclufu6ib2p3cu7v5lr/spack-src)`, intermediate artifacts can be found at `/tmp/george.hartzell/spack-stage/spack-stage-bat-0.12.1-dwomjln4rqjvhzclufu6ib2p3cu7v5lr/spack-src/target`

Caused by:
  build failed

The onig/onig_sys crates are shims to the C based oniguruma library. They use bits of libclang to build the shim layer at build time. I’ve played with

There’s an issue upstream in the bat project that addresses it, https://github.com/sharkdp/bat/issues/650, and at some point it’ll get fixed.

In the meantime, you can fix it by adding a depends_on('llvm') but it’s kind of hard to swallow a two-plus hour build of llvm so that I can see pretty colors in my files…

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 1
  • Comments: 15 (13 by maintainers)

Most upvoted comments

Well, 😊…

ps. Thanks!

If you make it a build dependency, which it should be, I don’t think it should put it into the lmod load?