[Debian-med-packaging] Bug#1054602: mosdepth: Needs "libhts.so" as a dependency, avaialbe in package "libhts-dev"

Nilesh Patra nilesh at posteo.net
Tue Dec 5 21:14:46 GMT 2023


On Fri, 27 Oct 2023 07:31:31 +0200 Andreas Tille <andreas at fam-tille.de> wrote:> Am Thu, Oct 26, 2023 at 12:24:20PM -0400 schrieb Frank Bearoff:
> > * What led up to the situation?
> > sudo apt install "mosdepth"
> 
> OK, you installed the package - but what did you after installing it?
> Which command did you called that failed and is exposing the problem?
> 
> I checked the linked libraries:
> 
> $ ldd /usr/bin/mosdepth 
>         linux-vdso.so.1 (0x00007fffa19fc000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb43a39d000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007fb43a657000)
> 

It should be as simple as to reproduce:

$ sudo apt install mosdepth
$ mosdepth -h
could not load: libhts.so
(compile with -d:nimDebugDlOpen for more information)


> It does not sound very convincing that the development package is
> needed.  Most probably your system will be solved by installing libhts3.
> But first I would like to know what the problem really is.

Not really. As per the readme of mosdepth:

| The binary from releases is static, with no dependencies. If you build it yourself,
| `mosdepth` requires htslib version 1.4 or later. If you get an error
| about "`libhts.so` not found", set `LD_LIBRARY_PATH` to the directory that
| contains `libhts.so`. e.g.
|
| `LD_LIBRARY_PATH=~/src/htslib/ mosdepth -h`
|
| If you get the error `could not import: hts_check_EOF` you may need to
| install a more recent version of htslib.

Since we are not building a static lib of htslib, we need a .so file for mosdepth
to consume.

> > * What was the outcome of this action?
> > mosdepth works
> 
> Please define `works`.  As in the given test CI links it works as
> well.

That's because it has a test dependency on libhts-dev

> > It appears "mosdepth has the undecalred dependency of "libhts-dev"
> 
> Dependencies from libraries are usually detected automatically which
> works in general with extremely rare exceptions.

Note that this is a package written in nim which is a (relatively) new language and
has almost zero support from other (debian) tools, so much so that it does not have
its own debhelper tool.

> Its very uncommon that
> a non-development package needs a *-dev package.

I think in this case it really needs a '.so' in place. So I am adding this in depends
and uploading a fix. LMK if you disagree.

@Frank, thanks for reporting!

Best,
Nilesh



More information about the Debian-med-packaging mailing list