[cfe-dev] [libc++] testing and installing libc++ into a non-standard location

Ovanes Markaryan om_clang at keywallet.com
Sun Apr 22 04:14:35 PDT 2012


Hello *,

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:


$ 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/

This configures the build and generates the make file.

Running make also compiles the lib without errors.

Now running:
$ make install

results in errors, since the make file still tries to copy the library
to: /usr/local/lib/libc++.so.1.0

I was expecting it to copy the lib to: ${HOME}/toolsets/clang_3.0


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:

CXX=${HOME}/toolsets/clang_3.0/bin/clang++
CC=${HOME}/toolsets/clang_3.0/bin/clang
../clang-libcxx-tag_libcpp-31/test/testit

Result in:
****************************************************
Results for /media/home_data/.../build_clang-libcxx-tag_libcpp-31:
using clang version 3.0 (tags/RELEASE_30/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
with -std=c++0x -stdlib=libc++
----------------------------------------------------
sections without tests   : 1
sections with failures   : 0
sections without failures: 0
                       +   ----
total number of sections : 1
----------------------------------------------------
number of tests failed   : 0
number of tests passed   : 0
                       +   ----
total number of tests    : 0
****************************************************

Does not seem to run any tests.


Many thanks for your help,
Ovanes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120422/0891ce3a/attachment.html>


More information about the cfe-dev mailing list