Source: libnvme
Version: 1.16.1-1
Tags: patch
User: [email protected]
Usertags: cross-satisfiability ftcbfs

libnvme fails to cross build from source for two related reasons. For
one thing it depends on python3-dev and that happens to not work for
cross compilation. For cross building, this dependency needs to be split
into libpython3-dev and python3-dev:native.

The actual extension build is not being told about the host
architecture. As a result, it uses the build architecture sysconfig and
emits an extension named for the build architecture. On Debian, the
sysconfig module needs to be diverted for cross builds.

I'm attaching a patch addressing both aspects. Please consider applying
it.

Helmut
diff -Nru libnvme-1.16.1/debian/changelog libnvme-1.16.1/debian/changelog
--- libnvme-1.16.1/debian/changelog     2025-11-09 20:13:29.000000000 +0100
+++ libnvme-1.16.1/debian/changelog     2025-12-17 12:26:03.000000000 +0100
@@ -1,3 +1,12 @@
+libnvme (1.16.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Multiarchify Python Build-Depends.
+    + Export cross sysconfig name.
+
+ -- Helmut Grohne <[email protected]>  Wed, 17 Dec 2025 12:26:03 +0100
+
 libnvme (1.16.1-1) sid; urgency=medium
 
   * Merging upstream version 1.16.1.
diff -Nru libnvme-1.16.1/debian/control libnvme-1.16.1/debian/control
--- libnvme-1.16.1/debian/control       2025-11-09 20:13:21.000000000 +0100
+++ libnvme-1.16.1/debian/control       2025-12-17 12:26:01.000000000 +0100
@@ -11,10 +11,11 @@
  libdbus-1-dev,
  libjson-c-dev,
  libkeyutils-dev,
+ libpython3-dev,
  libssl-dev,
  meson (>= 1.0.0-1.1~),
  pkg-config,
- python3-dev,
+ python3-dev:native,
  swig,
 Standards-Version: 4.7.2
 Homepage: https://github.com/linux-nvme/libnvme
diff -Nru libnvme-1.16.1/debian/rules libnvme-1.16.1/debian/rules
--- libnvme-1.16.1/debian/rules 2025-11-09 20:13:21.000000000 +0100
+++ libnvme-1.16.1/debian/rules 2025-12-17 12:26:03.000000000 +0100
@@ -1,7 +1,13 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 export KBUILD_BUILD_TIMESTAMP = "@$(SOURCE_DATE_EPOCH)"
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+export 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}
+endif
+
 %:
        dh ${@} --buildsystem=meson --with python3
 

Reply via email to