Clang is a C/C++ language compiler frontend for LLVM.

learn more… | top users | synonyms

17
votes
1answer
5k views

How do I backport/install a newer version of clang?

I just want to install the newest version of clang http://packages.ubuntu.com/raring/clang-3.2 Does this mean I have to update my kernel to raring?
16
votes
5answers
16k views

clang and clang++ not found after installing the clang-3.5 package

After installing the clang-3.5 package, typing clang or clang++ on the command line gives me a message stating which packages those programs can be found in. Attempting to run the install of clang-3....
15
votes
1answer
40k views

How to install clang++?

I'm having trouble getting clang++ to work as I compile my code. Specifically, I'm getting a make: clang++: Command not found error. I've run sudo apt-get install llvm, and also sudo apt-get install ...
11
votes
1answer
29k views

llvm and clang installation on ubuntu

So I'm trying to install Halide on my Ubuntu 12.04 (64bit). I need llvm-3.2 and clang to be installed. Running sudo apt-get install llvm-3.2 ends up with 'package not found'. Trying sudo apt-get ...
8
votes
0answers
1k views

clang++ (version 3.3) lacks headers [closed]

This seems odd. Take a simple C++ program #include <cmath> #include <iostream> int main(void) { std::cout << "Square root of 9 is " << sqrt(9) << std::endl; } ...
7
votes
2answers
1k views

How to install CLang using precompiled binaries?

How do I install CLang on Ubuntu, using precompiled binaries of CLang that I downloaded? Here's how I downloaded CLang: "LLVM Download Page" -> "Download LLVM 3.2" -> "Clang Binaries for Ubuntu-12.04/...
6
votes
1answer
3k views

Installing clang 3.8 on Ubuntu 14.04.3

I've tried the following obvious commands: sudo apt-get update sudo apt-get install clang-3.8 but I get the message: Reading package lists... Done Building dependency tree Reading state ...
4
votes
1answer
343 views

Undefined references compiling clang tutorial on 14.04.2

I tried to compile the code from clang's libtooling tutorial (section "Put it together"). Compiling works: g++ `llvm-config-3.5 --cxxflags` -fno-rtti -c test.cpp -o test.o I got undefined ...
4
votes
1answer
967 views

Installing Clang+LLVM 3.4 from llvm.org into Saucy 13.10

I'm trying to setup Saucy to install clang and llvm 3.4 from the official LLVM apt repo, but it doesn't work. I only get the 3.4 snapshots from Ubuntu's own repos. I followed the instructions from ...
4
votes
2answers
120 views

How to install LLVM 3.9

I'm working with Emscripten and one of the error messages is: LLVM version appears incorrect (seeing "3.3", expected "3.9") But I can't find 3.9 on the LLVM page: http://llvm.org/releases/download....
3
votes
2answers
519 views

Missing man page of Clang

I installed Clang 3.6 following the instructions here (the latest version in Ubuntu repository is 3.5): # to retrieve the archive signature wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo ...
3
votes
3answers
1k views

Unmet dependencies libc++ [duplicate]

How should I correctly install clang's c++ library (with STL) on my lubuntu machine? I want to use clang and its c++ library because it offers better support for the upcoming c++14 standard. When ...
3
votes
1answer
833 views

Upgrade to gcc-4.9 broke clang++

Recently I have upgraded to gcc-4.9 but it totally broke my clang++ and I am unable to compile anything. Error I am getting: In file included from src/tester.cpp:11: In file included from /usr/...
2
votes
2answers
346 views

Workaround for clang-3.7 missing Asan bug

There is a known bug, to do with the fact that the Debian libclang packages appear to be compiled with autotools, but only the cmake build of the library produces the library for the sanitizers. The ...
2
votes
2answers
296 views

Clang++ cannot find lstdc++ after system upgrade

I have a small project in C++ that compiled fine until I upgraded Xubuntu to 15.04. When I tried to rebuild it with cmake, this message appeared in the middle of the output: /usr/bin/ld: cannot find -...
2
votes
0answers
126 views

How can I find the directory to clang-format

I use gvim to code and want to use clang-format as a plugin. As I read it is already integrated in vim. I just need to add this line to my .vimrc: map <C-K> :pyf <path-to-this-file>/clang-...
2
votes
1answer
1k views

clang++ fails to compile simple hello world c++ program

After upgrade to 14.04 from 12.04 clang++ stopped working. $ cat test.cpp #include <iostream> int main() { std::cout << "Hello World" << std::endl; return 0; } $ ...
2
votes
0answers
85 views

How to edit a backported package before uploading it to a PPA?

I'm attempting to backport Clang 3.2 to Quantal from Raring. Thinking this would be a relatively painless process, I ran the following command: backportpackage -s raring -d quantal -u ppa:george-...
1
vote
1answer
3k views

Clang Error “stddef.h file not found”?

After upgrading to Saucy, Clang now gives me the error message: clang -Wall -Werror -std=c99 -ggdb -O0 5.1.c -o 5.1 In file included from 5.1.c:1: /usr/include/stdio.h:33:11: fatal error: 'stddef.h' ...
1
vote
1answer
5k views

Install clang 3.3 on Ubuntu 12.04 and see unmet dependencies errors

ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo apt-get install clang-3.3 clang-3.3-doc libclang-common-dev libclang-dev libclang1 libclang1-dbg libllvm-3.3-ocaml-dev libllvm3.3 libllvm3.3-dbg lldb-3.3 ...
1
vote
1answer
302 views

Why doesn't LD_LIBRARY_PATH has any effect?

./a.out: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory even though: $ echo $LD_LIBRARY_PATH /home/exe/libcxx/lib:/home/exe/llvm/lib:/...
1
vote
2answers
250 views

Compile C++ 11 with clang 3.4 and GraphicsMagick

I wanna to compile C++ code in this source https://github.com/jdeng/rbm-mnist I have installed clang 3.4, sudo apt-get install libmagickwand-dev, sudo apt-get install build-essential , and sudo apt-...
1
vote
0answers
78 views

Why after adding alternative to clang I get undefined references?

I have clang3.6 installed and it works fine but as soon as I try to add alternative to it by sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang++-3.6 10 and use it while ...
1
vote
0answers
269 views

How do change the name of the clang++ executable file?

I'm using Vmware to run Ubuntu 14.04, and I recently updated the vmware player to version 7.1. I previously had clang installed, and everything was running fine. After I updated vmware, when I tried ...
0
votes
1answer
4k views

How I know what version of clang I have installed?

How I know what version of clang I have installed ?
0
votes
3answers
556 views

Problems installing Cling

I have been following the question: How to install cling?, which is targeted at Ubuntu 12.04. I am running 14.04 and I am not sure if that is the source of my problem. I followed all the steps and ...
0
votes
2answers
214 views

Which package do I need to use clang with asan for 32 bit?

I get this error when compiling with clang++ and -fsanitize=address -m32: /usr/bin/ld: cannot find /usr/lib/llvm-3.6/bin/../lib/clang/3.6.0/lib/linux/libclang_rt.asan-i386.a: No such file or ...
0
votes
1answer
106 views

Cannot find ld when non-root user

I have an autocompile program available on a website that I am running. The program uses clang++-3.5 to compile C++. When I run the auto-compile python script, as a root user, compilation is ...
0
votes
1answer
231 views

How to install two different compilers?

I am an unskilled Ubuntu user and almost each time I try to install something nontrivial I break something miserably. I am successfully using gcc 4.7 and 4.8 simultaneously using update-alternatives ...
0
votes
1answer
37 views

Set clang-3.8 as default

I have installed clang 3.0 and clang 3.8: $ sudo update-alternatives --config clang update-alternatives: error: no alternatives for clang. How can I set 3.8 as /usr/bin/clang?
0
votes
1answer
78 views

can't compile .cpp file with clang even after installing clang3.8

I installed clang3.8 with bunch of other packages that I usually need, after a fresh installation of Ubuntu 15.10 using following command: $ sudo apt-get install clang-3.8 clang-3.8-doc libclang-...
0
votes
0answers
146 views

Unmet dependencies while installing clang++

I'm trying to install clang++ by running the command sudo apt-get install clang++, however I get the following error message (full paste) The following packages have unmet dependencies. ...
0
votes
0answers
416 views

Installing Atom on Ubuntu encounters errors with gvfs-bin

So I am trying to install Atom on my Chromebook running Xubuntu 14.04 (64 bit). I downloaded the .deb from atom.io, but when I ran sudo dpkg -i atom-amd64.deb, it returned: Selecting previously ...
0
votes
0answers
77 views

Cannot find boost/type_index.hpp after installing boost-all-dev

I have just installed a fresh copy of ubuntu vivid (15.04), then did the following (filtered history command dump): 18 [2016-01-14 23:32:41] sudo apt-get install clang-3.7 clang-3.7-doc libclang-...
0
votes
0answers
99 views

ubuntu 15.10, jsoncpp, and clang++

On upgrading from 15.04 to 15.10, I stopped being able to compile against libjsoncpp using clang++. (Using g++ works fine.) As far as I can tell, it would suffice to recompile libjsoncpp with clang++...
0
votes
0answers
58 views

How to make a standalone Clang download use its own /include?

Trusty has a significantly outdated package base. For most part, it doesn't bother me, but with some packages, I'd like to have a choice to use newer ones. C/C++ compiler is one of those. In order to ...
0
votes
1answer
445 views

Trouble installing Clang and LLVM - no uint64_t definition

I ran ./configure, but when I try to make llvm, I get the following error: [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o In file included from /opt/static_analysis/...
0
votes
1answer
496 views

./configure Permission Denied when try to build llvm

I'm try to build to build Clang and LLVM and after download it I want to configure it so when I do that command : ../llvm/configure --prefix=/usr/clang_3_3 --enable-optimized --enable-targets=host ...
0
votes
1answer
119 views

Is it possible to install LLVM and Clang on a USB drive?

I recently installed Python3 in a local folder, as opposed to the entire system, on a shared hosting account and everything worked out perfectly. I was wondering if a similar thing could be done with ...
0
votes
1answer
50 views

Build with clang for older ubuntu releases

So the problem started as I lately updated my Ubuntu Vivid (15.04). Now clang-3.5 depends on libstdc++-4.9 (instead of previous version of 4.8) and my compiled programs fail to run on Trusty (14.04): ...
-1
votes
1answer
360 views

have clang 3.4., need clang 2.9

i installed the default version of clang and llvm in my ubuntu 14.04 and it's version 3.4. That's nice, but for some legacy stuff i need version 2.9. Ideally, i could install both version in parallel ...