[Debian-med-packaging] Sambamba release

Matthias Klumpp matthias at tenstral.net
Thu Oct 4 10:14:15 BST 2018


Hey :-)

I moved to a new place last week, and I am still without internet
connection at my new home, hence the really slow replies, sorry for
that.
At the moment I'm replying from work, so here's just a quick comment
on the issue.

Am Do., 4. Okt. 2018 um 10:37 Uhr schrieb Andreas Tille <andreas at fam-tille.de>:
>
> Hi Pjotr,
> On Thu, Oct 04, 2018 at 09:03:03AM +0200, Pjotr Prins wrote:
> > Hi Andreas,
> > I released a new version of sambamba. Sorry for the delay.
>
> Thanks a lot for the prompt information.  That's very helpful.
> Unfortunately there seems to be an issue with the meson.build file[1].
> Matthias once added this to enable an easy build but I think its a bit
> unfortunate if we maintain in Debian a separate build system which
> always needs adaption (which is hard for me since I neither speak D nor
> meson :-().
>
> @Matthias: What was your initial motivation to replace the Makefile
> provided by sambamba by meson?  I was able to adapt it for the
> 0.6.8-pre3 release but now it fails with:

The motivation was - as far as I remember - that in Debian we really
can't use bundled copies of BioD, htslib and all the other libraries
sambamba uses. Therefore they need to be found, with pkg-config[1]
being the obvious choice to do that. Meson with its D support makes it
really easy to write a build definition that can find stuff which
installs a pkg-config file.
One could certainly also craft a Makefile that uses pkg-config to find
stuff, but back then that was simply too much work for me compared to
writing a small Meson build definition.

[1]: https://en.wikipedia.org/wiki/Pkg-config

> [1/80] ldc2 -I=sambamba at exe -I=. -I=.. -I/usr/include/d -enable-color -O -g -release -wi   -of='sambamba at exe/sambamba_main.d.o' -c ../sambamba/main.d
> FAILED: sambamba at exe/sambamba_main.d.o
> ldc2 -I=sambamba at exe -I=. -I=.. -I/usr/include/d -enable-color -O -g -release -wi   -of='sambamba at exe/sambamba_main.d.o' -c ../sambamba/main.d
> ../sambamba/markdup2.d(46): Error: module `reader` is in file 'bio2/bam/reader.d' which cannot be read
> import path[0] = sambamba at exe
> import path[1] = .
> import path[2] = ..
> import path[3] = /usr/include/d
> import path[4] = /usr/lib/ldc/x86_64-linux-gnu/include/d/ldc
> import path[5] = /usr/lib/ldc/x86_64-linux-gnu/include/d
> import path[6] = /usr/include/d
> [2/80] ldc2 -I=sambamba at exe -I=. -I=.. -I/usr/include/d -enable-color -O -g -release -wi   -of='sambamba at exe/sambamba_flagstat.d.o' -c ../sambamba/flagstat.d
> [3/80] ldc2 -I=sambamba at exe -I=. -I=.. -I/usr/include/d -enable-color -O -g -release -wi   -of='sambamba at exe/sambamba_fixbins.d.o' -c ../sambamba/fixbins.d
> [4/80] ldc2 -I=sambamba at exe -I=. -I=.. -I/usr/include/d -enable-color -O -g -release -wi   -of='sambamba at exe/sambamba_depth.d.o' -c ../sambamba/depth.d
> ninja: build stopped: subcommand failed.
> dh_auto_build: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
> make: *** [debian/rules:9: build] Error 1

This actually doesn't looks like it is an issue in the sambamba Meson
definition necessarily. I need to investigate this, but my current
guess is that either BioD is not installing the file, or that an
include path for the system libbiod is missing from sambamba (I would
have expected an import path like ` /usr/include/d/biod` to be listed
as well).

> @Pjotr: Do you see any advantage of meson over make and would like to
> maintain it?  I admit I would also need to adapt the Makefile since
> currently it fails with
>
> $ make
> make: *** No rule to make target 'lz4/lib/lz4.c', needed by 'lz4/lib/liblz4.a'.  Stop.
>
> (There is no point in building that lib since it is provided by the
> package liblz4-dev in /usr/lib/<TRIPLET>/liblz4.a - so I need to remove
> that dependency inside the Makefile.)
>
> I'm just curious what kind of build system looks promising to build new
> versions of sambamba out of the box without requiring manual edits for
> the packaging.

Meson is IMHO easiest, followed by things like cmake. With a
sufficient time investment, the Makefile could also be changed to
accomodate for the packaging case (at the moment is relies on vendored
code).

Cheers,
    Matthias

-- 
I welcome VSRE emails. See http://vsre.info/



More information about the Debian-med-packaging mailing list