Boost logo

Boost-Build :

Subject: Re: [Boost-build] find-include adds /usr/include even if compiler does not use that path
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-03-20 11:45:31


On Tue, 20 Mar 2012, Steven Watanabe wrote:

> AMDG
>
> On 03/20/2012 08:23 AM, Jeremiah Willcock wrote:
>> On Tue, 20 Mar 2012, Steven Watanabe wrote:
>>
>>> On 03/20/2012 07:57 AM, Jeremiah Willcock wrote:
>>>> For a cross-compiling build, the compiler will not necessarily use
>>>> headers from /usr/include, which means that hard-wiring it in is leading
>>>> to (on my system) attempting to use zlib.h even though that file doesn't
>>>> exist in the compiler's include path. Shouldn't the directories to
>>>> search be found by running the compiler, rather than some other
>>>> mechanism?
>>>>
>>>
>>> Do you mean find-include-path from ac.jam?
>>> ac.jam has a number of issues. I think
>>> it's best avoided for now.
>>
>> The problem I have in that file is that Boost.Iostreams won't compile
>> because of this bug; I don't use ac.jam directly.
>
> I'm not seeing how Iostreams uses this.
> libs/iostreams/build/Jamfile.v2 manages
> its own search. I thought ac.jam was
> unused, but I'm clearly missing something.

The calls are in tools/build/v2/tools/zlib.jam, not directly in iostreams,
or is that not what iostreams uses for its search?

>> Should I just edit
>> ac.jam to use the correct path?
>>
>
> If it allows you to build, why not? It's obviously
> not a general solution, though.

Of course; isn't getting the path from the compiler itself (or testing
whether things compile like Autoconf does) better?

-- Jeremiah Willcock


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk