Article View: linux.debian.bugs.dist
Article #3890Bug#1153099: canu: Please use Debian packaged libparasail-dev instead of the code copy shipped with canu
From: Cheng Li
Date: Mon, 09 Nov 2026 12:40
Date: Mon, 09 Nov 2026 12:40
181 lines
10250 bytes
10250 bytes
Control: tags -1 + patch
Hi Andreas,
Patches below. Smaller than I expected: canu barely uses the code copy.
Only its scalar part is ever built -- the SIMD kernels are commented
out of SOURCES, the sg_*_dispatch.c dispatchers can therefore never be
linked, and the driver passes parasail_sg_qb_de_trace directly. cpuid.c
is compiled but never called, and compiling it is exactly what fails on
architectures that are neither x86, ARM nor PowerPC. So the FTBFS is at
compile time, and dropping the file from SOURCES retires nonx86.patch.
canu uses 16 symbols, all public in parasail.h, and the signatures and
struct layouts it touches are byte-identical between the embedded 2.4.2
and Debian's 2.6.2.
What I checked:
- A behavioural comparison: the same ten-case harness built twice
against align-parasail-driver, once against libparasail.so.8 and once
against the embedded 2.4.2 compiled into a static archive the way
canu does it. Cases cover exact overlaps, mismatches, insertions,
deletions, homopolymers, no real overlap, and both entry points
(sg_qb_de and sg_qx). Comparing score, length, matches, mismatches,
gaps, all four coordinates and the error rate: identical in all ten.
- A full binary build, sbuild in unshare mode against sid. All seven
patches apply cleanly and the build succeeds.
- That the de-vendoring actually takes effect: dpkg-shlibdeps picks up
Depends: libparasail8 (>= 2.4.1) on its own, utgcns gains a NEEDED
entry for libparasail.so.8 and eleven dynamic parasail symbols, and
it shrinks by 60 KiB against the 2.3+dfsg-2 binary in the archive.
utgcns is the only binary affected, which matches unitigConsensus.C
being the only non-test consumer.
Lintian reports unreleased-changes and two NMU warnings, but those come
from my own test changelog entry (UNRELEASED, and I am not the
maintainer), not from the change. The only patch-related tag is an
informational patch-not-forwarded-upstream.
Two things worth noting.
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.
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.
What I have not done: no non-x86 build, and no autopkgtest run.
Kind regards,
Cheng Li
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 \
Technical Details
Message-ID:
<NXwPf-aOve-11@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<NW4BH-9Zkf-7@gated-at.bofh.it> <NW4BH-9Zkf-7@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.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Cheng Li <shiptux@gmail.com>
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 13:40:01 +0100
Message-ID: <NXwPf-aOve-11@gated-at.bofh.it>
References: <NW4BH-9Zkf-7@gated-at.bofh.it> <NW4BH-9Zkf-7@gated-at.bofh.it>
X-Original-To: 1153099@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Nov 9 12:37:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.547
Reply-To: Cheng Li <shiptux@gmail.com>, 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-Source: canu
X-Gm-Message-State: APuU4Z/yGsC3D5hHG1iBfu1dLJ67X8ljbZfx8MsgBz/agmVC/CVs0dtu
cfJCZTkCGRhUH9x4vAqvNHvMAtLMayonNIMnoW9IKtraqFe8ryTcYIv/mHYt1R/d
X-Gm-Gg: AYBFou0/ls2iL+uyW/ly40+iKDgr/OxWvN5U3aagUUVlLEiPmenGygA+UzVYOo3R4y3
7ELTXDgvvqYOSV3jSvE12xvXUy6BXRzN8YXZ+fh6lSKCiyS3JYTjZ0JgsAyiC26py9q1CvyPZgt
bfSPkw3tokTJ+S4QYc5L7iRR/0zXzfuwbtyUFDYb86EPEgu1GtdnIyO9kg2QU/NOpR6BI6Bshm6
mwdo4BKvPlN0MhY96x7K4XYLHEdHhd3SWd6abHBkhV2Yr1jzweRjc4ORNOUorRcLebEVpL2uFCp
QoofATzvIKLgk6zsS7WdcJBMPbeSQ8Dpa6x5mup7USYMcs9w2NJDYMSAsWmsigGXNWiBlOZhHFS
2xcPqU296DxlYwq2iKgK+whc1JZlPH/YQNjRHCFy0+IfXSGxLg7S85Fa9WFRVsQCuPIEdMHk0Bc
KKlzCg8LEcpPeW9r97MK0NUwXhwCmrE1mHh7jK/LFahpEqTuewHAaoKCpnFTXQeArYaGr1tgry+
gdRXYPqEZwhmS65JCYYF0IUoiqh7vGwgYgKVLF1wo7ZcnfJtC0mjA6LnsIqpQ5bI0fqlGIk7gRF
lXBnZdY0nlCQ5Eh2cxc0xXO4ZjV7oYbrYykZqjWm2B9gmqfnVCC8xWqpBgw7jUPHsuQOe55IyS2
LoyXOn6lkhATEtTZW0dpRmEMG2SXkGw==
X-Received: by 2002:a05:690c:c4e6:b0:8b0:d9ff:4f50 with SMTP id 00721157ae682-8b36c9cd425mr26738967b3.16.1794227695909;
Mon, 09 Nov 2026 04:34:55 -0800 (PST)
X-Mailer: git-send-email 2.47.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001649
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 181
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 9 Nov 2026 21:34:41 +0900
X-Original-Message-ID: <20261109123446.3849416-1-shiptux@gmail.com>
X-Original-References: <179388069815.2134107.2294598298200658378.reportbug@energija.fam-tille.de> <179388069815.2134107.2294598298200658378.reportbug@energija.fam-tille.de>