Installing LLVM 3.8 on Ubuntu 14.04

What is the recommended way to install LLVM 3.8 on Ubuntu 14.04? The generic apt-get thinks 3.4 is the latest version. I found instructions at http://llvm.org/apt/ but they don’t work; deb and deb-src are not recognised commands, and the suggested apt-get variants are unable to locate the package.

You want to look at the apt-add-repository command, basically you provide that command like:

  • sudo add-apt-repository ‘deb llvm-toolchain-trusty-3.8 main’
  • sudo apt-get update
  • sudo apt-get install clang-3.8

Cheers,
-Neil.

Still doesn’t work:

a@a-VirtualBox:~$ sudo add-apt-repository ‘deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main’
a@a-VirtualBox:~$ sudo apt-get update
Ign http://ppa.launchpad.net trusty InRelease
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Ign http://ie.archive.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty Release.gpg

Ign http://extras.ubuntu.com trusty/main Translation-en
Get:15 http://ie.archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Err http://llvm.org llvm-toolchain-trusty-3.8/main amd64 Packages
404 Not Found
Get:16 http://ie.archive.ubuntu.com trusty-updates/universe amd64 Packages [339 kB]
Err http://llvm.org llvm-toolchain-trusty-3.8/main i386 Packages
404 Not Found
Ign http://llvm.org llvm-toolchain-trusty-3.8/main Translation-en_IE
Ign http://llvm.org llvm-toolchain-trusty-3.8/main Translation-en
Get:17 http://ie.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.2 kB]


Ign http://ie.archive.ubuntu.com trusty/multiverse Translation-en_IE
Ign http://ie.archive.ubuntu.com trusty/restricted Translation-en_IE
Ign http://ie.archive.ubuntu.com trusty/universe Translation-en_IE
Fetched 5,175 kB in 40s (128 kB/s)
W: Failed to fetch http://llvm.org/apt/trusty/dists/llvm-toolchain-trusty-3.8/main/binary-amd64/Packages 404 Not Found

W: Failed to fetch http://llvm.org/apt/trusty/dists/llvm-toolchain-trusty-3.8/main/binary-i386/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
a@a-VirtualBox:~$ sudo apt-get install clang-3.8
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package clang-3.8
E: Couldn’t find any package by regex ‘clang-3.8’

Install from source. I built LLVM+clang+LLDB last night on my Ubuntu 14.04 system. It just works.

I managed to get some time to have a look at this on a clean VM, and yup - the llvm 3.8 folder is missing from the server. It seems you can get the 3.8 packages if you use the ‘deb llvm-toolchain-trusty main’ line though. Can someone who maintains the LLVM apt repos have a look at this? I think that the 3.8 folder needs to be restored with the LLVM 3.8 release. Cheers, -Neil.