[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiarch, policy and cross-compiler libraries for non-Debian architectures

Stephen Kitt <steve@sk2.org> writes:

> 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). As I understand it, multiarch
> wasn't intended for non-Debian architectures, and this is (indirectly)
> reflected in policy (9.1.1 point 3 for example).
> It seems to me though that it would be nice to follow the multiarch directory
> structure for cross-compilers to non-Debian architectures (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 instead of the
> current /usr/{i686,x86_64}-w64-mingw32/{include,lib} (which isn't
> FHS-compliant, and thus isn't policy compliant either since section 9.1.1
> is based on the FHS).
> 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
> 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.
> (The phrasing is certainly not perfect; this ends up being an exception to an
> exception...)

I would rather add a new architecture to dpkg for this. This does not
mean that debian has to create a new port or that the packages have to
stop being arch:all. But dpkg should know about it and be the one and
only place packages query for the right multiarch triplet. Then you
would use
   /usr/lib/$(dpkg-architecture -aw64-mingw32 -qDEB_HOST_MULTIARCH)
when building your package. Problem solved.


Reply to: