Boost logo

Boost :

Subject: Re: [boost] configuring the clang toolset
From: Eric Niebler (eric_at_[hidden])
Date: 2011-09-25 16:03:46


On 9/24/2011 2:19 AM, Jürgen Hunold wrote:
> Hi Eric,
>
> On Saturday, 24. September 2011 01:45:06 Eric Niebler wrote:
>> . 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++ ;
>
> looks fine.
>
>> 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>
>
> Clang and gcc and includes. A never ending story ;-))

Well, it's better than clang on Windows or clang on cygwin. :-P

> I use:
>
> # Clang trunk
> using clang : # version
> 3.0
> : # compiler
> $(HOME)/local/bin/clang++
> : # options
> <cxxflags>-fPIC
> <cxxflags>-Wno-mismatched-tags
> <cxxflags>-Wno-unused-variable
> # Workaround
> <cxxflags>-I/usr/include/x86_64-linux-gnu
> ;
>
> The main workaround is -I/usr/include/x86_64-linux-gnu
>
> where I have
>
> /usr/include/x86_64-linux-gnu/asm/errno.h

For me, the magic switch was:

<cxxflags>-I/usr/include/i386-linux-gnu/

> You might want to file a bug report with clang.

I might at that! Thanks to all who helped. It works now.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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