Skip to main content

Questions tagged [clang]

clang is a C, C++, Objective-C/C++ compiler compatible with GNU gcc extensions.

Filter by
Sorted by
Tagged with
0 votes
1 answer
74 views

How to add pkgs.org and other mirrors in centOS 8?

https://centos.pkgs.org/8-stream/centos-appstream-x86_64/ http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ I am new to centOS. I want to add these two repositories so that ...
Zeshan Ahmed Nobin's user avatar
0 votes
0 answers
43 views

Unable to build a cpp program on AIX with gcc fsanitize address

I'm trying to build a cpp program on AIX 7.2 using gcc with address sanitizer (-fsanitize=address) but this errors out with: cc1plus: warning: '-fsanitize=address' not supported for this target ...
Sanchit Gupta's user avatar
0 votes
0 answers
53 views

configure: error: C compiler cannot create executables ERROR on FreeBSD 14.0-RELEASE

I'm not able to install sudo on my FreeBSD 14.0-RELEASE-p3 amd64 marietto:/usr/ports/security/sudo # make ===> License sudo accepted by the user ===> sudo-1.9.15p4 depends on file: /usr/...
mister_smith's user avatar
0 votes
0 answers
246 views

ld error with clangs when compiling vdso

i am trying to compile a kernel but it always return this error: LD arch/arm64/kernel/vdso/built-in.o ld.lld: error: cannot find linker script -r make[2]: *** [scripts/Makefile.build:507: arch/...
xxjoe's user avatar
  • 11
1 vote
0 answers
518 views

How to install LLVM-14 on Ubuntu?

I have installed LLVM-14 on Ubuntu manually. Everything seems to work fine except ld during the compilation of cargo-bpf in Rust cargo. = note: /usr/bin/ld: cannot find -lLLVM-14 collect2: ...
HyperX Pro's user avatar
1 vote
1 answer
223 views

OpenBSD: npm install sodium-native, interpret error messages

I am attempting to install sodium native as an npm package on OpenBSD 7.3 amd64. Aside: As a dependency of Hypercore, Hyperbee and Corestore. This needs node-gyp. Following this, I set the C and C++ ...
Lee's user avatar
  • 519
1 vote
0 answers
1k views

unrecognized option '-EL'

I'm trying to build an android kernel. On every build I get a few errors: /usr/bin/as: unrecognized option '-EL' clang-16: error: assembler command failed with exit code 1 (use -v to see invocation) ...
JohnTit's user avatar
  • 11
0 votes
0 answers
366 views

Termux Bash: ./ Permission Denied

I have a file Test.cpp that I compiled into test using clang++, but running it, I get the error in the title. I have tried using chmod u+x test and chmod 775 test, among other commands, but using ls -...
Sandman's user avatar
1 vote
1 answer
1k views

Linux fedora how to change to older version of clang

I am currently using Linux fedora and I have the latest version of clang installed 14. I need an older version 12. Is there a way to do this through the terminal. I have been able to install the ...
Robert hause's user avatar
1 vote
1 answer
6k views

How to install the latest stable Clang on Fedora?

I'm considering switching to Fedora, but the latest stable Fedora (36) only ships Clang 14, while the latest release is Clang 15. Is there any way to get up-to-date binaries, without switching to the ...
HolyBlackCat's user avatar
0 votes
1 answer
1k views

Error to "install -y clang-9 libc++-9-dev libc++abi-9-dev"

I installed the Mistuba 2 package (https://github.com/mitsuba-renderer/mitsuba2) to be able to run btf-rendering (https://github.com/elerac/btf-rendering/). However, to install Mitsuba it is necessary ...
V.Avancini's user avatar
1 vote
1 answer
340 views

Compiling a C program with Clang for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system

Is there a way to compile a C program with Clang compiler for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system?
ordinary_guy's user avatar
0 votes
1 answer
493 views

Kate Editor LSP Client: Any way to specify an "entry file" for compilation?

Goal: If I have two c files, A and B, and I don't plan to compile B into an object file, but rather include it directly in A, can clangd (or any other LSP service that works with Kate) show me only ...
Eagle Orion's user avatar
1 vote
1 answer
933 views

Clang producing a symbol lookup error

i am getting this error whenever i run clang even with the --version flag clang: symbol lookup error: /usr/lib/libclang-cpp.so.14: undefined symbol: ...
causewe's user avatar
  • 11
2 votes
0 answers
192 views

Minimal c program does more system-calls than expected

I am trying to learn more about strace. I use strace to understand the calls a c program makes. The c program is: void _start () { for (;;) { } } The program gets compiled with clang -...
Koronis Neilos's user avatar
1 vote
1 answer
2k views

32bit program on 64bit: cannot execute binary file: Exec format error

I'm linking an application consisting out of two libraries in clang under WSL. The command I use looks as follows (simplified): clang -m32 -fsanitize=address -L _build/ -l:lib1.lib -l:lib2.lib -o test ...
tl-photography.at's user avatar
0 votes
1 answer
702 views

Linker unable to find header and library files

I've installed the CHERI simulator from this link. It allows me to use the clang compiler for both risc-v and a capability extended risc-v architecture. I've defined the following aliases alias clang-...
Sathvik Swaminathan's user avatar
1 vote
0 answers
453 views

run-clang-tidy is a broken symlink in Ubuntu 21.10

I found that the run-clang-tidy script is a broken symlink in Ubuntu 21.10: $ run-clang-tidy bash: run-clang-tidy: command not found $ cd /usr/bin $ ls -l *tidy* lrwxrwxrwx 1 root root 29 Sep 28 10:...
Wolfram Rösler's user avatar
1 vote
1 answer
1k views

linux kernel compilation error

I got error: make ${BUILD_FLAGS} -j1 modules HOSTCC scripts/basic/fixdep CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/...
KonstantinKuklin's user avatar
1 vote
0 answers
241 views

Why pgrep hangs when clang AddressSanitizer library is preloaded using LD_PRELOAD?

I noticed that when I set LD_PRELOAD env. variable to libclang_rt.asan-x86_64.so pgrep hangs. Why is this happening and how to avoid this? senx:/$ time pgrep anything real 0m0,022s user 0m0,...
senx's user avatar
  • 171
0 votes
1 answer
793 views

Installation of clang not correct, always “segmentation fault”

I have recently switched to ubuntu (20.04.2 LTS) and have tried installing clang (and clang++). I did it with: sudo apt-get install clang and can find clang and clang++ in /usr/bin When I try to ...
moert4's user avatar
  • 1
0 votes
0 answers
137 views

Clang Exits with Error Code 1

gmake (with Clang10) complains that in file m_file.cpp there is "no matching function for call to 'fileno'". Also, that it "cannot initialize a param of type 'FILE *' ::fclose(m_fp). ...
xsundevil's user avatar
0 votes
1 answer
246 views

Unable to use -lfl on NixOS

I'm new to NixOS and I'm trying to build a project which uses Flex. I get the following error if I try and build the project /nix/store/b10shv9yqbgps47y0n8x7l7bq8fmp1i6-binutils-2.31.1/bin/ld: cannot ...
Doot's user avatar
  • 111
4 votes
0 answers
6k views

How to change clang-10, llvm-10, etc to clang, llvm, etc.?

I use Spacemacs, and installed llvm-10, clnag-10, clangd-10, and all related packages, in Debian 10. Used the following command to install llvm $ sudo bash -c "$(wget -O - https://apt.llvm.org/...
tom_kp's user avatar
  • 43
25 votes
4 answers
85k views

How to install clang-10 on Ubuntu 20.4

I upgraded my Linux box from Ubuntu 18.04 to 20.04. I need to install the clang suite of compilers and the apt command is giving me errors. I've searched many possible solutions but so far none of the ...
Michel's user avatar
  • 359
1 vote
1 answer
573 views

Why does `clang-format --version` return 1

I'm working on a RHEL7 and I just installed clang: sudo yum install clang. Then I execute the command clang-format --version and the output is below: me@localhost:~$ clang-format --version LLVM (...
Yves's user avatar
  • 3,311
3 votes
1 answer
1k views

Print clang include path and store in file

I'm writing a program that needs to pull in the clang include paths. Thanks to Dump include paths from g++ I'm half-way there. The command I'm using is: clang++ -E -x c++ - -v < /dev/null The ...
Max's user avatar
  • 131
3 votes
1 answer
4k views

Missing c++ headers under alpine clang

I'm trying to build a small alpine-based docker container to build c++ app using clang++. Dockerfile looks like this: FROM alpine:3.10 RUN apk add --no-cache clang But when I'm trying to compile a ...
Denis Sheremet's user avatar
0 votes
1 answer
2k views

Clang++ Compiles, but doesn't run

I try to compile a program by typing (lets assume here I'm cd'd into the directory) clang++ file_name.cpp. It compiles and should autorun, but it doesn't, and just ends the event, and opens the ...
Trevor Hummer's user avatar
2 votes
1 answer
1k views

Compile clang-tidy under Alpine Linux

I'm trying to make a Docker image for a CI pipeline, that needs to contain clang-tidy among other tools. The problem is that I can't find any package containing clang-tidy on the Alpine repos, which ...
lightspot21's user avatar
2 votes
0 answers
260 views

How to build LLVM/Clang isolated from the host system?

I'm looking for something like the Linux From Scratch process for GCC, but for LLVM/Clang. Linux From Scratch builds an isolated GCC/binutils toolchain, and because of the rather monolithic nature, `...
user364814's user avatar
0 votes
1 answer
301 views

clang: error: no such file or directory: '_REENTRANT'

I am trying to install UDUNITS-2 package for the graphical visual browser: ncview. I need to understand the following error message: clang: error: no such file or directory: '_REENTRANT' A similar ...
Brendan Darrer's user avatar
-5 votes
2 answers
269 views

BUG in clang linker - name resolving issue

I found bug in clang, and i post it here because it's very difficult to find how to do it in clang system. I think this information in useful - i saw similar questions in web. So, clang makes wrong ...
Mikola Akbal's user avatar
3 votes
2 answers
3k views

Are there any successful forks or refactors of the Linux Kernel?

A google search reveals this slashdot story yielding this github repository that hasn't had a commit since 2016. There are 22,602 forks listed on github.com but these are going to be mostly (if not ...
mas's user avatar
  • 1,909
0 votes
0 answers
2k views

binary can't find specific library, but can find others in the same directory

I have a binary that I can compile with either clang or gcc, and the directory for the application is something like this: /app root dir /bin /<application> /lib /<application ...
ThaMe90's user avatar
  • 213
2 votes
1 answer
7k views

gdb doesn't step into function although source is available

I have a shared library compiled with -g -O0 including: void MyClass::whatever() { ... doSomething(myImage, myPoints); ... } bool MyClass::doSomething(const Image& image, std::vector<cv:...
Philippos's user avatar
  • 13.5k
2 votes
3 answers
277 views

Made an oupsie while testing some protection and executed rm /usr/bin/clang*

I deleted clang. I tried to use apt to uninstall clang, and then re-install it but I get this error: Setting up clang (1:3.8-33ubuntu3.1) ... update-alternatives: error: alternative path /usr/bin/...
curious student's user avatar
3 votes
1 answer
765 views

Problem with installing Clang: undefined symbol: LLVMInitializeMipsAsmParser

I'm new to Linux environment. Few days ago I've installed Fedora on my laptop. I want to complie some C++ source code but having trouble with Clang. First, after installing it with yum I see an error (...
pmakal's user avatar
  • 31
2 votes
0 answers
2k views

GCC/G++ compiles code to shared library instead of executable [closed]

I am having a rather puzzling problem. Recently, whenever I compile a program using GCC or G++, the compiler creates a shared library rather than an executable file. The library still runs if I ...
Techgineer's user avatar
4 votes
1 answer
10k views

How to install clang 3.9 or higher using apt-get on Linux Mint?

I know that there are similar questions for installation of clang-lower versions. But, I am trying to follow them to install clang-3.9 or 4.0 , but I am unable to do so on my Linux Mint 18. First, I ...
tonystark's user avatar
4 votes
2 answers
10k views

clang is refusing to install through apt

So, I wanted to get Unreal Engine 4, but for some odd reason, clang does not want to install. I have never used clang at all before, and it isn't even installed, so I have no real clue what is ...
SpecialBomb's user avatar
  • 1,988
2 votes
0 answers
1k views

Emscripten fundamentally incompatable with clang on linux

A long time ago I wrote a really crude and primitive shell in C++, and I only just recently discovered asm.js, so I thought it'd be neat to try to compile and run it in a browser, but I can't because ...
user avatar
1 vote
1 answer
641 views

Is it ok to use gcc to compile userspace binaries on FreeBSD 10?

I know that recently FreeBSD 10 dumped gcc in favour of clang due to licensing reasons (Ref). I wanted to understand if this restriction to use clang is limited only to kernel compilation. Can I use ...
user2586432's user avatar
7 votes
2 answers
13k views

clang-tidy install

I have clang installed from packages on both Ubuntu 14.07, Centos 7 and Fedoara 22. I would like to use clang-tidy but can neither find a package nor how to install it without installing clang from ...
Sardathrion - against SE abuse's user avatar
0 votes
1 answer
2k views

Fail to install Clang-3.5 due to Clang-3.3

I am trying to install clang-3.5 on Linux Mint 17.2 (Cinnamon) and I dependency errors. Edit: here is the output of apt-cache policy clang clang-3.5 clang-3.3: clang: Installed: (none) Candidate:...
BlazePascal's user avatar
2 votes
1 answer
951 views

Building an LFS system using ELLCC

Firstly, this isn't my first attempt at building an LFS system - I've already successfully built LFS 7.8 and LFS 7.8-systemd. I would like to replace GCC+GlibC with ELLCC, which is Clang/LLVM+musl. ...
Forrest Carroll's user avatar
0 votes
2 answers
73 views

does anybody know of a GNU/Linux project which has support for both gcc as well as clang?

Does anybody know of a project (apart from the Linux monolithic kernel) where a/the program can be compiled by both the compilers and can be used to observe their performances, any recommendations ? ...
shirish's user avatar
  • 12.5k
1 vote
1 answer
856 views

can i change the name of executable during compilation

I'm compiling LLVM/Clang but want to give a different name to the executable. Is there a special option I need to be using, like --binary-name? The trick is that I want to rename every tool that comes ...
flashburn's user avatar
  • 671
8 votes
1 answer
16k views

how to install newest clang 3.8 by apt

here I have found instruction how to install clang3.8: http://llvm.org/apt/ so I executed: wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add - result: --2015-09-19 12:53:09-...
bataliero1234's user avatar
2 votes
1 answer
5k views

How to build openssl with clang(rather than gcc) on a FreeBSD machine?

I have a 64 bit FreeBSD build machine. I need to add https support in my python3 application code. For that it is advised to build/compile python with openssl support. I do not need any gcc dependency ...
tarun_2709's user avatar