[Debian-med-packaging] Bug#1153099: canu: Please use Debian packaged libparasail-dev instead of the code copy shipped with canu

Andreas Tille andreas at an3as.eu
Mon Nov 9 13:13:28 GMT 2026


Hi Cheng Li,

thanks a lot for your great help to send patches to Debian Med packages.
This is really appreciated. 

Am Mon, Nov 09, 2026 at 09:34:41PM +0900 schrieb Cheng Li:
> Patches below. Smaller than I expected: canu barely uses the code copy.

Very nice!
 
> This makes nothing faster -- canu deliberately calls the scalar entry
> point and the patch keeps that. The striped kernels do become available
> once the system library is used, but that is a separate question.

I'm aware that nothing becomes faster.  I just noticed that there is a
code copy when cloning nonx86.patch from parasail.  So it will reduce
maintenance work when we can restrict necessary patches to a single
source ... which is the Debian style to do things.
 
> The patch also drops -DHAVE_ALTIVEC=1 and -DHAVE_NEON=1 from
> debian/rules. Those macros have no consumer outside the embedded
> parasail and never took effect anyway: config.h redefines both to 0
> after the command line and raises them only under MACHINETYPE_arm64 /
> MACHINETYPE_pcc64el, which is never defined (src/Makefile:159 is
> commented out, and the ppc64el spelling is wrong). Happy to drop that
> hunk if you would rather keep it separate.
> 
> Upstream this belongs to marbl/meryl-utility rather than canu -- the
> code copy is still there, and unlike canu that repository is still
> maintained (last push 2026-10-10). I have not forwarded it yet.

The long description has a hint that the development is not active
since 2021.  Forwarding changes might make sense for other users
but my guess is that there will be no further releases.
 
> What I have not done: no non-x86 build, and no autopkgtest run.

I'll wait until current canu will have hit testing and apply your
patches later (and probably remove the code copy from Debian source
tarball.
 
Thanks again
    Andreas.

> debian/patches/libparasail (new; drop debian/patches/nonx86.patch)
> ==================================================================
> 
> Author: Cheng Li <shiptux at gmail.com>
> Description: use the system parasail instead of the embedded code copy
>  src/utility/ is a copy of marbl/meryl-utility, which embeds a 41-file
>  subset of parasail 2.4.2.  Only the scalar part of it is ever built:
>  the SIMD kernels (sg_trace_striped_*, memory_{sse,avx2,neon,altivec})
>  are commented out of SOURCES, so the sg_*_dispatch.c dispatchers can
>  never be linked, and cpuid.c is compiled but never called.  Compiling
>  cpuid.c is exactly what breaks the build on architectures that are
>  neither x86, ARM nor PowerPC, which is why nonx86.patch existed.
>  .
>  Debian's parasail 2.6.2 builds on every architecture canu targets (and
>  on armhf and i386 as well).  Every declaration and both struct layouts
>  canu touches are identical between 2.4.2 and 2.6.2, so this is a link
>  change rather than a port.
>  .
>  This keeps the same algorithm: align-parasail-driver.H passes the
>  scalar parasail_sg_qb_de_trace / parasail_sg_qx_trace entry points, with
>  the striped variants commented out upstream.  Those kernels do become
>  available once the system library is used, but switching to them is a
>  separate question and not part of this change.
>  .
>  The right place for this upstream is marbl/meryl-utility, which still
>  carries the code copy and is still maintained, rather than canu itself.
> Bug-Debian: https://bugs.debian.org/1153099
> Forwarded: no
> Last-Update: 2026-11-09
> 
> --- a/src/main.mk
> +++ b/src/main.mk
> @@ -58,15 +58,6 @@
>                  utility/src/math/mt19937ar-v1.C \
>                  utility/src/math/sampledDistribution-v1.C \
>                  \
> -                utility/src/parasail/cpuid.c \
> -                utility/src/parasail/cigar.c \
> -                utility/src/parasail/memory.c \
> -                utility/src/parasail/sg.c \
> -                utility/src/parasail/sg_trace.c \
> -                utility/src/parasail/sg_qb_de_dispatch.c \
> -                utility/src/parasail/sg_qe_db_dispatch.c \
> -                utility/src/parasail/sg_qx_dispatch.c \
> -                \
>                  utility/src/sequence/dnaSeq-v1.C \
>                  utility/src/sequence/bufSeqFile-v1.C \
>                  utility/src/sequence/htsSeqFile-v1.C \
> @@ -178,7 +169,7 @@
>  
>  SYS_INCDIRS  += $(shell pkg-config --cflags-only-I openssl libcurl liblzma | sed s:-I/:/:g)
>  LDFLAGS      += $(shell pkg-config --libs-only-L   openssl libcurl liblzma)
> -LDLIBS       += $(shell pkg-config --libs-only-l   openssl libcurl liblzma) -lz -lbz2 -lsnappy -lbacktrace
> +LDLIBS       += $(shell pkg-config --libs-only-l   openssl libcurl liblzma) -lz -lbz2 -lsnappy -lbacktrace -lparasail
>  
>  SUBMAKEFILES := stores/dumpBlob.mk \
>                  stores/ovStoreBuild.mk \
> --- a/src/utility/src/align/align-parasail-driver.H
> +++ b/src/utility/src/align/align-parasail-driver.H
> @@ -22,7 +22,7 @@
>  
>  #include "system.H"
>  
> -#include "../parasail/parasail.h"
> +#include <parasail.h>
>  
>  //  A simple wrapper around parasail (https://github.com/jeffdaily/parasail).
>  //
> 
> debian/control, debian/patches/series, debian/rules
> ====================================================
> 
> --- a/debian/control
> +++ b/debian/control
> @@ -7,6 +7,7 @@
>                 libboost-dev,
>                 libmeryl-dev,
>                 libsnappy-dev,
> +               libparasail-dev,
>  # For File::Path
>                 libfilesys-df-perl,
>                 mhap,
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -4,4 +4,4 @@
>  spelling
>  do-not-trust-errno-on-success.patch
>  mhap-needs-commons-io.patch
> -nonx86.patch
> +libparasail
> --- a/debian/rules
> +++ b/debian/rules
> @@ -9,20 +9,12 @@
>  export CFLAGS := $(CPPFLAGS) $(CFLAGS)
>  export CXXFLAGS := $(CPPFLAGS) $(CXXFLAGS)
>  
> -ifeq (ppc64el,$(DEB_HOST_ARCH))
> -export CFLAGS += -DHAVE_ALTIVEC=1
> -export CXXFLAGS += -DHAVE_ALTIVEC=1
> -endif
> -ifeq (arm64,$(DEB_HOST_ARCH))
> -export CFLAGS += -DHAVE_NEON=1
> -export CXXFLAGS += -DHAVE_NEON=1
> -endif
> -
>  %:
>  	dh $@ --sourcedirectory=src/
>  
>  override_dh_auto_build:
> -	rm -Rf src/utility/src/utility/libbacktrace src/stores/libsnappy
> +	rm -Rf src/utility/src/utility/libbacktrace src/stores/libsnappy \
> +	       src/utility/src/parasail
>  	dh_auto_build
>  	find build \
>  	-name OverlapMhap.pm \
> 
> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging
> 

-- 
https://fam-tille.de



More information about the Debian-med-packaging mailing list