[med-svn] [Git][med-team/libxg][master] Fix build, close ITP
Andreas Tille (@tille)
gitlab at salsa.debian.org
Fri Oct 30 08:17:05 GMT 2026
Andreas Tille pushed to branch master at Debian Med / libxg
Commits:
d25db29f by Andreas Tille at 2026-10-30T09:16:42+01:00
Fix build, close ITP
- - - - -
4 changed files:
- debian/changelog
- debian/control
- debian/libxg-dev.install
- debian/patches/use-system-deps.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,5 @@
libxg (0.1.0+git20251103.8dd476d-1) UNRELEASED; urgency=medium
- TODO: https://github.com/vgteam/gfakluge/
- * Initial release (Closes: #XXXXXX).
+ * Initial release (Closes: #1152520).
-- Andreas Tille <tille at debian.org> Tue, 27 Oct 2026 17:30:00 +0100
=====================================
debian/control
=====================================
@@ -9,13 +9,13 @@ Build-Depends:
cmake,
libargs-dev,
libatomic-queue-dev,
+ libdivsufsort-dev,
libgfakluge-dev,
libhandlegraph-dev,
libips4o-dev,
libmio-dev,
libmmmulti-dev,
libsdsl-dev (>= 2.4),
- pkgconf,
Vcs-Browser: https://salsa.debian.org/med-team/libxg
Vcs-Git: https://salsa.debian.org/med-team/libxg.git
Homepage: https://github.com/vgteam/xg
@@ -62,10 +62,12 @@ Depends:
${misc:Depends},
libxg0 (= ${binary:Version}),
libhandlegraph-dev (>= 2024-11-22-2),
- libips4o-dev,
libatomic-queue-dev,
+ libgfakluge-dev,
+ libips4o-dev,
+ libmio-dev,
+ libmmmulti-dev,
libsdsl-dev (>= 2.4),
-Conflicts: libmmmulti-dev
Description: succinct static variation graph - development files
xg is a handle-graph implementation of the XG succinct graph index, the
succinct static variation graph representation developed for the vg
=====================================
debian/libxg-dev.install
=====================================
@@ -1,4 +1,2 @@
usr/include/xg
-usr/include/mio
-usr/include/mmmultimap.hpp
usr/lib/*/libxg.so
=====================================
debian/patches/use-system-deps.patch
=====================================
@@ -1,33 +1,21 @@
Description: Build against Debian-packaged dependencies
The upstream build downloads and builds every dependency from its bundled
git submodules (libhandlegraph, sdsl-lite, mmmulti, ips4o, atomic_queue,
- args, gfakluge, BBHash) via ExternalProject and hardcodes -O3. All of these
- except gfakluge are packaged in Debian, and gfakluge is header only, so use
- the system libraries instead, build a shared library with a SONAME, install
- the command line tool and the headers, and let dpkg-buildflags control the
- compiler flags.
+ args, gfakluge, BBHash) via ExternalProject and hardcodes -O3. All of them
+ are packaged in Debian, so build against the system libraries instead, build
+ a shared library with a SONAME, install the command line tool and the
+ headers, and let dpkg-buildflags control the compiler flags.
.
- The version of mmmulti pinned by upstream is embedded in the source tree
- (deps/mmmulti) together with its bundled mio headers: the mmmulti packaged
- in Debian (libmmmulti-dev) does not work with the atomic_queue version in
- Debian unstable.
- .
- The build uses C++17: mmmulti's atomic_queue-backed map is over-aligned
- (64 bytes) and is heap-allocated, so C++14 does not guarantee aligned
- allocation and aborts with an assertion failure.
- .
- The vendored mmmulti and mio headers are installed so that consumers of the
- libxg public headers (xg.hpp includes mmmultimap.hpp, which includes
- mio/mmap.hpp) can build against the installed package.
+ The build uses C++17 because mmmulti's atomic_queue-backed map is
+ over-aligned and heap-allocated, which C++14 does not handle.
Author: Andreas Tille <tille at debian.org>
-Last-Update: 2026-10-27
-Assisted-By: scaleway/deepseek-v4-flash-0731
+Last-Update: 2026-10-30
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2ebae9c..b815175 100644
+index 2ebae9c..be43e6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1,215 +1,93 @@
+@@ -1,215 +1,79 @@
# Specify the minimum version for CMake
-
-cmake_minimum_required(VERSION 3.1)
@@ -163,19 +151,12 @@ index 2ebae9c..b815175 100644
-
-#set(CMAKE_BUILD_TYPE Release)
-
--add_library(xg_objs OBJECT src/xg.cpp)
+project(xg VERSION 0.0.0)
-
--add_dependencies(xg_objs handlegraph)
--add_dependencies(xg_objs sdsl-lite)
--add_dependencies(xg_objs mmmulti)
--add_dependencies(xg_objs atomicqueue)
--add_dependencies(xg_objs tayweeargs)
--add_dependencies(xg_objs gfakluge)
--add_dependencies(xg_objs ips4o)
++
+include(GNUInstallDirs)
-
-+# We build using c++14
++
++# mmmulti's atomic_queue-backed map is over-aligned and heap-allocated, so
++# C++14 does not guarantee aligned allocation.
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
@@ -184,41 +165,32 @@ index 2ebae9c..b815175 100644
+# libhandlegraph (system package, provides libhandlegraph::handlegraph_shared)
+find_package(libhandlegraph REQUIRED)
+
-+# sdsl (system package)
++# sdsl and divsufsort (system packages): sdsl's suffix array construction
++# templates include divsufsort.h, which lives in the multiarch include dir
+find_path(SDSL_INCLUDE_DIR sdsl/bit_vectors.hpp REQUIRED)
++find_path(DIVSUFSORT_INCLUDE_DIR divsufsort.h REQUIRED)
+find_library(SDSL_LIBRARY NAMES sdsl REQUIRED)
-+
-+# divsufsort is used by the sdsl suffix array construction templates
+find_library(DIVSUFSORT_LIBRARY NAMES divsufsort REQUIRED)
+find_library(DIVSUFSORT64_LIBRARY NAMES divsufsort64 REQUIRED)
+
-+# mmmulti (vendored in the source tree, header only)
-+set(MMMULTI_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/mmmulti/src")
-+set(MIO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/mmmulti/deps/mio/include")
-+
-+# ips4o (system package, header only)
++# header-only dependencies
++find_path(MMMULTI_INCLUDE_DIR mmmultimap.hpp REQUIRED)
++find_path(MIO_INCLUDE_DIR mio/mmap.hpp REQUIRED)
+find_path(IPS4O_INCLUDE_DIR ips4o.hpp REQUIRED)
-+
-+# atomic_queue (system package, header only)
+find_path(ATOMIC_QUEUE_INCLUDE_DIR atomic_queue/atomic_queue.h REQUIRED)
-+
-+# taywee's C++ args library (system package, header only)
+find_path(ARGS_INCLUDE_DIR args.hxx REQUIRED)
-+
-+# gfakluge (vendored in the source tree, now header only)
-+set(GFAKLUGE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/gfakluge/src")
-+set(GFAKLUGE_TINYFA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/gfakluge/src/tinyFA")
++find_path(GFAKLUGE_INCLUDE_DIR gfakluge.hpp REQUIRED)
+
+set(XG_INCLUDES
+ "${CMAKE_CURRENT_SOURCE_DIR}/src"
+ "${SDSL_INCLUDE_DIR}"
++ "${DIVSUFSORT_INCLUDE_DIR}"
+ "${MMMULTI_INCLUDE_DIR}"
+ "${MIO_INCLUDE_DIR}"
+ "${IPS4O_INCLUDE_DIR}"
-+ "${ATOMIC_QUEUE_INCLUDE_DIR}/atomic_queue"
++ "${ATOMIC_QUEUE_INCLUDE_DIR}"
+ "${ARGS_INCLUDE_DIR}"
-+ "${GFAKLUGE_INCLUDE_DIR}"
-+ "${GFAKLUGE_TINYFA_INCLUDE_DIR}")
++ "${GFAKLUGE_INCLUDE_DIR}")
+
+set(XG_LIBS
+ "${SDSL_LIBRARY}"
@@ -230,7 +202,16 @@ index 2ebae9c..b815175 100644
+
+# Build the xg object files once and reuse them for the shared library
+# and the command line tool.
-+add_library(xg_objs OBJECT src/xg.cpp)
+ add_library(xg_objs OBJECT src/xg.cpp)
+-
+-add_dependencies(xg_objs handlegraph)
+-add_dependencies(xg_objs sdsl-lite)
+-add_dependencies(xg_objs mmmulti)
+-add_dependencies(xg_objs atomicqueue)
+-add_dependencies(xg_objs tayweeargs)
+-add_dependencies(xg_objs gfakluge)
+-add_dependencies(xg_objs ips4o)
+-
set_target_properties(xg_objs PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
-
-#set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib)
@@ -324,9 +305,3 @@ index 2ebae9c..b815175 100644
+install(TARGETS xg
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES src/xg.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xg)
-+# the vendored mmmulti/mio headers are part of the public API (xg.hpp
-+# includes mmmultimap.hpp, which includes mio/mmap.hpp)
-+install(FILES ${MMMULTI_INCLUDE_DIR}/mmmultimap.hpp
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-+install(DIRECTORY ${MIO_INCLUDE_DIR}/mio
-+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
View it on GitLab: https://salsa.debian.org/med-team/libxg/-/commit/d25db29f923c49cbdd844d657e6229922dcd67ef
--
View it on GitLab: https://salsa.debian.org/med-team/libxg/-/commit/d25db29f923c49cbdd844d657e6229922dcd67ef
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261030/57d87fdf/attachment-0001.htm>
More information about the debian-med-commit
mailing list