Skip to content

Build LAST from a submodule - #2034

Merged
glennhickey merged 1 commit into
masterfrom
last-submodule
Oct 8, 2026
Merged

glennhickey merged 1 commit into
masterfrom
last-submodule

Conversation

@glennhickey

Copy link
Copy Markdown
Collaborator

Build LAST with cactus, from a submodule, instead of downloading and building it in build-tools/downloadPangenomeTools.

Why: cactus-pangenome and cactus-minigraph already train their scoring with LAST by default (<graphmap lastTrain>). #2027 would have progressive cactus train lastz's scoring with it too, on by default. LAST is then as central to cactus as lastz, so it should be built the same way.

What changes

  • Submodule: submodules/last, from gitlab.com/mcfrith/last, pinned at 1651. That's the version the download script was building, so nothing changes in behaviour.
  • Makefile: a suball.last rule builds LAST alongside lastz and red. It installs lastal, lastdb, last-train and last-postmask into bin/.
    • Patches kept: the download script's two makefile patches carry over, so cactus's CPU flags and jemalloc still reach lastal and lastdb.
    • Guard: the build stops with a message if a LAST update stops the CXXFLAGS patch from matching. An earlier version of that sed silently matched nothing for years.
    • ARM: the rule drops LAST's -msse4, which ARM compilers reject, as LAST's README advises. Without that, plain make would now fail on ARM.
  • downloadPangenomeTools: no longer builds LAST.
  • Docker, CI and the binary release: all get LAST through make. CI already clones submodules recursively. The release's check-static covers the LAST binaries, in place of the download script's own ldd check.

Existing clones need git submodule update --init before building.

Testing

On x86:

  • Build: lastal 1651 builds with cactus's CPU flags (-march=x86-64-v3) and links jemalloc the same way Red and lastz do.
  • Rebuild: a second build compiles nothing.
  • Training: this build's lastdb -c -R10 and last-train --revsym --matsym --gapsym -C2 ran on two evolver mammal genomes.

Not tested: the ARM build, and a full Docker build. CI's make docker will be the first.

#2027 has this same commit at its base, so the commit drops out of #2027's diff once this merges.

🤖 Generated with Claude Code

cactus-pangenome and cactus-minigraph train their scoring with LAST by
default (<graphmap lastTrain>), and progressive cactus is to train
lastz's with it too.  Build LAST with cactus, from a submodule alongside
lastz and red, instead of downloading it with the pangenome tools.  The
submodule is pinned at 1651, the version downloadPangenomeTools has
been cloning and building.

The rule carries over the script's two makefile patches, which let
cactus's CXXFLAGS (its CPU baseline) and jemalloc reach lastal and
lastdb.  The build still fails if an upstream change stops the first
patch from matching.  On ARM, where cactus's own make now builds LAST,
the rule also drops LAST's -msse4, which only x86 compilers take, as
LAST's README does for ARM.  The Docker image, CI and the binary
release all build LAST through make.  The release's check-static
covers its binaries, as the script's own ldd check did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@glennhickey
glennhickey merged commit 8c75ede into master Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant