On 2017-10-27 12:12 +0000, Hugh McMaster wrote: > Hi Wookey, > > Apologies for the delayed response. > > On Thursday, 26 October 2017 12:23 AM, Wookey wrote: > >> 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. > > The header contains an arch-specific path to Python plugins.
Right - the way to make such headers arch-independent is typically to have a list of #ifdefs for paths and arches. It's up to you whether you prefer one (ugly) arch-indepedent file or lots of mucvh cleaner arch-specific files. > > 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. > > I tested this and can confirm that your explanation is correct. > Headers are found in both of those directories. Cool. I meant to test it, but ran out of time and posted anyway. Thanks for confirming. > > How exactly are you testing this? > I was including the header directly; i.e. without the package prefix. > That didn't work; hence this email to the D-Mentors list. > > Replacing > #include <parser.h> > with > #include <package/parser.h> > allowed gcc to find the header, even though it was installed in the > multi-arch include path. This should probably be explained on a wiki page somewhere, probably this packager-oriented one https://wiki.debian.org/Multiarch/Implementation and or this usage-oriented one: https://wiki.debian.org/Multiarch/HOWTO Wookey -- Principal hats: Linaro, Debian, Wookware, ARM http://wookware.org/
signature.asc
Description: Digital signature