<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ClangConfig.cmake is unusable"
href="https://bugs.llvm.org/show_bug.cgi?id=37128">37128</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ClangConfig.cmake is unusable
</td>
</tr>
<tr>
<th>Product</th>
<td>Packaging
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>deb packages
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>zsolt.parragi@cancellar.hu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The ClangConfig.cmake file is installed to an incorrect location, which makes
it unusable from CMake.
For 6.0, it is installed in /usr/share/llvm-6.0/cmake/
However, when trying to discover clang using the following CMake command:
FIND_PACKAGE(Clang REQUIRED PATHS "/usr/share/llvm-6.0/cmake/" NO_DEFAULT_PATH)
cmake fails, as the config script assumes a fixed directory structure, and some
of the required files are located in a different directory, under /usr/lib/llvm
This can be fixed by symlinking/copying/moving /usr/share/llvm-6.0/cmake/
directory to /usr/lib/llvm-6.0/lib/cmake/clang.
Even after this, CMake still fails because it can't find some executables.
* First it can't find the clang executable, because it expects to find it
under /usr/lib/llvm-6.0/bin/clang-6.0, so another symlink has to be created
there
* then it also tries to find the clang-format, clang-tidy and
clang-import-test executables. These are at the correct locations, but only
installed as part of the clang-tidy-6.0, clang-format-6.0, and clang-tools-6.0
packages. Without installing those packages, the cmake finder can't be used.
This part probably isn't a bug, but it isn't mentioned anywhere.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>