Re: Multiarch, policy and cross-compiler libraries for non-Debian architectures
On Fri, Apr 22, 2011 at 11:04:59PM +0200, Stephen Kitt wrote:
> Hello,
>
> Now that multiarch is here, I've been wondering whether and how it applies to
> cross-compiler libraries for non-Debian architectures, for example Microsoft
> Windows (I'm the new maintainer of mingw-w64).
> It seems to me though that it would be nice to follow the multiarch directory
> structure for cross-compilers to non-Debian architectures
Sounds like a great idea.
> (basically, anything for which there is no valid "Architecture" field
> value for a Debian package). Thus for example mingw-w64-dev would install
> headers in /usr/include/{i686,x86_64}-w64-mingw32 and libraries in
> /usr/lib/{i686,x86_64}-w64-mingw32
Such dirs cannot include the compiler's name, since there are multiple
compilers for the architecture. Binaries compiled with
i586-mingw32msvc-gcc, i686-w64-mingw32-gcc and MSVC share the same ABI.
Even specific models of CPUs are no good: on i386, gcc -dumpmachine returns
i486-linux-gnu yet the arch triplet is i386-linux-gnu.
Mismatched triplets would make these binaries have effectively different
architectures.
> Unfortunately this appears to go against policy 9.1.1, which forbids packages
> installing files into triplet-based directories under /usr/lib other
> than /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH). Since the files I'm
> thinking of aren't usable on any Debian architecture, they're provided as
> "Architecture: all" packages and don't have a corresponding
> DEB_HOST_MULTIARCH triplet.
>
> Would it be acceptable to introduce an exception to policy allowing this?
> Something along the lines of
>
> An exception is granted for `Architecture: all' packages containing
> libraries targeting platforms for which there is no Debian
> architecture. Such packages may use their traditional triplet as
> recognised by binutils and gcc.
What about:
`Architecture: all' matches all triplets.
> Policy also doesn't mention /usr/include/<triplet>; I saw that possibility
> referred to in http://bugs.debian.org/542865.
Uhh... this looks like a nasty omission to me. If package libfoo-dev
differs between architectures, without that dir there's no possibility to
install it for multiple architectures at once. Having to reinstall headers
before every compilation is Not Funny.
> PS. I realise some may find it odd to spend time on Windows support in
> Debian, but it does come in handy, for instance for newer versions of Wine,
> or for Windows versions of some tools used to install Debian from a Windows
> environment.
Quite a few projects require a POSIX environment to build, this means either
msys, cygwin or cross-compilation. Msys is too minimal, cygwin too quirky,
which leaves Debian as the best choice. A good thing :)
--
1KB // Microsoft corollary to Hanlon's razor:
// Never attribute to stupidity what can be
// adequately explained by malice.
Reply to: