Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So I am a new linux user and new to programming, and I wanted to learn some of the C style languages. One of the online courses that I'm taking provides me a vm environment with clang istalled and configured to help students such as myself. Since I already have a Linux Mint 17 installation I thought I'd go ahead and install the llvm infrastructure myself using apt. So I followed the instructions here http://llvm.org/apt/

I added these lines to /etc/apt/sources.list

deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
# 3.4
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main

The I opened a terminal and executed these commands to install the 3.4 stable channel packages:

wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime clang-modernize-3.4 clang-format-3.4 python-clang-3.4 lldb-3.4-dev 

Immediately after these I got alerted by "update manager" that some of my packages need to be updated. I did this and my packages were upgraded to the development branch (3.5 release).

The development branch gets upgraded every few hours, and I probably don't need something this "cutting edge", what with my crappy internet and low datacap.

So my questions are:

  1. Have I done the installation correctly and are there any steps that I missed/messed up?
  2. How can I revert back to the stable branch of llvm, and not have the 3.5 release packages show up every time I call "sudo apt-get update"?

Any help will be appreciated.

Edit: Thanks for your response @Faheem. I installed the packages a few hours ago, so I dont have the terminal copy, but here is upgrade entry from /var/log/apt/history.log:

Start-Date: 2014-07-18  16:10:20
Commandline: apt-get upgrade
Upgrade: libllvm3.5-dbg:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), lldb-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-3.5-doc:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang1-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libllvm3.4:amd64 (3.4-1ubuntu3, 3.4.2+svn209031-1~exp1), libllvm3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang1-3.5-dbg:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), lldb-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-modernize-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libclang-common-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-examples:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), python-clang-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), clang-format-3.5:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), libllvm-3.5-ocaml-dev:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-doc:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1), llvm-3.5-runtime:amd64 (3.5~svn201651-1ubuntu1, 3.5~svn213346-1~exp1)

End-Date: 2014-07-18 16:11:00

share|improve this question
2  
I wanted to learn some of the C style languages -> You don't need a VM to do this on your own machine. Just use gcc or clang directly. Doing it in a VM is just an added hassle. –  goldilocks Jul 18 at 17:03
    
My first reaction is that the system should not have updated you to 3.5, if you installed 3.4. The packages have different names. What did the upgrade look like? Can you post that? If you don't have it on your terminal, apt keeps history in /var/log/apt/history.log. –  Faheem Mitha Jul 18 at 17:16

1 Answer 1

up vote 1 down vote accepted

I think the problem is that you don't want the first two lines you put in /etc/apt/sources.list, namely

deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main

I suspect these correspond to 3.5 (trunk).

You can verify this by running

apt-cache policy pkg1 ... pkgn

where the pkgs run over all the clang/llvm packages you have installed.

This will show you where the packages you installed are coming from.

I second goldilock's comment about not using a VM unless you have to. It is just extra overhead.

share|improve this answer
    
Thanks, I thought that might be the problem. On deleting those lines from sources.list, and selecting "refresh" on update manager, I got the message saying that my packages were all up to date. Now should I keep using the 3.5 release or is there any way to go back to the 3.4 release packages? –  kchak Jul 18 at 17:32
    
Ok, I'm completely new to this. Is llvm a vm? The homepage says it has little to do with virtual machines. –  kchak Jul 18 at 17:47
    
No, of course not. It's a compiler related thing. My comment (and Goldilocks) was prompted by "One of the online courses that I'm taking provides me a vm environment with clang istalled and configured to help students such as myself." –  Faheem Mitha Jul 18 at 17:51
    
@kchak I think you have have both the 3.4 and 3.5 packages installed. If you don't want the 3.5 packages, just remove them. Alternatively, I think they can remain co-installed with the 3.4 packages if you want them to be, but of course you won't get any further updates of the 3.5. :-) Personally I see no reason not to keep both installed and try them both (if you want to). –  Faheem Mitha Jul 18 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.