[cfe-dev] Building clang 5 (for coroutines)

Eric Fiselier via cfe-dev cfe-dev at lists.llvm.org
Thu Jun 15 01:02:57 PDT 2017


On Thu, Jun 15, 2017 at 12:51 AM, Kirit Sælensminde <
kirit.saelensminde at gmail.com> wrote:

> On 15/06/17 13:37, Eric Fiselier wrote:
>
>> Have you seen this documentation: http://libcxx.llvm.org/docs/Bu
>> ildingLibcxx.html#id3 ?
>>
>
> I hadn't, but I don't see that it's telling me anything I'm not doing:
>
> mkdir svn
> cd svn
> svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
> svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
> svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
> svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
>

You're not putting the repositories in the right place. Please look
carefully at http://libcxx.llvm.org/docs/BuildingLibcxx.html#id3.
libcxx and libcxxabi go into llvm/projects and clang goes into llvm/tools.

/Eric



> mkdir ../build
> cd ../build
> cmake ../svn/llvm -DCMAKE_BUILD_TYPE=Release \
>      -DLLVM_ENABLE_PROJECTS="llvm;clang;libcxx;libcxxabi"
> make cxxabi # works
> make cxx # Fails
>
> I just ran those exact steps on another machine than the one I normally
> use, and get the same errors, which end with this:
>
> vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__
> throw_out_of_rangeEv[_ZNKSt3__120__vector_base_
> commonILb1EE20__throw_out_of_rangeEv]+0xc): undefined reference to
> `__cxa_allocate_exception'
> vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__
> throw_out_of_rangeEv[_ZNKSt3__120__vector_base_
> commonILb1EE20__throw_out_of_rangeEv]+0x42): undefined reference to
> `__cxa_throw'
> vector.cpp:(.text._ZNKSt3__120__vector_base_commonILb1EE20__
> throw_out_of_rangeEv[_ZNKSt3__120__vector_base_
> commonILb1EE20__throw_out_of_rangeEv]+0x4d): undefined reference to
> `__cxa_free_exception'
> collect2: error: ld returned 1 exit status
> make[3]: *** [lib/libc++.so.1.0] Error 1
> make[2]: *** [projects/libcxx/lib/CMakeFiles/cxx_shared.dir/all] Error 2
> make[1]: *** [projects/libcxx/lib/CMakeFiles/cxx.dir/rule] Error 2
> make: *** [cxx] Error 2
>
>
> I see that there is an extra bit under 5 about how to specify where
> libcxxabi is, so next I'm going to try to see if I build it and install it
> then I can work out what the right incantation is to get it to use that.
>
>
> Kirit
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170615/4b03dd82/attachment.html>


More information about the cfe-dev mailing list