Boost logo

Boost :

Subject: Re: [boost] configuring the clang toolset
From: Darren Garvey (darren.garvey_at_[hidden])
Date: 2011-09-24 05:34:52


Hi Eric,

On 24 September 2011 00:45, Eric Niebler <eric_at_[hidden]> wrote:

> I'm trying to get bjam and clang to play nice. I have Ubuntu linux
> running in an VM with boost trunk and the llvm+clang sources also from
> svn. I've built clang as described here:
> <http://clang.llvm.org/get_started.html>. I added the following line to
> my user-config.jam:
>
> using clang : : /home/eric/build/Debug+Asserts/bin/clang++ ;
>
> Now when I try to build, say, the Foreach tests, I get:
>
> In file included from cstr_byref.cpp:11:
> In file included from ../../../boost/test/minimal.hpp:37:
> In file included from ../../../boost/test/impl/execution_monitor.ipp:170:
> In file included from /usr/include/errno.h:36:
> In file included from /usr/include/bits/errno.h:25:
> /usr/include/linux/errno.h:4:10: fatal error: 'asm/errno.h' file not found
> #include <asm/errno.h>
> ^
> 1 error generated.
>
> "/home/eric/build/Debug+Asserts/bin/clang++" -c -x c++ -O0 -g
> -fno-inline -Wall -g -fPIC -DBOOST_ALL_NO_LIB=1 -I"../../.." -o
>
> "../../../bin.v2/libs/foreach/test/cstr_byref.test/clang-linux-3.0/debug/cstr_byref.o"
> "cstr_byref.cpp"
>
> What have I done wrong?
>

I use this in my user-config.jam file:

using clang
 : : :
   <cxxflags>"-I/usr/include/c++/4.5/x86_64-linux-gnu/
-I/usr/include/x86_64-linux-gnu/"
 ;

I've not spent any time figuring if this is a Boost.Build bug or a clang
configuration bug, but the above has worked well for me with clang / llvm
trunk.

Cheers,
Darren


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