<div dir="ltr"><div>It does look like the prebuilt binary (at least for Fedora 22) has a libc++ as part of the binary. <br><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 September 2015 at 18:26, mats petersson <span dir="ltr"><<a href="mailto:mats@planetcatfish.com" target="_blank">mats@planetcatfish.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><div>Assuming you use cmake, you can/should use the -DCMAKE_INSTALL_PREFIX=someplace-you-want-to-install. I use this for my debug builds of clang + llvm, and it works just as
you'd expect (I happened to pick a /usr/local/llvm-debug directory, so I
still need `sudo make install` to install it, but it will work similarly using "../blah", from the build directory). I'm reasonably sure you need to build your own version of clang to install in "non-standard location".<br><br></div><div>Of course, if you have an older version of gcc than 4.7 (or clang 3.5-ish), you'll need to do something about that FIRST. You can specify what compiler to build llvm and clang with using the `CC=...` and `CXX=...` enviornment variables before running cmake. Unfortunately, I don't think you can avoid installing a more moden gcc or clang version before compiling the current clang sources, and perhaps also install new C++ library components - whether that means building your own or simply installing it from some arbitrary "ready to use" place depends largely on your choice of OS distribution and what that distribution has available in form of "later versions". Since version 3.5(ish), Clang requires a compiler that is C++11 capable (we had exactly this problem where I work some time back).<br><br></div><div>It may be a decent idea to install on a single user's account, and just let everyone else use `~jsmith/llvm/bin` in their path, rather than distributing the compiler into lots of people's home directories. <br><br></div><div>Sorry, I don't have a "simple recipe".<br></div><div><br></div>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 24 September 2015 at 18:02, Rocco Moretti via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>Hello,<br><br></div>What is the best method for installing Clang (and the corresponding libc++) to a user's home directory on a *nix-like OS, with the minimal assumptions about the state of the rest of the operating system and what's already installed?<br><br></div><div>I ask because we want to incorporate C++11 features into our codebase, but our users often don't have administrative control over the systems they use. These systems may be computational clusters which were built several years ago and haven't had major updates since, so the default compilers on these systems are often old (e.g. gcc 4.4 or even 4.1). Getting the administrators to install an updated compiler may or may not be feasible. So as a backup, I'm looking into the possibility of having our users (who may have very limited *nix experience) install an updated compiler in their home directory. (Again, on a machine where they don't have administrator access.)<br><br></div><div>Is there an easy way to install Clang in a user directory when the system version of the compiler tool-chain may be very out of date? I noticed the pre-built binaries on <a href="http://llvm.org/releases/download.html" target="_blank">http://llvm.org/releases/download.html</a>, but there's not much instruction on how to use these, and I'm a little unclear how "self-contained" these are and if they include the libc++ library. (Updating the compiler to support C++11 is only minimally helpful if the standard library used has no C++11 support.)<br></div><div><br></div>If possible, I'd like to avoid complex installation procedures, like a recent experience I had installing Clang 3.7 on Ubuntu 12.04, where in order to compile Clang from source, it turned out I needed to download and compile a recent gcc from source first. <br><div><div><div><br><div>At this point we're just looking for C++11 compiler and standard library support, so the ability to install even a slightly older version of clang/libc++ (anything since 3.3, as I read things) should help.<br><br></div><div>Thanks,<br></div><div>-Rocco<br></div><div><br>P.S. I apologize if this is the wrong mailing list for this - <a href="http://clang.llvm.org/get_involved.html" target="_blank">http://clang.llvm.org/get_involved.html</a> indicated this is the list for general Clang-related questions.<br><br><br></div></div></div></div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>