[llvm-bugs] [Bug 35084] New: Giving error on LLVM REQUIRED CONFIG in cmake file

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 25 14:34:32 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=35084

            Bug ID: 35084
           Summary: Giving error on LLVM REQUIRED CONFIG in cmake file
           Product: Build scripts
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: 18100071 at lums.edu.pk
                CC: llvm-bugs at lists.llvm.org

Created attachment 19343
  --> https://bugs.llvm.org/attachment.cgi?id=19343&action=edit
Error displayed on the terminal

I am following the tutorial shared below to make a pass in LLVM:
LINK: https://www.cs.cornell.edu/~asampson/blog/llvm.html

But when I execute the command cmake ..

The following error occurs:
CMake Error at CMakeLists.txt:2 (find_package):
  Could not find a package configuration file provided by "LLVM" with any of
  the following names:

    LLVMConfig.cmake
    llvm-config.cmake

  Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
  "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!


The content of cmakeLists.txt file:

cmake_minimum_required(VERSION 3.1)
find_package(LLVM REQUIRED CONFIG)
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})

add_subdirectory(skeleton)  # Use your pass name here.

-------------------------------------------------------------
Line 2 gives the error here.


I have tried few of the solutions posted on stack overflow and this forum but
to no avail. Few suggest upgrading to llvm >= 3.5 llvm since I'm currently
using llvm 3.4. But I don't want to do that since I'm doing a project on KLEE
which is recommended to run on llvm 3.4.

In my usr/share/llvm-3.4/cmake directory I have a "LLVM-Config.cmake" file but
no files are named as "LLVMConfig.cmake" or "llvm-config.cmake". 


Any help would be appreciated, Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171025/7d410741/attachment.html>


More information about the llvm-bugs mailing list