jacobdufault / cquery

C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install on RPi tries to download and run x86_64 clang

richardxday opened this issue · comments

Hi,

Raspberry Pi running Ubuntu 19.04:

-- 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) ...
-- Extracting downloaded Clang with CMake built-in tar ...
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pipe2
-- Looking for pipe2 - found
CMake Error at cmake/FindClang.cmake:95 (message):
Error retrieving Clang resource directory with Clang executable. Output:

/home/richard/code/cquery/build/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++: 1: /home/richard/code/cquery/build/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++: ELF: not found

/home/richard/code/cquery/build/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++:
2:
/home/richard/code/cquery/build/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++:
Syntax error: ")" unexpected

Call Stack (most recent call first):
CMakeLists.txt:108 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/richard/code/cquery/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.

Obviously this is never going to work as the Raspberry Pi is an Arm architecture, so why is it trying to download and run the x86 version?

Thanks,
Richard.

Hi,
I have the same problem. As far i understand it correctly the prebuilded version, which CMake trying to use, is builded for different architecture( I cannot find which on). So try to build clang from scratch.
http://releases.llvm.org/download.html
or https://github.com/llvm/llvm-project/releases.