Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693894 - sys-apps/bat-0.12.0 should depend on sys-devel/llvm - thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'\', \'libclang-*.so\', \'*\'], set the `LIBCLANG_PATH` environment ...
Summary: sys-apps/bat-0.12.0 should depend on sys-devel/llvm - thread 'main' panicked ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Georgy Yakovlev
Depends on:
Reported: 2019-09-09 11:30 UTC by tastytea
Modified: 2020-02-16 21:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

Build log sys-apps/bat-0.12.0 (build.log,16.27 KB, text/plain)
2019-09-09 11:30 UTC, tastytea
emerge --info (emerge_info.txt,6.08 KB, text/plain)
2019-09-09 11:40 UTC, tastytea

Note You need to log in before you can comment on or make changes to this bug.
Description tastytea 2019-09-09 11:30:56 UTC
Created attachment 589504 [details]
Build log sys-apps/bat-0.12.0

While trying to build bat, I got this error:

cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))

llvm-config is part of sys-devel/llvm.
Comment 1 tastytea 2019-09-09 11:40:29 UTC
Created attachment 589506 [details]
emerge --info
Comment 2 bob5262000 2019-11-06 13:53:49 UTC
Dear maintainer,

I also encountered this compile problem.
I searched it and found this github issue:
[cargo install failing due to a compilation problem of onig_sys crate #650](

And according to sharkdp, the author of bat. libclang is: 
> That's a build-time-only dependency

And in Gentoo, emerging sys-devel/clang will generate So, I think the variable `BDEPEND` in ebuild should add **sys-devel/clang** as build time dependency.

This is my diff result:
@@ -162,7 +162,8 @@
+               sys-devel/clang"
 DOCS=( doc/ )

After adding sys-devel/clang in BDEPEND, I can successfully compile and run bat.
If possible, please, update the ebuild file.

Thank you.
Comment 3 eNca 2020-01-22 11:50:23 UTC
I can confirm that the patch provided by bob5262000 works for me too.
Comment 4 Larry the Git Cow gentoo-dev 2020-02-16 21:01:52 UTC
The bug has been closed via the following commit(s):

commit 13f8c47f84ad4b7bc41b658df76f111815aa0d8e
Author:     Georgy Yakovlev <>
AuthorDate: 2020-02-16 20:59:46 +0000
Commit:     Georgy Yakovlev <>
CommitDate: 2020-02-16 21:01:42 +0000

    sys-apps/bat: clang required at build time
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <>

 sys-apps/bat/{bat-0.12.1.ebuild => bat-0.12.1-r1.ebuild} | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)