Issue 109392
Summary Cannot use llvm-20-dev without mlir-20-tools and libpolly-20-dev installed
Labels cmake, packaging, platform:linux
Assignees
Reporter dtcxzyw
    Reproducer:
```
cmake_minimum_required(VERSION 3.20)
enable_testing()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
set(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

project(Test)

find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
include(AddLLVM)
```
cmake complains:
```
CMake Error at /usr/lib/llvm-20/lib/cmake/llvm/LLVMExports.cmake:1914 (message):
  The imported target "mlir-pdll-lsp-server" references the file

     "/usr/lib/llvm-20/bin/mlir-pdll-lsp-server"

  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-20/lib/cmake/llvm/LLVMExports.cmake"

  but not all the files it references.

Call Stack (most recent call first):
 /usr/lib/llvm-20/cmake/LLVMConfig.cmake:370 (include)
  CMakeLists.txt:15 (find_package)


-- Configuring incomplete, errors occurred!
```

Workaround: install `mlir-20-tools` and `libpolly-20-dev` as well.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to