bcc doesn't find llvm cmake files on Ubuntu Xenial
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
There is an upstream bug related to cmake+llvm that is affecting our ability to build on Ubuntu Xenial. That bug is tracked at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819072.
The cmake .. phase of our build break with:
``` bash
$ cmake ..
-- Latest recognized Git tag is v0.1.8
-- Git HEAD is 3036b96e4ba4f03868ff2271765adb031edf21d6
-- Revision is 0.1.8-3036b96e
CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include):
include could not find load file:
/usr/share/llvm/cmake/LLVMExports.cmake
Call Stack (most recent call first):
CMakeLists.txt:17 (find_package)
CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include):
include could not find load file:
/usr/share/llvm/cmake/LLVM-Config.cmake
Call Stack (most recent call first):
CMakeLists.txt:17 (find_package)
-- Found LLVM: /usr/include
CMake Error at CMakeLists.txt:36 (message):
Unable to find clang libraries
-- Configuring incomplete, errors occurred!
```
As a workaround, I was able to do the following manually:
``` bash
sudo apt-get install -y llvm-3.8-dev libclang-3.8-dev
sudo mkdir -p /usr/lib/llvm-3.8/share/llvm
sudo ln -s /usr/share/llvm-3.8/cmake /usr/lib/llvm-3.8/share/llvm/cmake
sudo sed -i -e '/get_filename_component(LLVM_INSTALL_PREFIX/ {s|^|#|}' -e '/^# Compute the installation prefix/i set(LLVM_INSTALL_PREFIX "/usr/lib/llvm-3.8")' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMConfig.cmake
sudo sed -i '/_IMPORT_CHECK_TARGETS Polly/ {s|^|#|}' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMExports-relwithdebinfo.cmake
sudo sed -i '/_IMPORT_CHECK_TARGETS sancov/ {s|^|#|}' /usr/lib/llvm-3.8/share/llvm/cmake/LLVMExports-relwithdebinfo.cmake
sudo ln -s /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1 /usr/lib/llvm-3.8/lib/
```
This /issue should serve as a placeholder until the upstream is fixed.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.