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\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment ...
Summary: sys-apps/bat-0.12.0 should depend on sys-devel/llvm - thread 'main' panicked ...
Status: RESOLVED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


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

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](https://github.com/sharkdp/bat/issues/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 libclang.so 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 @@
 DEPEND="sys-libs/zlib"
 RDEPEND="${DEPEND}
        !>app-backup/bacula-9.2[qt5]"
-BDEPEND=">=virtual/rust-1.31.0"
+BDEPEND=">=virtual/rust-1.31.0
+               sys-devel/clang"
 
 DOCS=( README.md doc/alternatives.md )
```

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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13f8c47f84ad4b7bc41b658df76f111815aa0d8e

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

    sys-apps/bat: clang required at build time
    
    Closes: https://bugs.gentoo.org/693894
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

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