Stephen Kitt:
> Hi,
> 
> On Thu, 08 Apr 2021 01:35:49 +0100, Ximin Luo <[email protected]> wrote:
>> Please mark gcc-mingw-w64-base "Multi-Arch: same" so that different
>> architectures can be co-installed. This is necessary to support
>> co-installing the i686 and x86-64 toolchain packages, both of which depend
>> on this package but for their respective architectures.
>>
>> As far as I can tell this package has the same content on all
>> architectures, so this should be safe:
>> https://wiki.debian.org/MultiArch/Hints#set_Multi-Arch:_same
> 
> It should be, yes, but I’m curious about why you’d want to install the
> packages for both architectures simultaneously. Could you explain the
> scenario?
> 

Hi, yes my scenario is to co-install both libstd-rust-dev-windows:i386 and 
libstd-rust-dev-windows:amd64 so that my rustc can cross-compile to both 32-bit 
and 64-bit windows at the same time.

To do that, I need to co-install both gcc-mingw-w64-i686-posix:i386 and 
gcc-mingw-w64-x86-64-posix, but this is not yet possible due to this bug.

Alternatively (and thinking about it, you should probably both), you can mark 
the compiler packages gcc-mingw-w64-*-* as "Multi-Arch: foreign" - this would 
e.g. allow gcc-mingw-w64-i686-posix:amd64 to satisfy the dependency from 
libstd-rust-dev-windows:i386 -> gcc-mingw-w64-i686-posix [no explicit 
architecture annotation] - without Multi-Arch: foreign, this dependency can 
only be satisfied by "gcc-mingw-w64-i686-posix:i386". It seems that 
gcc-mingw-w64-i686-posix:amd64 gcc-mingw-w64-x86-64-posix:amd64 are already 
co-installable, so this would work for me too.

Multi-Arch: foreign is what the gcc cross-compilers do, e.g. 
gcc-powerpc-linux-gnu. So in summary, amending my original instructions:

- Multi-Arch: foreign - gcc-mingw-w64-*-*
- Multi-Arch: same - gcc-mingw-w64-base - in fact the Debian QA Multi-Arch 
hinter[1] goes a step further, it suggests you convert this package to 
Architecture: all and mark it Multi-Arch: foreign; I'm not sure why this 
package is arch-dependent in the first place.

[1] 
https://qa.debian.org/[email protected]&piuparts=1#gcc-mingw-w64

(Note, libstd-rust-dev-windows:i386 doesn't exist in the Debian FTP archive 
yet, but I'm testing it locally - I'm only now just getting around to updating 
the rustc package to support cross-compiling to 32-bit windows after you fixed 
#540782, so thanks for that.)

Best,
Ximin

-- 
GPG: ed25519/56034877E1F87C35
https://github.com/infinity0/pubkeys.git

Reply via email to