Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use llvm-20-dev without mlir-20-tools and libpolly-20-dev installed #109392

Open
dtcxzyw opened this issue Sep 20, 2024 · 1 comment
Open
Labels
cmake Build system in general and CMake in particular packaging platform:linux

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Sep 20, 2024

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.

@dtcxzyw dtcxzyw added cmake Build system in general and CMake in particular packaging platform:linux labels Sep 20, 2024
@dtcxzyw
Copy link
Member Author

dtcxzyw commented Oct 3, 2024

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular packaging platform:linux
Projects
None yet
Development

No branches or pull requests

1 participant