Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

LLVM version error during EOS install #2998

Closed
bitsliu opened this issue May 13, 2018 · 6 comments
Closed

LLVM version error during EOS install #2998

bitsliu opened this issue May 13, 2018 · 6 comments

Comments

@bitsliu
Copy link

bitsliu commented May 13, 2018

Hi,

I came across LLVM error while installing EOS. EOS requires LLVM 4.x, while Homebrew provides 6.x for Mac OSX HighSierra. I do export the LLVM_DIR and it does not work. When I use homebrew to check LLVM info, it shows only LLVM 6.0, while LLVM 4.x is another package LLVM@4.

Error message:

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.
@pacificcode
Copy link
Contributor

@bladexxv EOS.IO requires LLVM 4 to compile successfully.
On Mac OS using homebrew you would need to do the following (the build script will handle installing the proper LLVM version.)

brew remove --force llvm
cd /path/to/eos
git rm -rf build/
git pull
git submodule update --init --recursive
./eosio_build.sh

To verify the LLVM install after running the build script you can run:
$ ls -lah /usr/local/bin/llvm-config
lrwxr-xr-x 1 billhamilton admin 38B Jan 19 04:52 /usr/local/bin/llvm-config -> ../Cellar/llvm@4/4.0.1/bin/llvm-config

$ /usr/local/bin/llvm-config --has-rtti --version
YES
4.0.1

@pacificcode pacificcode self-assigned this May 13, 2018
@bitsliu
Copy link
Author

bitsliu commented May 14, 2018

Hi @pacificcode It worked out by adding '' to LLVM@4 dir as /usr/local/Cellar/llvm\@4/lib/cmake/llvm. Thanks very much.

@zcm211
Copy link

zcm211 commented Jun 1, 2018

not work, problem still exist

@cppfuns
Copy link

cppfuns commented Jun 1, 2018

@PaulRBerg
Copy link

PaulRBerg commented Jun 3, 2018

Clean

First off, make sure you clean your build folder by running rm -rf build/.

Pull

Then, pull the latest updates:

git pull
git submodule update --init --recursive

Install LLVM 4

Follow instructions from #43 to make sure you have the correct version of llvm (which is 4) and you have set the LLVM_DIR environment variable. Note: Homebrew now uses llvm@4 in /usr/local/Cellar.

Build

Run ./eosio_build.sh

@Nazeim
Copy link

Nazeim commented Jul 25, 2018

Hi,
I also have the same error and do not know how to solve it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants