Issues compiling 15.0.7

I’m trying to compile LLVM 15.0.7 from src, but I’m stuck. It seems I got this problem, and the solution at the end doesn’t work (the cmake folder is already in the right location, from what I understand).

I followed the guidelines in Building LLVM with CMake, but I’m stuck already at the first CMake.

The error:

CMake Error at cmake/modules/CMakeLists.txt:1 (include):
  include could not find requested file:


CMake Error at cmake/modules/CMakeLists.txt:3 (include):
  include could not find requested file:


CMake Error at cmake/modules/CMakeLists.txt:116 (find_prefix_from_config):
  Unknown CMake command "find_prefix_from_config".

I’m on macOS Big Sur (11.7.4) (Intel Mac).

The actual command line is:


Note: I edited the config-ix.cmake file to skip the libedit search, because I had this issue:

    CMake Error at CMakeLists.txt:327 (include):
  include could not find requested file:


CMake Warning at cmake/config-ix.cmake:223 (find_package):
  By not providing "FindLibEdit.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "LibEdit", but
  CMake did not find one.

  Could not find a package configuration file provided by "LibEdit" with any
  of the following names:


Any help is appreciated. Thanks a lot!

To someone having this issue: I misunderstood the necessary steps:

  • Download cmake-15.0.7.tar.xz from the llvm15.0.7 release page.
  • Extract the context of the ./Modules subfolder into the ./cmake/modules folder of the llvm sources.
  • When executing the cmake command, pass the -DLLVM_INCLUDE_BENCHMARKS=OFF if you don’t have the benchmarks folder.