Thread: Clang 6.0.0 released

  1. #1
    Registered User
    Join Date
    Apr 2017
    Location
    Iran
    Posts
    138

    Clang 6.0.0 released

    Hi,

    Clang 6.0.0 is released. But it is not available as pre-build binary for Ubuntu 16.04 . I hope they would upload that too.

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    1,644
    You can install it from llvm.org's server.
    You need to add the server and its public key first.
    Code:
    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
    sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
    sudo apt-get update
    sudo apt-get install -y clang-6.0
    Run it as clang-6.0
    A little inaccuracy saves tons of explanation. - H.H. Munro

  3. #3
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,127
    clang-6.0 is available in Debian Testing (Buster) package manager along with all the other related packages.

    Other versions are also available.
    3.9
    4.0
    5.0

    I don't currently have access to the stable release of Debian, so can't speak to it's availability in that version.

  4. #4
    Registered User
    Join Date
    Apr 2017
    Location
    Iran
    Posts
    138
    Quote Originally Posted by john.c View Post
    You can install it from llvm.org's server.
    You need to add the server and its public key first.
    Code:
    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
    sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
    sudo apt-get update
    sudo apt-get install -y clang-6.0
    Run it as clang-6.0
    How can I invoke it with clang rather than clang-6.0 ?

  5. #5
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,127
    Quote Originally Posted by ordak View Post
    How can I invoke it with clang rather than clang-6.0 ?
    As root on Debian, I ran:
    Code:
    update-alternatives --install /usr/bin/clang++  clang++ /usr/bin/clang++-6.0 100
    update-alternatives --install /usr/bin/clang  clang /usr/bin/clang-6.0 100
    Or use "sudo" to run "update-alternatives".

    Please see the man page for more information.

  6. #6
    Registered User
    Join Date
    Apr 2017
    Location
    Iran
    Posts
    138
    Maybe it is better for me, to just wait for clang 6.0.0 to appear in Ubuntu package manager.

  7. #7
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,127
    Quote Originally Posted by ordak View Post
    Maybe it is better for me, to just wait for clang 6.0.0 to appear in Ubuntu package manager.
    If you have a previous version installed, as I did on Debian, it is possible you may need to run the two commands I presented above.

  8. #8
    Guest
    Guest
    Yeah, just do it man!

  9. #9
    Registered User
    Join Date
    Apr 2017
    Location
    Quetzaltenango
    Posts
    82
    Quote Originally Posted by rstanley View Post
    clang-6.0 is available in Debian Testing (Buster) package manager ...
    I don't currently have access to the stable release of Debian, so can't speak to it's availability in that version.
    https://packages.debian.org/clang shows clang-5.0 as latest version in stretch-backports. The equivalent page for Ubuntu shows clang on version 6.0 in the long term support version of Ubuntu (18.04 Bionic) to be released next month.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling with Clang on Visual Studio
    By Osman Zakir in forum C++ Programming
    Replies: 4
    Last Post: 02-02-2016, 02:16 PM
  2. gcc/clang support for avx
    By Aslaville in forum C++ Programming
    Replies: 3
    Last Post: 09-23-2014, 02:01 AM
  3. need assistance with a valgrind error within clang
    By saldar05 in forum C Programming
    Replies: 2
    Last Post: 03-04-2013, 01:59 AM
  4. Clang vs GCC for Linux/Unix Programming?
    By haziz in forum C Programming
    Replies: 2
    Last Post: 05-07-2012, 12:52 PM
  5. clang++ works but g++ doesn't -- Maybe a compiler bug?
    By RichSelian in forum C++ Programming
    Replies: 2
    Last Post: 07-11-2011, 08:04 PM

Tags for this Thread