Solvedeos Could not find a package configuration file provided by "LLVM"

Got this error trying to build in OSX

$ cmake .
-- Using custom FindBoost.cmake
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
--   filesystem
--   program_options
--   signals
--   serialization
--   chrono
--   unit_test_framework
--   context
--   locale
-- Using custom FindBoost.cmake
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   coroutine
-- Configuring Eos on OS X
-- Setting up SECP256K1 root and include vars to /usr/local, /usr/local/include
-- Configuring fc to build on Unix/Apple
-- Setting up OpenSSL root and include vars to /usr/local/opt/openssl/, /usr/local/opt/openssl//include
-- Found Secp256k1: /usr/local/lib/libsecp256k1.a
-- zlib found
-- bzip2 found
-- Using custom FindBoost.cmake
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
--   filesystem
--   chrono
--   unit_test_framework
--   locale
-- Configuring ChainBase on OS X
CMake Error at libraries/wasm-jit/Source/Runtime/CMakeLists.txt:26 (find_package):
  Could not find a package configuration file provided by "LLVM" (requested
  version 4.0) 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!
28 Answers

✔️Accepted Answer

With brew, make sure you have llvm 4 installed

$ brew info llvm  
llvm: stable 4.0.0 (bottled), HEAD [keg-only]

And let cmake know where to find cmake files for llvm:

export LLVM_DIR=/usr/local/Cellar/llvm/4.0.0_1/lib/cmake

Similar path to llvm/4.0/lib/cmake should exist for macports or installation from source.

Other Answers:

I just did one recently. Here is the command I've used and got it up and running:

export LLVM_DIR=/usr/local/Cellar/llvm\@4/4.0.1/lib/cmake