🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #3896

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

#3896
From: Andreas Tille
Date: Mon, 09 Nov 2026 13:20
168 lines
8878 bytes
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@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@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging
> 

-- 
https://fam-tille.de
Technical Details
Message-ID: <NXxrY-aOTL-13@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NW4BH-9Zkf-7@gated-at.bofh.it> <NW4BH-9Zkf-7@gated-at.bofh.it> <NXwPf-aOve-11@gated-at.bofh.it> <NW4BH-9Zkf-7@gated-at.bofh.it> <NXwPf-aOve-11@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Andreas Tille <andreas@an3as.eu>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153099: canu: Please use Debian packaged libparasail-dev instead of the code copy shipped with canu
Date: Mon, 09 Nov 2026 14:20:02 +0100
Message-ID: <NXxrY-aOTL-13@gated-at.bofh.it>
References: <NW4BH-9Zkf-7@gated-at.bofh.it> <NW4BH-9Zkf-7@gated-at.bofh.it> <NXwPf-aOve-11@gated-at.bofh.it> <NW4BH-9Zkf-7@gated-at.bofh.it> <NXwPf-aOve-11@gated-at.bofh.it>
X-Original-To: Cheng Li <shiptux@gmail.com>, 1153099@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Mon Nov  9 13:15:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: Andreas Tille <andreas@an3as.eu>, 1153099@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-med-packaging@lists.alioth.debian.org
X-Debian-Pr-Message: followup 1153099
X-Debian-Pr-Package: src:canu
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: canu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001659
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 168
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 9 Nov 2026 14:13:28 +0100
X-Original-Message-ID: <avHG-I7Ewi-UyPku@an3as.eu>
X-Original-References: <179388069815.2134107.2294598298200658378.reportbug@energija.fam-tille.de> <179388069815.2134107.2294598298200658378.reportbug@energija.fam-tille.de> <20261109123446.3849416-1-shiptux@gmail.com> <179388069815.2134107.2294598298200658378.reportbug@energija.fam-tille.de> <20261109123446.3849416-1-shiptux@gmail.com>