<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 - clang_shared target refers to non-existent file"
   href="https://bugs.llvm.org/show_bug.cgi?id=42432">42432</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang_shared target refers to non-existent file
          </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>normal
          </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>kim.grasman@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using `find_package(Clang)` with the clang-9 package from <a href="https://apt.llvm.org">https://apt.llvm.org</a>
consistently fails with:


  CMake Error at /usr/lib/llvm-9/lib/cmake/clang/ClangTargets.cmake:565
(message):
    The imported target "clang_shared" references the file
       "/usr/lib/llvm-9/lib/libclang_shared.so.9"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/llvm-9/lib/cmake/clang/ClangTargets.cmake"
    but not all the files it references.

I've managed to work around this by patching out the clang_shared target from
the CLang config files:
<a href="https://github.com/include-what-you-use/include-what-you-use/pull/692/commits/f7a1cfd6b7ad52fc5e628f17e272e05e3866b18c">https://github.com/include-what-you-use/include-what-you-use/pull/692/commits/f7a1cfd6b7ad52fc5e628f17e272e05e3866b18c</a>

This bug renders the Clang package unusable for tools using CMake, so it would
be nice to either strip out the target or include the binary (in the clang
package, because that's where the .cmake modules are).</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>