You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running "cmake . -DCMAKE_BUILD_TYPE=Release" it systematically halts with this error :
CMake Error at generator/CMakeLists.txt:7 (Find_Package):
Could not find a package configuration file provided by "Clang" with any of
the following names:
ClangConfig.cmake
clang-config.cmake
Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
"Clang_DIR" to a directory containing one of the above files. If "Clang"
provides a separate development package or SDK, be sure it has been
installed.
I have packages clang + libllvm-6.0 + llvm-6.0 + llvm-6.0-runtime + libclang-6.0-dev + libclang1 + libclang-common-6.0-dev installed
Hello Olivier,
From what you advised I tried this: find /usr/ -name ClangConfig.cmake
--> /usr/share/llvm-6.0/cmake/ClangConfig.cmake
cmake . -DCMAKE_PREFIX_PATH=/usr/share/llvm-6.0/cmake
--> -- Found LLVM 6.0.0 in /usr/lib/llvm-6.0 -- Using LLVMConfig.cmake in: /usr/lib/llvm-6.0/cmake CMake Error at /usr/share/llvm-6.0/cmake/ClangConfig.cmake:18 (include): include could not find load file: /usr/lib/cmake/clang/ClangTargets.cmake Call Stack (most recent call first): generator/CMakeLists.txt:7 (Find_Package)
For info: find /usr/ -name ClangTargets.cmake
--> /usr/share/llvm-6.0/cmake/ClangTargets.cmake
Activity
ogoffart commentedon Dec 1, 2018
Does the libclang-6.0-dev package not come with a ClangConfig.cmake file?
Maybe there is a clang-dev package?
You can try to do
To find if you have the file.
ogoffart commentedon Dec 1, 2018
https://packages.ubuntu.com/search?searchon=contents&keywords=ClangConfig.cmake&mode=exactfilename&suite=cosmic&arch=any
says the package would be
clang-6.0I suppose you would also need to do
-DCMAKE_PREFIX_PATH=/usr/lib/llvm-6.0/lib/cmake/clangor someting like thatHuguesDelorme commentedon Dec 4, 2018
Hello Olivier,
From what you advised I tried this:
find /usr/ -name ClangConfig.cmake-->
/usr/share/llvm-6.0/cmake/ClangConfig.cmakecmake . -DCMAKE_PREFIX_PATH=/usr/share/llvm-6.0/cmake-->
-- Found LLVM 6.0.0 in /usr/lib/llvm-6.0-- Using LLVMConfig.cmake in: /usr/lib/llvm-6.0/cmakeCMake Error at /usr/share/llvm-6.0/cmake/ClangConfig.cmake:18 (include):include could not find load file: /usr/lib/cmake/clang/ClangTargets.cmakeCall Stack (most recent call first): generator/CMakeLists.txt:7 (Find_Package)For info:
find /usr/ -name ClangTargets.cmake-->
/usr/share/llvm-6.0/cmake/ClangTargets.cmakeWhat could I try to fix this issue?
rickywxg commentedon May 19, 2019
This is a debian packaging bug and was fixed in llvm-7.
Please just remove the default llvm-6.0/clang-6.0 packages and install the version 7.
sudo apt install llvm-7 clang-7 libclang-7-devAdd workaround
Add workaround (#86)
Durvi98 commentedon Jun 10, 2021
ogoffart commentedon Jun 10, 2021
Hi @Durvi98
It doesn't look like you are commenting on the right github repository.
eagerm commentedon Jul 11, 2023
On Fedora, the missing packages are installed with "sudo dnf install llvm-devel".
wetw0rk commentedon Apr 8, 2024
I was able to build using the following (from the build directory), as of 2024.
sudo apt install llvm-15-dev clang-15 libclang-15-devcmake -DCMAKE_BUILD_TYPE=Release ..make