I've installed clang-3.4.2-7.el7.x86_64.rpm on RHEL 7 and it came with llvm, but i couldn't find the scan-build utility.
I have already installed gcc and cmake and all other tools that are mentioned here But unfortunately i can't execute the scan-build commands.
BTW, I want to integrate it with Clang Scan-Build Plugin.
Am I missing something in the configuration?
It's in the package clang-analyzer
Clang analyzer doesn't get installed by default, to install it with the current version of LLVM 6.0 run:
yum install llvm-toolset-6.0-clang-analyzer
You may also want to install llvm-toolset-6.0-clang-tools-extra.
How to install Clang/LLVM 6 on RHEL has this and other details.
Related
When I install llvm using command
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
The binaries that get installed looks like following
All the binaries have version number. For e.g. llvm-objdump-15.
But the tools I use are looking for llvm-objdump, while installer installed it as llvm-objdump-15. I can create a symbolic link with name llvm-obdump, but I want to know how to install it correctly and not have version numbers in all these binaries?
I fixed it by using apt-get install
sudo apt-get install clang-format clang-tidy clang-tools clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python3-clang
It did install an older version, but it was fine for my needs
The names without version numbers are controlled by the llvm-defaults package on your distribution. It picks a specific version to make the default, and only that one has un-versioned symlinks installed into the system PATH.
As a consequence, on Debian based systems only one version (controlled by the distro) is going to be available there and it may not be the one from https://apt.llvm.org/. On these systems, the recommended way to use a specific version is to add the suffix.
If you can't do that, you should install the distro-provided version using the normal process rather than the versions on https://apt.llvm.org/.
To read more details about how all of this works, you can check out the documentation for the llvm-defaults package set here: https://salsa.debian.org/pkg-llvm-team/llvm-defaults/-/blob/experimental/debian/README.Debian
I have installed LLVM via brew on macOS with the below mentioned command:
brew install --with-toolchain llvm#3.9
I would like to use clang-tidy but some checks are missing, for example misc-string-compare.
What could be the problem?
As far as I can see, misc-string-compare was introduced in LLVM 4.0
How to install gcc version 4.8 on centos or scientific linux operating systems which require yum for installing.
I tried to download gcc from https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/ and then ran ./configure and then make. After running make it gives me the error: configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Is there some way by which I may install gcc version 4.8 on linux using yum install
I tried:
1). I tried with yum --enablerepo=testing-2-devtools-6 install devtoolset-2-gcc devtoolset-2-gcc-c++ it gives me repository not found
2). yum group install "Development Tools". It gives me Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
3). building it from scratch, you'll have to do ./contrib/download_prerequisites first to get MPFR, GMP and MPC in the GCC source tree, then make a separate directory and run /path/to/gcc/source/configure.
It gives:
configure: error: building out of tree but /home/Softwares/gcc-4.8.2
contains host-x86_64-unknown-linux-gnu
https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3/html/3.0_Release_Notes/DTS3.0_Release.html#Features
Install the Red Hat Developer Toolset 3.0 (or 2.X) in a way similar to what is described here. (Basically you use a repo someone else built for CentOS).
Google says to try
yum group install "Development Tools"
check out: http://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/
i am new to linux and I have the following question:
I am trying to install MINGW in Ubuntu.
I ran the command:
sudo apt-get install mingw-w64
It was installed, and if i put the command gcc it runs ok. The problem is g++ command does not work. I guess it is because i don't have the c++ compiler (as I read in similar questions in stackoverflow).
I read too that you can use the next command:
mingw-get install g++
but i don't have the executable program for this command.
My question is, how can I install that executable? or is there another way to update my mingw so I can use the g++ compiler?
Hope I have explained myself correctly. Thank you for any help I receive.
mingw-get is a windows specific package manager, it is not needed when you use a native linux package manager such as APT.
Installing package mingw-w64 depends on package g++-mingw-w64, which depends on g++-mingw-w64-i686 and g++-mingw-w64-x86-64.
These packages install the mingw cross compilers as
/usr/bin/x86_64-w64-mingw32-g++-posix
/usr/bin/x86_64-w64-mingw32-g++-win32
/usr/bin/i686-w64-mingw32-g++-posix
/usr/bin/i686-w64-mingw32-g++-win32
Older versions of mingw cross compiler shipped /usr/bin/i586-mingw32msvc-c++, which is replaced by i686-w64-mingw32-c++-win32
You can usually use this toolchain in a project by running ./configure CXX=i686-w64-mingw32-c++-win32 or make CXX=i686-w64-mingw32-c++-win32
Note: the above description is correct for the most recent toolchain in Debian unstable. It may need some minor tweaking for older systems.
I'd like to build the latest version of gcc on a mac. I have the latest xcode but I'm looking for some of the c++0x features that are in more recent versions (the lambda functions, etc).
Are there any good step-by-step tutorials on doing this?
You should look at the Homebrew project.
Homebrew allows you to do things like this:
brew install gcc
Mac homebrew installation instructions are available here.
Add GCC support to a fresh Xcode 4.2 installation using this homebrew formula:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
Upgrading from Xcode 4.1 doesn't drop existing GCC support, so this formula is only useful if you're working with a fresh 4.2+ installation.
One option is to install MacPorts and install the gcc46 package:
sudo port install gcc46
Another option is to download the source code and build it as follows:
tar xzvf gcc-4.6.0.tar.gz
cd gcc-4.6.0
./configure
make
Note that GCC 4.6.0 requires as prerequisites GMP 4.2+, MPFR 2.3.1+, and MPC 0.8.0+. If ./configure fails, it's probably because you're missing one of these (though it should give you a helpful error message in any case).
Building will take a while—likely several hours, depending on your hardware.
I would suggest building it yourself (Adam details how to do so). This will give you fine control on where to install and all the options you want to select. My experience from having multiple versions of gcc is that, if care is not taken apple's version of gcc can be damaged.
To speed up gcc installation you might want to look at --enable-languages option. If there are languages you don't need installed with the new gcc then you may not want to select them.