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

Re: Multi-arch header conflict and pkg-config



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.

> 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.

> 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.

Thank you for providing detailed explanations for Debian's toolchain behaviour.

--
Hugh McMaster

Reply to: