简体   繁体   English

如何在 Ubuntu 15.10 上更改 LLVM 版本?

[英]How to change LLVM version on Ubuntu 15.10?

I currently have LLVM 3.6.2 installed on Ubuntu 15.10.我目前在 Ubuntu 15.10 上安装了LLVM 3.6.2 But I would like to use LLVM 3.7 .但我想使用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.我已经尝试按照http://llvm.org/apt/上的步骤操作,但即使安装成功,版本仍然相同。

Is there any way to change the current LLVM version that is in use?有什么方法可以更改正在使用的当前 LLVM 版本?

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.另外,另一件需要注意的是LLVM 3.7-dev不可安装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这是有关如何从 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但是,要从源代码构建,大部分文件和信息都在http://clang.llvm.org 上

Here's the download page: http://llvm.org/releases/download.html From there, you can download source tarballs.这是下载页面: http : //llvm.org/releases/download.html从那里,您可以下载源 tarball。

Also, there is a prebuilt tarball for clang+llvm for ubuntu 14.04 [will probably work for 15.10].此外,还有一个用于 ubuntu 14.04 的 clang+llvm 预构建 tarball [可能适用于 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.很有可能你可以将它解压到 /usr/local/clang_whatever 并且通过一些 makefile 更改,你可以让你的 make 使用它。 The prebuilt is: http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz预构建的是: 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.就在这里: http : //clang.llvm.org/get_started.html您正在像 clang 开发人员那样重建,只是不要开始破解 clang 源代码。 svn is pretty automatic. svn是相当自动的。 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.是的,您正在连接到源代码控制存储库 [不要与 debian 或 ubuntu 等“发行版”存储库混淆],但这很好。 Once you get it compiled, you needn't update via svn if you don't want to.编译完成后,如果您不想,则无需通过 svn 进行更新。

Or, if svn isn't your cup of tea, from the download page, download the necessary source tarballs或者,如果svnsvn您,请从下载页面下载必要的源 tarball

Either way:无论哪种方式:

To specify an alternate install point, you use cmake 's --target option.要指定备用安装点,请使用cmake--target选项。 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有关操作方法,请参见此处: http : //llvm.org/docs/CMake.html这也是有关 clang/llvm 源代码构建完整说明的替代页面,假设您已提取源代码

Actually, now that I think about it, rebuilding from source (either svn or tarballs) is probably surer/safer than the prebuilt tarball approach实际上,现在我考虑了一下,从源代码(svn 或 tarball)重建可能比预构建的 tarball 方法更可靠/更安全

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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