简体   繁体   中英

How to change LLVM version on Ubuntu 15.10?

I currently have LLVM 3.6.2 installed on Ubuntu 15.10. But I would like to use LLVM 3.7 . I have tried following the steps on http://llvm.org/apt/ but even though the installation was successful, the version is still the same.

Is there any way to change the current LLVM version that is in use?

Also, another thing to note is that LLVM 3.7-dev is not installable The following packages have unmet dependencies: llvm-3.7-dev : Depends: libjsoncpp0 (>= 0.6.0~rc2) but it is not installable E: Unable to correct problems, you have held broken packages.

Any suggestions?

我刚刚删除了其他版本并且它起作用了。

Here's a page on how to install multiple package versions from apt: https://serverfault.com/questions/279329/can-i-have-two-versions-of-the-same-package-in-an-apt-repository

But, to build from source, most of the files and info is on http://clang.llvm.org

Here's the download page: http://llvm.org/releases/download.html From there, you can download source tarballs.

Also, there is a prebuilt tarball for clang+llvm for ubuntu 14.04 [will probably work for 15.10]. Chances are good that you can extract it to /usr/local/clang_whatever and with some makefile changes, you can get your make to use it. The prebuilt is: http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz

To rebuild from source, go to the developer page [don't let the word developer scare you], and follow instructions. That's here: http://clang.llvm.org/get_started.html You're rebuilding as a clang developer would, you just don't start hacking the clang source. svn is pretty automatic. Yes, you're hooking up to a source code control repository [not to be confused with a "distro" repository like debian or ubuntu], but that's fine. Once you get it compiled, you needn't update via svn if you don't want to.

Or, if svn isn't your cup of tea, from the download page, download the necessary source tarballs

Either way:

To specify an alternate install point, you use cmake 's --target option. See here for the howto: http://llvm.org/docs/CMake.html This is also an alternate page for full instructions on source build of clang/llvm, assuming you've got extracted sources

Actually, now that I think about it, rebuilding from source (either svn or tarballs) is probably surer/safer than the prebuilt tarball approach

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM