Package: hyprwayland-scanner
Version: 0.3.10-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:hyprland

Hi,

hyprland fails to cross build from source with an "Exec format error"
when running hyprwayland-scanner. The most common way to fix this is
marking the originating package Multi-Arch: foreign. That is
hyprwayland-scanner in this case, but before doing so it must be
considered whether such a marking is actually correct. First and
foremost, the question is whether the hyprwayland-scanner exhibits
architecture-dependent behaviour. There are two strong clues against.
One is that it deals with textual input and output formats. It
effectively translates between different forms of source. The other clue
is that it has a similar job to wayland-scanner and that is contained in
a binary packaged marked Multi-Arch: foreign (and thus deemed to not
have any architecture-dependent behaviour). To me this is sufficient
ground to move forward. Do you agree? But then, hyprwayland-scanner also
contains a .pc file and cmake support files. Those are installed into
architecture-dependent paths and that clearly violates Multi-Arch:
foreign. I looked into those files and they don't have architecture
dependent content (beyond the cmake files where the filename is
normalized for the /usr-merge). It should be feasible to install those
files into /usr/share instead of /usr/lib. Both cmake and pkgconf search
those corresponding locations and in doing so, the
architecture-dependent path goes (and the violation of Multi-Arch:
foreign) goes missing. Once moved, I think the Multi-Arch: foreign
marking is technically correct. Building hyprland succeeded with a thus
modified hyprwayland-scanner and a cross build of hyprland proceeded
quite a bit further. Please consider applying the attached patch.

Helmut
diff --minimal -Nru hyprwayland-scanner-0.3.10/debian/changelog 
hyprwayland-scanner-0.3.10/debian/changelog
--- hyprwayland-scanner-0.3.10/debian/changelog 2024-06-14 12:21:06.000000000 
+0200
+++ hyprwayland-scanner-0.3.10/debian/changelog 2024-10-15 20:19:00.000000000 
+0200
@@ -1,3 +1,10 @@
+hyprwayland-scanner (0.3.10-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Make and mark hyprwayland-scanner Multi-Arch: foreign. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 15 Oct 2024 20:19:00 +0200
+
 hyprwayland-scanner (0.3.10-1) unstable; urgency=medium
 
   * Initial release. (Closes: #1073195)
diff --minimal -Nru hyprwayland-scanner-0.3.10/debian/control 
hyprwayland-scanner-0.3.10/debian/control
--- hyprwayland-scanner-0.3.10/debian/control   2024-06-14 12:21:06.000000000 
+0200
+++ hyprwayland-scanner-0.3.10/debian/control   2024-10-15 20:18:57.000000000 
+0200
@@ -15,6 +15,7 @@
 
 Package: hyprwayland-scanner
 Architecture: any
+Multi-Arch: foreign
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
diff --minimal -Nru hyprwayland-scanner-0.3.10/debian/rules 
hyprwayland-scanner-0.3.10/debian/rules
--- hyprwayland-scanner-0.3.10/debian/rules     2024-06-14 12:21:06.000000000 
+0200
+++ hyprwayland-scanner-0.3.10/debian/rules     2024-10-15 20:18:46.000000000 
+0200
@@ -12,6 +12,6 @@
        dh $@
 
 
-#override_dh_auto_configure:
-#      dh_auto_configure -- \
-#      -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               -DCMAKE_INSTALL_LIBDIR=/usr/share

Reply via email to