Article View: linux.debian.bugs.dist
Article #7156Bug#1156148: vali: support cross building
From: Helmut Grohne
Date: Wed, 02 Dec 2026 13:30
Date: Wed, 02 Dec 2026 13:30
152 lines
7114 bytes
7114 bytes
--XQC8hfDStoDmTcmw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Source: vali
Version: 0.1.1-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:kanshi
vali has several issues related to cross building.
vali fails to cross build from source, because it both installs the vali
tool and runs it. Therefore, meson figures that it needs an exe_wrapper
to run it and has none. This tool actually is architecture-independent.
Ideally, it is built twice (for install and for running during build)
during cross builds. The cross.patch contained in the attached patch
addresses this very problem. I takes care to not affect native builds by
reusing the built binary for both purposes.
Beyond this, consumers of vali such as src:kanshi fail to cross build.
Again, the failure is running the vali tool. A dependency on "vali" is
interpreted as a host architecture package and consequently cannot be
run. As the tool is architecture-independent (see above), the package
can be marked Multi-Arch: foreign.
While at it, I suggest also marking the shared library (libvali1) for
coinstallation. This is occasionally needed when a cross build requires
both the host's development package and some other component depends on
the native library.
The attached patch addresses all of the mentioned problems. Please
consider applying it and forwarding the embedded cross.patch upstream.
Helmut
--XQC8hfDStoDmTcmw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="vali_0.1.1-1.1.debdiff"
diff -Nru vali-0.1.1/debian/changelog vali-0.1.1/debian/changelog
--- vali-0.1.1/debian/changelog 2026-03-05 19:42:13.000000000 +0100
+++ vali-0.1.1/debian/changelog 2026-12-01 17:37:06.000000000 +0100
@@ -1,3 +1,13 @@
+vali (0.1.1-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Improve cross building. (Closes: #-1)
+ + Fix FTCBFS: cross.patch: build the vali conversion tool twice.
+ + Mark the vali tool Multi-Arch: foreign
+ + Mark the libvali1 library Multi-Arch: same
+
+ -- Helmut Grohne <helmut@subdivi.de> Tue, 01 Dec 2026 17:37:06 +0100
+
vali (0.1.1-1) unstable; urgency=medium
* New upstream release
diff -Nru vali-0.1.1/debian/control vali-0.1.1/debian/control
--- vali-0.1.1/debian/control 2026-03-05 19:42:13.000000000 +0100
+++ vali-0.1.1/debian/control 2026-12-01 17:37:06.000000000 +0100
@@ -14,6 +14,7 @@
Package: vali
Section: misc
Architecture: any
+Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Code generator for the "vali" varlink C implementation
vali is a Varlink C implementation and code generator.
@@ -32,6 +33,7 @@
Package: libvali1
Section: libs
Architecture: any
+Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Varlink "vali" C implementation
vali is a Varlink C implementation and code generator.
diff -Nru vali-0.1.1/debian/patches/cross.patch vali-0.1.1/debian/patches/cross.patch
--- vali-0.1.1/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ vali-0.1.1/debian/patches/cross.patch 2026-12-01 17:37:06.000000000 +0100
@@ -0,0 +1,63 @@
+--- vali-0.1.1.orig/example/meson.build
++++ vali-0.1.1/example/meson.build
+@@ -1,6 +1,6 @@
+ example_gen = custom_target(
+ 'example_gen',
+- command: [tool, 'generate', '--prefix=ftl', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
++ command: [native_tool, 'generate', '--prefix=ftl', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
+ input: 'example.varlink',
+ output: ['example.h', 'example.c'],
+ )
+--- vali-0.1.1.orig/meson.build
++++ vali-0.1.1/meson.build
+@@ -47,9 +47,21 @@
+ install: true,
+ )
+
++if meson.can_run_host_binaries()
++ native_tool = tool
++else
++ native_tool = executable(
++ 'native_vali',
++ ['tool.c', 'def.c', 'util.c'],
++ include_directories: inc,
++ install: false,
++ native: true,
++ )
++endif
++
+ org_varlink_service = custom_target(
+ 'service_iface',
+- command: [tool, 'generate', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
++ command: [native_tool, 'generate', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
+ input: 'org.varlink.service.varlink',
+ output: ['org.varlink.service.h', 'org.varlink.service.c'],
+ )
+@@ -92,7 +104,7 @@
+ ],
+ )
+
+-meson.override_find_program('vali', tool)
++meson.override_find_program('vali', native_tool)
+ meson.override_dependency('vali', vali)
+
+ subdir('example')
+--- vali-0.1.1.orig/test/meson.build
++++ vali-0.1.1/test/meson.build
+@@ -1,6 +1,6 @@
+ test_gen = custom_target(
+ 'test_gen',
+- command: [tool, 'generate', '--prefix=test', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
++ command: [native_tool, 'generate', '--prefix=test', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
+ input: 'test.varlink',
+ output: ['test-gen.h', 'test-gen.c'],
+ )
+@@ -10,7 +10,7 @@
+
+ certification_gen = custom_target(
+ 'certification_gen',
+- command: [tool, 'generate', '--prefix=cert', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
++ command: [native_tool, 'generate', '--prefix=cert', '@INPUT@', '@OUTPUT0@', '@OUTPUT1@'],
+ input: 'org.varlink.certification.varlink',
+ output: ['certification-gen.h', 'certification-gen.c'],
+ )
diff -Nru vali-0.1.1/debian/patches/series vali-0.1.1/debian/patches/series
--- vali-0.1.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ vali-0.1.1/debian/patches/series 2026-12-01 17:37:06.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
--XQC8hfDStoDmTcmw--
Technical Details
Message-ID:
<O5Szf-fy45-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Helmut Grohne <helmut@subdivi.de> Newsgroups: linux.debian.bugs.dist Subject: Bug#1156148: vali: support cross building Date: Wed, 02 Dec 2026 14:30:01 +0100 Message-ID: <O5Szf-fy45-1@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Dec 2 13:27:12 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Helmut Grohne <helmut@subdivi.de>, 1156148@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: birger@debian.org X-Debian-Pr-Message: report 1156148 X-Debian-Pr-Package: src:vali X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: vali MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="XQC8hfDStoDmTcmw" Content-Disposition: inline X-Reportbug-Version: 13.2.0 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006508 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 152 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 1 Dec 2026 19:05:11 +0100 X-Original-Message-ID: <20261201180511.GA2877076@subdivi.de>