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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 483 |
Nodes: | 16 (2 / 14) |
Uptime: | 176:58:52 |
Calls: | 9,597 |
Calls today: | 3 |
Files: | 13,679 |
Messages: | 6,150,515 |