<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVtty4jgQ_Rrz0mWXsR1CHnjwcMlQm5BZSDKzT5RsyaBElrySHMLfb0sGEjKXrdmlXGBd-qLT57QoFN2PQpgDqcHqPZcbsAoMs20DBB5XY0UZUPZSKmkJl0zDjtst3N7Ml9BoFhYtFzYK4kkQ5yHcb7kBfOo9UFU-M11xwYBICuNb8sxuuLEmsq82gkem91AQw0swtq2qIM07J8EgPjx-OFve3QIT_JXrbmL5sADSWGgbSiyDIBng42e4NJYIAeEehClCzQQjhsFuwywYVdkdwXwbrRqmLWcmLFVdK_nm1W_cWtsYl0wywwfdRkK81JHSGxz6V7M9Bi23taI4-PQKH1aid5v72W8kXtYIE5QlKbcMJJdPxCNMQfCiFlyH_SzEasDx3SolzA-B-zD0jtc1l7xu67Vmf7dcMxokw8fpcjW_W0Aa9dMoC5Krbj_i9MRKixswN0mJUJKFlBOBk3CTL64f8uvpCsbfvsH4ZNR9I3nQbHyb_zFdf3qY30zWX-f3n9fzxeo-v7lZL_Lb6XqC9Llb_MIQHa9x_2KSLycIIYzz8ecprO6X88U1Ypdg0E_4QJedpo61yNFKaeSxwg0ffFdc0nVDymeyYRjE83c5_fNhvpxOYHy3mM2v3yzOoQshrywSX7dSOn10NUInuKN7jyIIJ86lO1eQToIEgRw6AoQuJ77BUgGEIRaRIo8xTjLzlvjrKulC4eRPJOClA1OtlQZiMfCsNdoRjBcHmqH70_jMbzJzWd0TjdQ2UbeU5v2LQeryr5kxHo630IASZsDrRmnLEFRv6fBWxVPkfI3zL_MJK1qUQwKaVUwzWTIDFs2c2N9jDu7jS_HLjNE1ksqEy06w3czHYDP_G5VNE_nqnoUpWosJYN_x7YYqzEcqC-wV-00E8EUZwwtc0ehfSexQshQtZW-AH_wESe7P793siMHGJ5h1MhmjrSR194p1qNUL85wjGGiL5BCqJJYrGX3vMZcnhaNlK48DlFjJaKsxY059wtiRGhcQTFsiqKZqhdj_wKOvUefFB4UDsX3OFWmF3fume2za9D9U5V959KMiuEO4ox3ZgFDbdyw5O8rYbVxZzNxzURm3s2QSYXArFdfGnlPz9zMee_WdiJ_GLtSx-ke5g-_e3U2Gduc3FVoNndF5_zhrLYcuEUIXrdWuSWCQQzEdY5gTrwFVlq32bbffGa0Y3o7CqEM9dko_GwzCzOEYa_Z6PFh3D7jmf8xx5gA-Du5a27R4WSknzOgnfWyhrIMBUGlf8RZHSc2xY6ILeNMeeKEBWr3v4Pd_fZniVFdcZg6akAqpWx2qG-H5W0FlkFxacHA5H-9V68zlfodqwUOfdVRccgb4E_XoKKVX6RXpkdZulR49OcxFqdy13Wu1GJ3f0Bs8R1tECPaBEUdinC6wGTem9UBdpP00621HWTEYZMM4G7BhTIsqpUNK0ji9zDI6yC4uip4gBRNmFFzgFZNItgPvwtXoYtL7_xnwURInSdzHz2U8TOMovkqGWVmlg2GVDao4C7KY1YSL03-Pnh4dOLoxuCg8O0-LBNvbRjLmE8YMLbeCjWbooOtRDUeN4f85f-md9Y1Kq9qh_51WBnHPJz3yGf8DM6skiA>53134</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Failed to pick up MLIR installation from `MLIRConfig.cmake`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jackalcooper
      </td>
    </tr>
</table>

<pre>
    - I am trying to setup a VSCode devcontainer with MLIR pre-built.
- This is my dockerfile and CMakeLists.txt. Very basic stuff:
```
FROM elixir
RUN apt update && apt install -y lsb-release wget software-properties-common
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 14
RUN apt update && apt install -y cmake ccache ninja-build libmlir-14-dev mlir-14-tools
```
```
cmake_minimum_required(VERSION 3.13.4)
project(standalone-dialect LANGUAGES CXX C)

set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)

set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")

find_package(MLIR REQUIRED CONFIG)
```
- After running cmake (`cmake .. -DMLIR_DIR=$(llvm-config-14  --libdir)/cmake/mlir`):
```
CMake Error at /usr/lib/llvm-14/lib/cmake/mlir/MLIRTargets.cmake:1563 (message):
  The imported target "obj.MLIRCAPIDebug" references the file

     "/usr/lib/llvm-14/lib/objects-Release/obj.MLIRCAPIDebug/Debug.cpp.o"

  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-14/lib/cmake/mlir/MLIRTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/llvm-14/lib/cmake/mlir/MLIRConfig.cmake:30 (include)
  llvm-built/CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!
See also "/workspaces/mlir_ex/cmake-build-dev/CMakeFiles/CMakeOutput.log".
```
- Note: RelWithDebInfo/ Release/ Debug `CMAKE_BUILD_TYPE` all tested, no difference. Couldn't find `Debug.cpp.o` anywhere after running `find`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydVtty4jgQ_Rrz0mUX2ISQBx48XDLUJmQGkszsEyXbbVAiS15JDuHvtyUDCZnL1iylwtalT99Ot5ypYj8KYQ6sAqv3XG7AKjBomxoYPK7GqkAo8CVX0jIuUcOO2y3c3syXUGsMs4YLGwXdSdBNQ7jfcgM0qj0UKn9GXXKBwGQB41v2jDfcWBPZVxvBI-o9ZMzwHIxtyjJI0hYkGHQPw09ny7tbQMFfuW4Xlg8LYLWFpi6YRQjiAQ2_wqWxTAgI9yBMFmoUyAzCboMWjCrtjpG9tVY1asvRhLmqKiXfUP3BrbW1ccbEMxoEGwnxUkVKb2jqX832qDTfVqqgyadX-LATvTvc6_-B4XlFYYI8Z_kWQXL5xHyECxA8qwTXYa8fUjbg-G6VEuangfsw9cDrikte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