Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Install on RPi tries to download and run x86_64 clang #880

Open
richardxday opened this issue Jul 29, 2019 · 2 comments
Open

Install on RPi tries to download and run x86_64 clang #880

richardxday opened this issue Jul 29, 2019 · 2 comments

Comments

@richardxday
Copy link

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.

@MenosGrandes
Copy link

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.

kaarrot added a commit to kaarrot/cquery that referenced this issue Sep 6, 2019
@kaarrot
Copy link

kaarrot commented Sep 6, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants