Boost logo

Boost-Build :

Subject: Re: [Boost-build] Problems building Boost with clang toolchain and C++11
From: Jürgen Simon (juergen_simon_at_[hidden])
Date: 2012-06-21 15:07:55


Hello,

although the line copied into here was garbled, it was not a typo. I had the right flags but I was missing linkflags. I managed to compile Boost with this. Now I got gtest acting up, but that's a different matter.

Thanks, fellas!

On 20.06.2012, at 19:03, Abe wrote:

> On Wed, Jun 20, 2012 at 5:19 AM, Jürgen Simon <juergen_simon_at_[hidden]> wrote:
>
>> I'm required to compile Boost with clang on OSX and C++11 support. I have
>> used the following commands to attempt a build:
>
>> ./bootstrap.sh -toolchain=clang
>> ./bjam toolset=clang cxxflags="-std=c++0x11stdlib=libc++" threading=multi
>> variant=release link=shared runtime-link=shared --layout=system
>> --without-mpi --without-python --universal install --prefix=/opt/local
>
>
> It looks like you have a typo: "-std=c++0x11stdlib=libc++" should
> probably be either "-std=c++0x -stdlib=libc++" or "-std=c++11
> -stdlib=libc++", depending on compiler version.
>
> For not-very-recent compiler versions [both GCC & Clang], IMO you
> should use "-std=c++0x". Recent versions [4.7.x, at least] of GCC
> also accept "-std=c++11" -- and this produces exactly the same effect
> as "-std=c++0x", AFAIK, except that your build scripts won`t be
> backwards-compatible to e.g. GCC 4.5.x.
>
> It seems that the latest release of Clang supports "-std=c++11" too:
>
> http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_31/final/include/clang/Frontend/LangStandards.def
>
>
> Also FYI, even though I don`t recommend it: old-ish versions of GCC
> [and maybe Clang too] also support "gnu++0x", which means C++0x with
> GNU extensions, and current releases of both compilers support both
> that and "gnu++11", which probably means the same thing but might be
> closer to the real C++2011 release [rather than using some obsolete
> things from the pre-standard C++0x].
>
> I hope the above helps...
>
> Regards,
>
> Abe
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


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