From 146f83767434c9385648c2dd8de98e1cdf1e8a0b Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Wed, 21 Oct 2026 19:10:44 +0200 Subject: [PATCH 1/2] Give the catalog harness the fconv() the engine now calls Engine 28167dd made htslines.c open its files through fconv(), which tools/catalog-lists-test.cpp links without. The encoding job has reded on every pull request since, with "undefined reference to `fconv'". The real one is in the engine's htsconcat.c, which reaches htscore.h and so the coucal submodule the engine checkout does not fetch. A stub is honest here: putting abort() inside it changed nothing, so the harness never calls it, and it exists for the linker alone. Signed-off-by: Xavier Roche Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Xavier Roche --- tools/catalog-lists-test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/catalog-lists-test.cpp b/tools/catalog-lists-test.cpp index 475836f..92159bb 100644 --- a/tools/catalog-lists-test.cpp +++ b/tools/catalog-lists-test.cpp @@ -19,6 +19,14 @@ #define CATALOG_LINE_MAX 8000 #define CATALOG_FLAGS (HTS_LINE_DROP_TAB | HTS_LINE_DROP_FF | HTS_LINE_DROP_NUL) +/* htslines.c calls fconv() on the paths that open a file by name, and this harness takes + none of them: it opens the catalogs itself. The real one is in the engine's htsconcat.c, + which reaches htscore.h and the coucal submodule CI does not check out. */ +extern "C" char *fconv(char *catbuff, size_t size, const char *a) { + snprintf(catbuff, size, "%s", a); + return catbuff; +} + typedef std::map Catalog; /* LANGINTKEY() and LANGSEL() both answer "" for a key they do not hold. */ From c81405976d5ecffbee1baaab180c25fee5681295 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Wed, 21 Oct 2026 20:41:20 +0200 Subject: [PATCH 2/2] Cut the stub's comment, and name the right engine commit The three-line block answered two questions where one mattered to a reader editing the stub. The header chain behind the real fconv() is not that question. The first commit message blamed engine 28167dd. That is PR #2003 and it only touched src/htsparse.c. The real one is 0885bc79, PR #2001, which added hts_fopen_private() to htslines.c. A `git log -S` in a --depth 1 clone can only answer with HEAD, which is how it got named. Signed-off-by: Xavier Roche Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Xavier Roche --- tools/catalog-lists-test.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/catalog-lists-test.cpp b/tools/catalog-lists-test.cpp index 92159bb..2dfb6f1 100644 --- a/tools/catalog-lists-test.cpp +++ b/tools/catalog-lists-test.cpp @@ -19,9 +19,8 @@ #define CATALOG_LINE_MAX 8000 #define CATALOG_FLAGS (HTS_LINE_DROP_TAB | HTS_LINE_DROP_FF | HTS_LINE_DROP_NUL) -/* htslines.c calls fconv() on the paths that open a file by name, and this harness takes - none of them: it opens the catalogs itself. The real one is in the engine's htsconcat.c, - which reaches htscore.h and the coucal submodule CI does not check out. */ +/* Here for the linker alone, because this harness opens the catalogs itself and reaches + no path that calls fconv(). The engine's own one needs the coucal submodule CI skips. */ extern "C" char *fconv(char *catbuff, size_t size, const char *a) { snprintf(catbuff, size, "%s", a); return catbuff;