cquery icon indicating copy to clipboard operation
cquery copied to clipboard

Why does cquery build download clang 7 when it is already installed?

Open richardxday opened this issue 6 years ago • 1 comments

Hi,

This is pretty frustrating to be honest, why is the build process downloading a compiler when it is already installed?

Ubuntu 19.04

The issue: $ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=release -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -- The CXX compiler identification is GNU 8.3.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using downloaded Clang -- Downloading Clang 7.0.0 (https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz) ...

But clang-7 is already installed: $ apt policy clang-7 clang-7: Installed: 1:7.0.1-8 Candidate: 1:7.0.1-8 Version table: *** 1:7.0.1-8 500 500 http://gb.archive.ubuntu.com/ubuntu disco/universe amd64 Packages 100 /var/lib/dpkg/status

Why can't the build process just use the installed version?

Thanks, Richard.

richardxday avatar Jul 29 '19 21:07 richardxday

You can set SYSTEM_CLANG into ON, then it will be built with your system clang instead of clang 7 from the release page. It is hard coded in CMakeLists.txt.

tan-wei avatar Dec 09 '19 14:12 tan-wei