Questions tagged [clang]
Clang is a C/C++ language compiler frontend for LLVM.
115
questions
2
votes
1
answer
791
views
How to install clang-15 or higher? (16 preferably)
I am currently trying to build a project using cmake, and the error that occurs reads:
CMake Error at cmake/tools.cmake:33 (message):
Compilation with Clang version 14.0.0 is unsupported, the ...
0
votes
0
answers
377
views
How to install lld in Ubuntu using apt-get install
I want to use the lld linker in my project.
I saw this Question but the solution didn't use apt-get.
I tried:
sudo apt-get install llvm
sudo apt-get install clang
sudo apt-get install clang-tools
...
7
votes
1
answer
7k
views
How to install Clang 16 on 22.04 LTS
I have 22.04 LTS but I'd like to install a later Clang, version 16.
How can I install this?
(22.04 doesn't come with Clang 16 in the repos)
UPDATE
Whilst I appreciate the answer below, I found a much ...
-1
votes
1
answer
80
views
i want to install NS3 on ubuntu with virtual box
I have started following this tutorial https://karimmd.github.io/post/tutorial/ns3_installation/
( I'm a beginner and I should precise) and it all went well until I had to write down this line of ...
0
votes
0
answers
2k
views
Unable to install clang-15* packages on Ubuntu 22.04 due to held broken packages
I've been trying to install clang-15-dbgsym and such packages but I've been unable to due to the following error:
Reading package lists...
Building dependency tree...
Reading state information...
Some ...
0
votes
0
answers
19
views
Unable to install RSTUDIO - Cannot install 'libclang-dev' [duplicate]
please if you could assist, I have tried to find solution but still unable to install rstudio (ubuntu 20.04 LTS). Getting this output:
sudo gdebi rstudio-2022.12.0-353-amd64.deb
Reading package lists.....
12
votes
2
answers
8k
views
clang++ cannot find iostream
Here is a simple code :
#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <iterator>
#include <iomanip>
#include <cmath&...
0
votes
0
answers
70
views
Can I install Clang 3.9 to Ubuntu Kinetic Kudu 22.10?
I am building Unreal Engine and it requires clang3.9 and clang++3.9. How can I install it and set it up in Ubuntu Kinetic 22.10?
0
votes
1
answer
110
views
Is it normal to receive llvm toolchain updates every single day?
I sudo aptitude upgrade all my packages every day and up until a few weeks ago, I've never had any software (including llvm/clang) that requested upgrades every single day but that is what has started ...
3
votes
1
answer
3k
views
clang can't find headers but gcc can
Using ubuntu 22.04, g++ can compile my test program with no issues. clang++ on the other hand will fail with...
main.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
...
1
vote
3
answers
4k
views
Todays Ubuntu 22.04 updates seem to break Clang compiler
After installing todays updates in my Ubuntu 22.04 machines compiling with Clang fails. Standard header files are not found anymore. E.g.
evaluate.cpp:19:10: fatal error: 'algorithm' file not found
...
0
votes
0
answers
20
views
After installing c-compiler, it is not set as the default [duplicate]
If I have a clean OS image (in my case created with multipass) and I want to install a c-compiler, why is it not set as default after installing?
$ sudo apt install clang-15
...
$ cc
cc: command not ...
1
vote
0
answers
244
views
Clang : Depends: clang-3.8 (>= 3.8~) but it is not going to be installed
04, I tried installing clang using the following command
`sudo apt install clang`
however getting the following error
Reading package lists... Done
Building dependency tree
Reading ...
1
vote
1
answer
2k
views
How to set newer version of clang compiler?
I installed cland++-15 compiler using:
sudo apt-get install clang++-15
after running clang --version
it shows
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
...
0
votes
0
answers
671
views
For which Ubuntu versions is clangd suitable?
Trying to install a clangd on Ubuntu18.04:
sudo apt-get install clangd
I get an error:
E: Unable to locate package clangd
On another Ubuntu 18.04, everything works and the installation goes through, ...
0
votes
0
answers
805
views
Installing Clang-7 in Ubuntu 20.04 version
I have problem installing clang-7 in Ubuntu 20.04.
Other version of clang is installed without any problem.
But only clang-7 gives message like this.
clang-7 : Depends: libstdc++-5-dev but it is not ...
0
votes
0
answers
67
views
It safe to install clang-6.0 from Debian repositories?
It safe to install clang-6.0 via Debian official repositories?. I see the file is "likely" broken and risky by Firefox browser.
5
votes
3
answers
14k
views
How to install clang-14 on Ubuntu 18.04?
Can you help me install clang-14 on Ubuntu 18.04? I think I need a valid repo as apt-get install clang-14 does not work.
$ cat /etc/issue
Ubuntu 18.04 LTS \n \l
$ sudo apt-get update
Hit:1 http://...
1
vote
0
answers
448
views
Multiple versions of clang with openmp
On Ubuntu 22.04 (and previous versions as well) it is possible to have multiple clang versions installed at once. However, OpenMP needs to be installed separately for each clang version (for example ...
1
vote
0
answers
439
views
Unable to install Rstudio due libclang-dev problem
I am new to ubuntu, and have been trying to install the new version of Rstudio, which should normally work. But it somehow broke today.
Reading package lists... Done
Building dependency tree
Reading ...
0
votes
0
answers
49
views
Is there a package manager that offers recent boost/clang/cmake versions AND creates references and env. variables? (18.04)
I need at least clang 7+, boost 1.77+, cmake 3.11+ on Ubuntu 18.04 and I am too dumb to install them manually because I do not know where to install, what to link and which env. variables to set. ...
0
votes
1
answer
2k
views
How do you compile c files with clang into a binary format?
I created source code as a .c file and tried running clang exampledebugging.c into it.
It came up empty.
Can anyone please help me? I am trying to compile this program into a binary executable format.
0
votes
0
answers
154
views
Mapnik installation error in ubuntu 16.04
I am trying to install mapnik in ubuntu 16.04 64-bit machine, following this tutorial https://github.com/mapnik/mapnik/wiki/UbuntuInstallation but when I enter ./configure I am getting error like this
...
6
votes
1
answer
695
views
Replacing an APT-version of a package with source code version?
How can I replace a package installed via APT(or any other package managers) with the version from source without violating system? My problem is the same as this link, but I think the answer is not ...
9
votes
4
answers
13k
views
Unable to install libclang on 20.04 LTS
After trying to install libclang-dev with sudo apt-get install -y libclang-dev i receive this error:
The following packages have unmet dependencies:
libclang-dev : Depends: libclang-10-dev (>= 10~)...
0
votes
0
answers
1k
views
Install Clang 11 Error
I’m trying to install clang-11 using command
Step 1
apt install clang-11
fails with error
The following packages have unmet dependencies:
clang-11 :
Depends: libclang-cpp11 (>= 1:11.1.0~++...
1
vote
2
answers
2k
views
Where do I find llvm for compiling Qt documentation
Note: To build qdoc and Qt documentation in future you should set LLVM_INSTALL_DIR environment >variable pointing to directory where LLVM is installed (it should be top level directory, the >...
2
votes
0
answers
441
views
How to compile Clang LibTooling programs under Bionic?
I'm trying to port a project that uses Clang's LibTooling library from Arch to Ubuntu/Debian.
I have installed the clang-10, llvm-10 and libclang-10-dev packages. The latter installs the necessary ...
4
votes
0
answers
1k
views
How does x86_64 Ubuntu 20.04 run aarch64 ELF executables?
I build a Docker container from the following Dockerfile:
FROM ubuntu:20.04
RUN apt-get update && apt-get -y install clang gcc-aarch64-linux-gnu
I'm on an x86_64 macOS v10.15.7 host system ...
0
votes
1
answer
4k
views
How to solve alike "linking CXX executable" issues
My attempts to compile to get Gerbera, a popular DLNA server running proved futile. The dependencies seem to be alright. The documentation doesn't mention any make flags needed. So when I try to make, ...
10
votes
1
answer
10k
views
clang doesn't find c++ stdlib on my ubuntu 18.04, but it does on a brand new install. What have I broken?
I've been building a github package for a while ... a new version comes out, and I build it.
It uses clang6 which is default on my ubuntu, ubuntu 18.04
now, it fails to compile, it can't find a ...
17
votes
2
answers
40k
views
How to set Clang 9 as the default C++ compiler on Ubuntu 19.10?
how do I set Clang 9 as the default C++ compiler on Ubuntu 19.10?
I searched the internet, but nothing helped.
Thank you for answer :)
2
votes
1
answer
541
views
clang 3.9 on ubuntu 19.04
I'm am using Ubuntu 19.04 trying to compile an older version of software (carla 0.7.0) that only allows getting compiled in clang-3.9
From my research online I have not found a way to install clang ...
3
votes
1
answer
1k
views
How can I install multiple version of clang/llvm?
I added the repo from llvm-apt. It contains llvm7 and llvm8. I want to install both versions. The main packages are installed fine. However, there is a problem for libc++, since both packages want to ...
0
votes
1
answer
1k
views
installation of clang on ubuntu18.04?
I am trying to install clang on ubuntu 18.04. I have done the following:
going to the source of llvm making a directory build and executed cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../...
5
votes
1
answer
13k
views
Broken packages when trying to install clang on Ubuntu 18.04
I tried installing clang on Ubuntu 18.04, but I could not install it. I tried sudo apt install clang and got these results:
Reading package lists... Done
Building dependency tree
Reading state ...
3
votes
1
answer
3k
views
How to install clang for YouCompleteMe?
OS: Ubuntu 18.04
There are already some posts about how to install clang in Ubuntu, however many of them are out of date, and my question is specific to installing clang as part of the insallation ...
0
votes
1
answer
930
views
No .a or .o file created after building the project in Codelite
I have installed Codelite and I have g++ installed on my machine:
I've also used the following settings when creating a new codelite project
And I 've created a simple project
#include <...
2
votes
1
answer
315
views
How to find a binary name with only the prefix?
Context: I have a bash script that generates a windows import library from a MinGW cross-compiled DLL. As part of the build process, it runs llvm-dlltool-6.0, because that happens to be the specific ...
1
vote
1
answer
2k
views
sys/ustat.h file not found
I'm trying to build a modified version of the LLVM compiler as used in the Pepper-project
I'm using this script to install it, however it fails with this error:
/pequin/compiler/buffetfsm/llvm/...
3
votes
1
answer
5k
views
How may I install clang v8 on 32-bit Ubuntu 18.04? [duplicate]
I have this, but it's not working:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 ...
4
votes
1
answer
22k
views
Using C++17 with clang++ on Ubuntu 16.04
I can't for the life of me figure out how to get C++17 to work on Ubuntu 16.04.
This works on Ubuntu 18.04:
sudo apt-get update
sudo apt-get install clang-6.0
which installs the C++17 standard ...
0
votes
0
answers
1k
views
No candidate version found for clang-3.2. Unable to apply some actions, aborting
Hello, all I am trying to install clang version 3.2. I want this version because I want some external options that don't exist in newer versions(dumping-objects-memory-layout).
My problem is that i ...
0
votes
0
answers
717
views
trying to compile chromium-browser from source, but failing with 'map' file not found
I have downloaded source for chromium-browser.
Also:
apt-get source chromium-browser
sudo apt install build-essential
sudo apt-get build-dep chromium-browser
I have installed libraries (and more):...
24
votes
6
answers
75k
views
Installing clang 6.0 on Ubuntu 18.04 LTS Bionic
How can I install clang on Ubuntu 18.04 LTS Bionic?
3
votes
0
answers
2k
views
Unable to find STL headers in Ubuntu 18.04
I am running the following command, with the verbose output below it:
$ clang++ -m32 -I ../include -o format.cc.o -c format.cc -v
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: i386-pc-...
0
votes
0
answers
472
views
Installing clang 5.0 properly so that other libs can see it
I followed this guide to install clang 5.0 on Ubuntu 16.04 build.
I was trying to build a ruby gem source which uses clang 5.0.
However, it can't see certain libs, specifically clang/Lex/Token.h
...
1
vote
0
answers
2k
views
Why is clang-format: command not found [duplicate]
The command was installed on Ubuntu 18.04 LTS using:
sudo apt-get install clang-format
with the following result:
Reading package lists... Done
Building dependency tree
Reading state ...
2
votes
1
answer
8k
views
vim-clang-format: clang-format is not found
I installed clang-format on Ubuntu 18.04 LTS with sudo apt install clang-format and the installation was successful. I can execute clang-format-6.0 now, but when I use ClangFormat in vim, it tells me ...
1
vote
1
answer
1k
views
Ubuntu 16.04: libclang 6 cannot be installed
I am currently trying to install doxygen, which has an unmet dependency libclang.so.6. I followed these instructions for installing this package, but it has its own dependencies.
The following ...