[cfe-dev] libc++abi on linux

"C. Bergström" cbergstrom at pathscale.com
Sun Jul 8 19:42:18 PDT 2012


On 07/ 9/12 08:21 AM, Ashok Nalkund wrote:
> On 7/8/2012 5:49 PM, "C. Bergström" wrote:
>> On 07/ 9/12 07:48 AM, Ashok Nalkund wrote:
>>> Hi All,
>>>      I tried to compile libc++abi using clang and it reported:
>>>> src/cxa_exception.hpp:66:9: error: unknown type name 
>>>> '_Unwind_Exception'
>>>      This is defined in
>>> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include/unwind.h.  I
>>> found previous posts online that suggested including
>>> /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/include in the
>>> include path so that compilation will pick up unwind.h. But I'm trying
>>> to be completely free of gcc, so using file will not help.
>>>
>>>      I am reading up on libunwind (X11 license, so maybe ok for me). Is
>>> there any other alternative?
>> libcxxrt + libunwind is the way to go imho
>> https://github.com/pathscale/libcxxrt
>> https://github.com/pathscale/libunwind
>>
>> These have been tested to work with clang - Admittedly the build process
>> may not be straight forward, but if enough interest maybe we solve that
>
> Thanks for the pointers. I chose libc++abi since it is developed 
> LLVM/Clang community and due to the complexity of the build process 
> for libcxxrt. What does the rest of LLVM/clang community use?
libcxxrt is significantly smaller, used in production, supported and 
tested by people inside/outside the LLVM community.  The build 
complexity is a result of the kind of errors you're getting.  The two 
projects I listed are explicitly tested to work together and if in the 
future we create a simple build process that's what will be used.

(Fencepost comment: I've seen hack Makefiles that make it easier to 
build libcxxrt, but I don't recommend it since it's just a hack and 
doesn't solve the whole problem (eg building a complete compiler, 
runtime, STL, unwind. .etc)
>
> And is http://www.nongnu.org/libunwind/ different from the one you 
> mentioned?
Ours has more testing and OS portability - We're missing some ARM 
related changes that were pushed upstream, but that will probably get 
pulled in the next 1-2 months.



More information about the cfe-dev mailing list