<div class="gmail_extra">Hi again!<br><br><div class="gmail_quote">On Sun, Apr 22, 2012 at 1:14 PM, Ovanes Markaryan <span dir="ltr"><<a href="mailto:om_clang@keywallet.com" target="_blank">om_clang@keywallet.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello *,<div><br></div><div>would like to build a CMake toolset using clang and libc++. This means that the toolset is not going to be installed on the hosted OS. I have already clang 3.0 which is deployed to some path in my home directory on Linux and now tried to build the libc++. I checked out the tag libcpp-31 from the subversion and now used the cmake command to build it:</div>


<div><br></div><div><br></div>
<div>$ CXX="${HOME}/toolsets/clang_3.0/bin/clang++" CC="${HOME}/toolsets/clang_3.0/bin/clang" CMAKE_INSTALL_PREFIX="${HOME}/toolsets/clang_3.0" cmake ../clang-libcxx-tag_libcpp-31/</div></blockquote>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br></div><div>This configures the build and generates the make file.</div><div><br></div><div>Running make also compiles the lib without errors.</div><div><br></div><div>Now running:</div><div>$ make install</div><div><br>


</div><div>results in errors, since the make file still tries to copy the library to: /usr/local/lib/libc++.so.1.0</div><div><br></div><div>I was expecting it to copy the lib to: ${HOME}/toolsets/clang_3.0</div></blockquote>

<div><br></div><div>I fixed this issue bei reading:</div><div><a href="http://www.llvm.org/docs/CMake.html#freccmake">http://www.llvm.org/docs/CMake.html#freccmake</a></div><div><br></div><div>The command line looks now as:</div>

<div>$ CXX="${HOME}/toolsets/clang_3.0/bin/clang++" CC="${HOME}/toolsets/clang_3.0/bin/clang" cmake  -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/toolsets/clang_3.0" -DCMAKE_BUILD_TYPE:STRING=Release ../clang-libcxx-tag_libcpp-31/</div>

<div><br></div><div>now the installation goes to the right directory when calling make install.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
</div>
<div><br></div><div>The next question is: How can I run tests to ensure that the libc++ build was fine? Clang is not installed on the host OS, and IMO should not, to avoid version clashing through automatic updates etc. Going to the libcxx directory and running:</div>


<div><br></div><div>CXX=${HOME}/toolsets/clang_3.0/bin/clang++ CC=${HOME}/toolsets/clang_3.0/bin/clang ../clang-libcxx-tag_libcpp-31/test/testit</div><div><br></div><div>Result in:</div><div><div>****************************************************</div>


<div>Results for /media/home_data/.../build_clang-libcxx-tag_libcpp-31:</div><div>using clang version 3.0 (tags/RELEASE_30/final)</div><div>Target: x86_64-unknown-linux-gnu</div><div>Thread model: posix</div><div>with -std=c++0x -stdlib=libc++  </div>


<div>----------------------------------------------------</div><div>sections without tests   : 1</div><div>sections with failures   : 0</div><div>sections without failures: 0</div><div>                       +   ----</div>


<div>total number of sections : 1</div><div>----------------------------------------------------</div><div>number of tests failed   : 0</div><div>number of tests passed   : 0</div><div>                       +   ----</div>


<div>total number of tests    : 0</div><div>****************************************************</div></div><div><br></div><div>Does not seem to run any tests.</div><div><br></div><div><br></div><div>Many thanks for your help,</div>


<div>Ovanes</div>
</blockquote></div><br></div><div class="gmail_extra">I saw in the same page there should be a "check" target. So I assumed running:</div><div class="gmail_extra">$ make check</div><div class="gmail_extra"><br>

</div><div class="gmail_extra">should runt the tests, but I got errors, that some clean-up failed.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">

Ovanes</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>