Boost logo

Boost :

Subject: Re: [boost] Clang 3.4 failing to compile boost 1.57 headers
From: Bjørn Roald (bjorn_at_[hidden])
Date: 2015-01-19 18:16:52


On 19. jan. 2015 03:44, Robert Dailey wrote:
> On Sun, Jan 18, 2015 at 12:34 PM, Fletcher, John P
> <j.p.fletcher_at_[hidden]> wrote:
>> Robert
>>
>> As you are on Linux 12.04 as I am your default compiler seems to be gcc 4.6.3.
>>
>> Try adding this into the compile line when you building your binary file:
>>
>> -DBOOST_NO_CXX11_ALLOCATOR
>>
>> That worked for me on a simple example. It is buried now down in the thread.
>>
>> Boost is getting the library version wrong and making some wrong choices. This fix should get you running.
>
> By building my binary file are you saying I need to rebuild boost with
> this flag on? If so, how do I specify this flag when I'm building
> boost? Thanks again for all of your help.

I think John is saying you can use -DBOOST_NO_CXX11_ALLOCATOR in your
compiler command line when you compile your code. I.e.code that uses
boost, as a workaround until a fix to boost.config is available. That
way you do not have to wait.

If your boost build fails as well, I suspect it may, then you need to
add it to your boost build command with

./b2 toolset=clang define=BOOST_NO_CXX11_ALLOCATOR ...

http://www.boost.org/build/doc/html/bbv2/overview/invocation.html

or maybe it is simpler to add something like

using clang : 3.4 : : <cxxflags>-DBOOST_NO_CXX11_ALLOCATOR;

to your user-config.jam file, so you can just do the simpler

./b2 toolset=clang ...

http://www.boost.org/build/doc/html/bbv2/overview/configuration.html

HTH

-- 
Bjørn

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk