eos icon indicating copy to clipboard operation
eos copied to clipboard

LLVM version error during EOS install

Open bitsliu opened this issue 8 years ago • 6 comments

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.

bitsliu avatar May 13 '18 01:05 bitsliu

@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 avatar May 13 '18 14:05 pacificcode

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

bitsliu avatar May 14 '18 01:05 bitsliu

not work, problem still exist

zcm211 avatar Jun 01 '18 02:06 zcm211

http://www.softwareace.cn/?p=1771

cppfuns avatar Jun 01 '18 03:06 cppfuns

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

PaulRBerg avatar Jun 03 '18 12:06 PaulRBerg

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

Nazeim avatar Jul 25 '18 15:07 Nazeim