<div dir="ltr"><div><div>FIXED!<br></div>Dimitry thank you for your advice!<br></div>To formalize it a bit.<br>In order to build  <a href="http://clang-analyzer.llvm.org/" target="_blank">Clang Static Analyzer</a> one does not need to download the libcxx, or compiler-rt (as long as he has a native version of a libc eg glibc) as instructed by the following link <a href="http://clang.llvm.org/get_started.html#build" target="_blank">http://clang.llvm.org/get_started.html#build</a>. <br><br>Notice: The latter link should maybe be amended to reflect that Clang Static Analyzer fails if all the components are installed. That is prudent, as the fromer link ultimately redirects to the latter for building instructions.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><br></div><span style="color:rgb(255,255,255)">Ioannis Koukoulis</span><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 29 March 2016 at 11:11, Ioannis Koukoulis <span dir="ltr"><<a href="mailto:i.g.koukoulis@gmail.com" target="_blank">i.g.koukoulis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Dimitry, this definitely worked. I am passed by the linking errors regarding libc++ or similar. My build stopped now at 95% while linking a clang extra, I am not pretty sure which because i do not have my laptop, possible the clang-rename, if such exists. <br>No undefined references here, however, my hdd's free space run out, so this might be the cause. I have to move or expand now, alas!! The build is too big. <br></div>I will keep you posted as soon as i'll get down to it. Thank you so far. <br><span class="HOEnZb"><font color="#888888"><div><br><br></div></font></span></div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><br></div><span style="color:rgb(255,255,255)">Ioannis Koukoulis</span><br></div></div></div></div></div></div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On 29 March 2016 at 00:31, Dimitry Andric <span dir="ltr"><<a href="mailto:dimitry@andric.com" target="_blank">dimitry@andric.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Ioannis,</div><div><br></div><div>Just delete the projects/libcxx directory, then rebuild from scratch.  You should only need to checkout llvm (in the top level directory) and cfe (into the tools/clang subdirectory).</div><span><font color="#888888"><div><br></div><div>-Dimitry</div></font></span><div><div><br><div><blockquote type="cite"><div>On 29 Mar 2016, at 00:08, Ioannis Koukoulis <<a href="mailto:i.g.koukoulis@gmail.com" target="_blank">i.g.koukoulis@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div><div><div>Hi Dimitry,<br><br></div>I do not particularly need to build libc++ from the package. Is the name of the package's libc++, libcxx, because this is where the installation starts finding undefined references, during linking CXX shared library ../../../lib/libc++.so. Please check below the first part of the log when the first error appear, I omited repeating results. Furthermore, the undefined references are thousands!<br></div></div>If you say that libc++ is not need it how can I skip it's interference. Shall I check out the package again without the particular libc++, of invoke cmake with a particular parameter?<br><br><br><div><div><div><div>.<br>.<br>[ 52%] Built target gtest<br>[ 52%] Built target gtest_main<br>Linking CXX shared library ../../../lib/libc++.so<br>CMakeFiles/cxx.dir/__/src/ios.cpp.o: In function `std::__1::iostream_category()':<br>/opt/llvm/llvm/projects/libcxx/src/ios.cpp:71: undefined reference to `__cxa_guard_acquire'<br>/opt/llvm/llvm/projects/libcxx/src/ios.cpp:71: undefined reference to `__cxa_guard_release'<br>CMakeFiles/cxx.dir/__/src/ios.cpp.o: In function `std::__1::ios_base::clear(unsigned int)':<br>CMakeFiles/cxx.dir/__/src/ios.cpp.o: In function `std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_streambuf<char, std::__1::char_traits<char> >*)':<br>/opt/llvm/llvm/projects/libcxx/include/istream:900: undefined reference to `__cxa_begin_catch'<br>/opt/llvm/llvm/projects/libcxx/include/istream:900: undefined reference to `__cxa_end_catch'<br>.<br>.<br>.<br><br></div><div>Best<br></div><div><br></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><br></div><span style="color:rgb(255,255,255)">Ioannis Koukoulis</span><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 27 March 2016 at 00:22, Dimitry Andric <span dir="ltr"><<a href="mailto:dimitry@andric.com" target="_blank">dimitry@andric.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ioannis,<br>
<br>
If you only want the clang static analyzer, there is no need to check out and build libc++ as part of the process.  The rest of the build can just use the system C++ library, which will be libstdc++ on Xubuntu.<br>
<br>
That said, without the full build log, it is hard to say what went wrong.  Specifically, which references were undefined?<br>
<br>
-Dimitry<br>
<div><div><br>
> On 26 Mar 2016, at 16:04, Ioannis Koukoulis via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hello everybody,<br>
><br>
> I am very new to llvm and I am struggling to install it on my 15.10 Xubuntu with kernel 4.2.0-34-generic #39-Ubuntu SMP x86_64 GNU/Linux.<br>
><br>
> I essentially intend to use the clang static analyzer, but it seems that I have to build it on top of llvm and clang.<br>
><br>
> Unfortunately I run into the following problem.<br>
> CXX shared library ../../../lib/libc++.so<br>
> at around 52% of the procedure (while building target gtest_main)<br>
> followed by a handful of undefined references<br>
><br>
> the last lines consist of the following messages:<br>
> collect2: error: ld returned 1 exit status<br>
> projects/libcxx/lib/CMakeFiles/cxx.dir/build.make:735: recipe for target 'lib/libc++.so.1.0' failed<br>
> make[2]: *** [lib/libc++.so.1.0] Error 1<br>
> CMakeFiles/Makefile2:11552: recipe for target 'projects/libcxx/lib/CMakeFiles/cxx.dir/all' failed<br>
> make[1]: *** [projects/libcxx/lib/CMakeFiles/cxx.dir/all] Error 2<br>
> Makefile:136: recipe for target 'all' failed<br>
> make: *** [all] Error 2<br>
><br>
> Can someone please help me go further?<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>