On 2017-10-23 12:41 +0000, Hugh McMaster wrote: > Hi all, > > I'm attempting to resolve a multi-arch conflict with a header file in a > package > I'm working on. > > The header was previously installed with other headers in > /usr/include/<package>. > Due to the conflict, I've modified debian/rules to: > 1. Override dh_auto_install, > 2. Create a directory in debian/tmp/usr/include/<triplet>/<package> > using mkdir -p; and > 3. Move the conflicting header to the newly created directory using mv.
OK, that sounds sensible, presuming that the header _should_ be arch-dependent.
The alternative is to fix up the header so it's no longer arch-dependent.
> While these steps resolve the conflict, allowing the package to become
> M-A: same, test programs no longer find the header in the triple include path.
>
> pkg-config --cflags also just outputs -I/usr/include/<package>.
>
> Does pkgconfig support multiple paths like this?
It does, you just output a list; but of 135 .pc files in my
/usr/lib/x86_64-linux-gnu/pkgconfig only 7 (all core python packages)
need to do this.
This is because the debian toolchain puts both
/usr/include, and /usr/include/${DEB_HOST_MULTIARCH} on the system search path
so a
#include <package/header.h> should find header.h in both
/usr/include/package/ and /usr/include/${DEB_HOST_MULTIARCH}/package/
or at least I think that's how it's expected to work.
So very few packages should need to explicitly list both of those, if
using a debian toolchain.
How exactly are you testing this?
> If so, how do I modify the pkg-config file to handle multiple /usr/include
> paths?
by putting
Cflags: -I${includedir}/package -I${includedir}/${DEB_HOST_MULTIARCH}/package
in your .pc file. (and making sure that ${DEB_HOST_MULTIARCH} gets substituted.
But I'd check whether you really need to do that first.
Wookey
--
Principal hats: Linaro, Debian, Wookware, ARM
http://wookware.org/
signature.asc
Description: Digital signature

