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

LLVM 4.0 could not find a package configuration file #3786

Closed
itsdevcoffee opened this issue Jun 3, 2018 · 18 comments
Closed

LLVM 4.0 could not find a package configuration file #3786

itsdevcoffee opened this issue Jun 3, 2018 · 18 comments

Comments

@itsdevcoffee
Copy link

Running on Mac OS 10.13.5 and this happens when running the build script: ./eosio_build.sh

Here is the error that I receive:

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.

I've assured that LLVM 4.0.0 is installed via HomeBrew and also added the correct path to LLVM_DIR. If anyone has experienced this same issue please let me know, thanks so much!

@itsdevcoffee itsdevcoffee changed the title LLVM 4.0 could find a package configuration file LLVM 4.0 could not find a package configuration file Jun 3, 2018
@pacificcode
Copy link
Contributor

@DmsChrisPena can you run the following command and paste the full output here:

$ find /usr -name LLVMConfig.cmake -print 2>/dev/null

@pacificcode pacificcode self-assigned this Jun 4, 2018
@itsdevcoffee
Copy link
Author

@pacificcode
Here is what was logged:

/usr/local/wasm/lib/cmake/llvm/LLVMConfig.cmake
/usr/local/Cellar/llvm/6.0.0/lib/cmake/llvm/LLVMConfig.cmake
/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm/LLVMConfig.cmake

@pacificcode
Copy link
Contributor

@DmsChrisPena you have 2 versions of brew installed LLVM, you need to remove version 6. I would recommend the following commands:

remove both versions of llvm

brew remove --force llvm

run the eosio_build.sh script which will correctly install & link llvm version 4

cd /path/to/eos
rm -rf build/
git checkout master
git pull
git submodule update --init --recursive

Let me know how this works out for you.

@itsdevcoffee
Copy link
Author

@pacificcode Ran all the commands and I'm still getting the same issue.

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

@DmsChrisPena I need to see the full output of running the eosio_build.sh script, can you run the following commands and paste the full output here:

find /usr -name LLVMConfig.cmake -print 2>/dev/null
cd /path/to/eos
rm -rf build/
git checkout master
git pull
git submodule update --init --recursive
./eosio_build.sh

@itsdevcoffee
Copy link
Author

itsdevcoffee commented Jun 4, 2018

@pacificcode Here it is, thanks so much.

Chriss-MBP:eos chrispena$ find /usr -name LLVMConfig.cmake -print 2>/dev/null
/usr/local/wasm/lib/cmake/llvm/LLVMConfig.cmake
/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm/LLVMConfig.cmake
Chriss-MBP:eos chrispena$ rm -rf build/
Chriss-MBP:eos chrispena$ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Chriss-MBP:eos chrispena$ git pull
Already up-to-date.
Chriss-MBP:eos chrispena$ git submodule update --init --recursive
Chriss-MBP:eos chrispena$ ./eosio_build.sh 

	Beginning build version: 1.2
	Mon Jun  4 03:13:42 UTC 2018
	User: chrispena
	git head id: 0961a56007d40fe6d897b7d726fe5005acf06162
	Current branch: master

	ARCHITECTURE: Darwin

	OS name: Darwin
	OS Version: 10.13.5
	CPU speed: 260.00Ghz
	CPU cores: 4
	Physical Memory: 16 Gbytes
	Disk install: /dev/disk1s1
	Disk space total: 233G
	Disk space available: 160G

	Checking xcode-select installation
	xcode-select installation found @ 
	/usr/bin/xcode-select 

	Checking Ruby installation.
	Ruby installation found @ 
	/usr/bin/ruby 

	Checking Home Brew installation
	Home Brew installation found @
	/usr/local/bin/brew

	Checking dependencies.
	Checking automake ... 		 automake found
	Checking Libtool ... 		 Libtool found
	Checking OpenSSL ... 		 OpenSSL found
	Checking llvm ... 		 llvm found
	Checking wget ... 		 wget found
	Checking CMake ... 		 CMake found
	Checking GMP ... 		 GMP found
	Checking gettext ... 		 gettext found
	Checking MongoDB ... 		 MongoDB found
	Checking Doxygen ... 		 Doxygen found
	Checking Graphviz ... 		 Graphviz found
	Checking LCOV ... 		 LCOV found
	Checking Python3 ... 		 python3 NOT found.

	No required Home Brew dependencies to install.

	Checking boost library installation.
	Boost 1.67.0 found at /usr/local.

	Checking MongoDB C++ driver installation.
	Mongo C++ driver found at /usr/local/lib/libmongocxx-static.a.

	Checking secp256k1-zkp installation.
	secp256k1 found at /usr/local/lib/.

	Checking LLVM with WASM support.
	WASM found at /usr/local/wasm/bin/.


>>>>>>>> ALL dependencies sucessfully found or installed . Installing EOSIO

>>>>>>>> CMAKE_BUILD_TYPE=Release
>>>>>>>> ENABLE_COVERAGE_TESTING=false
>>>>>>>> DOXYGEN=false

-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using custom FindBoost.cmake
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   filesystem
--   system
--   program_options
--   signals
--   serialization
--   chrono
--   unit_test_framework
--   context
--   locale
--   iostreams
-- Configuring EOSIO on OS X
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- binaryen building with -std=c++11
-- binaryen building for platform x86-64
-- binaryen building with -Wall
-- binaryen building with -Werror
-- binaryen building with -Wextra
-- binaryen building with -Wno-unused-parameter
-- binaryen building with -fno-omit-frame-pointer
-- binaryen building with -fPIC
-- binaryen building with -O2
-- binaryen building with -UNDEBUG
-- Using 'SYS' as CORE symbol name
-- Using 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV' as public key for 'eosio' account
-- Found WASM: /usr/local/wasm/bin/clang  
-- Using WASM clang => /usr/local/wasm/bin/clang
-- Using WASM llc => /usr/local/wasm/bin/llc
-- Using WASM llvm-link => /usr/local/wasm/bin/llvm-link
-- Found Secp256k1: /usr/local/lib/libsecp256k1.a
-- Found GMP: /usr/local/lib/libgmp.a  
-- Configuring fc to build on Unix/Apple
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.a (found version "1.0.2o") 
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
-- zlib found
-- Configuring Builtins
-- Configuring SoftFloat
-- Using custom FindBoost.cmake
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   filesystem
--   system
--   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!
See also "/Users/chrispena/eos/build/CMakeFiles/CMakeOutput.log".

	>>>>>>>>>>>>>>>>>>>> CMAKE building EOSIO has exited with the above error.

@harlanc
Copy link

harlanc commented Jun 4, 2018

also encounter this issue on OSX

@pacificcode
Copy link
Contributor

pacificcode commented Jun 4, 2018

@DmsChrisPena @harlanc its looks as though you need to put /usr/local/bin in your PATH. run the following:

export PATH=/usr/local/bin:$PATH

Run the commands as described above and if you run into any further issues paste the full output here.
Let me know how this works out for you.

@ghost
Copy link

ghost commented Jun 5, 2018

This should be automated in the script

@vladandrei
Copy link

I'm running into the same problem, went through all the suggestions and am still getting the same error. Any clue on how to fix this? Thanks

@pacificcode
Copy link
Contributor

@vladandrei run the following and paste the full output here:

echo $PATH
llvm-config --has-rtti --version
ls -lah /usr/local/Cellar/

@vladandrei
Copy link

@pacificcode llvm-config --has-rtti was not found, so ran it without that option.

Vlads-MacBook-Pro:eos vlad$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vlad/anaconda/bin/
Vlads-MacBook-Pro:eos vlad$ llvm-config --version
3.3
Vlads-MacBook-Pro:eos vlad$ ls -lah /usr/local/Cellar/
total 0
drwxrwxr-x 37 vlad admin 1.2K Jun 28 08:59 .
drwxr-xr-x 16 root wheel 512B Jun 28 08:33 ..
drwxr-xr-x 3 vlad admin 96B Jun 28 06:55 autoconf
drwxr-xr-x 3 vlad admin 96B Jun 28 06:55 automake
drwxr-xr-x 3 vlad admin 96B Jun 28 07:11 boost
drwxr-xr-x 3 vlad admin 96B Jun 28 06:57 cmake
drwxr-xr-x 3 vlad admin 96B Jun 28 07:06 doxygen
drwxr-xr-x 3 vlad admin 96B Aug 1 2017 ethereum
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 fontconfig
drwxr-xr-x 3 vlad admin 96B Jun 28 07:06 freetype
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 gd
drwxr-xr-x 4 vlad admin 128B Jun 28 06:57 gdbm
drwxr-xr-x 3 vlad admin 96B Jun 28 06:57 gettext
drwxr-xr-x 3 vlad admin 96B Jun 28 06:57 gmp
drwxr-xr-x 3 vlad admin 96B Aug 1 2017 go
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 graphviz
drwxr-xr-x 3 vlad admin 96B May 29 2017 icu4c
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 jpeg
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 lcov
drwxr-xr-x 3 vlad admin 96B Jun 28 06:55 libffi
drwxr-xr-x 3 vlad admin 96B Jun 28 07:06 libpng
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 libtiff
drwxr-xr-x 3 vlad admin 96B Jun 28 06:55 libtool
drwxr-xr-x 3 vlad admin 96B Jun 28 08:59 llvm@4
drwxr-xr-x 3 vlad admin 96B Jun 28 07:06 mongodb
drwxr-xr-x 3 vlad admin 96B May 29 2017 node
drwxr-xr-x 4 vlad admin 128B Jun 28 06:57 openssl
drwxr-xr-x 4 vlad admin 128B Jun 28 06:57 pkg-config
drwxr-xr-x 4 vlad admin 128B Jun 28 07:10 python
drwxr-xr-x 3 vlad admin 96B Jun 28 06:58 python@2
drwxr-xr-x 4 vlad admin 128B Jun 28 06:57 readline
drwxr-xr-x 3 vlad admin 96B Jun 28 06:51 sha2
drwxr-xr-x 3 vlad admin 96B Jun 28 06:57 sphinx-doc
drwxr-xr-x 4 vlad admin 128B Jun 28 06:57 sqlite
drwxr-xr-x 3 vlad admin 96B Jun 28 07:07 webp
drwxr-xr-x 3 vlad admin 96B Oct 24 2016 wget
drwxr-xr-x 3 vlad admin 96B Jun 28 07:10 xz
Vlads-MacBook-Pro:eos vlad$
Vlads-MacBook-Pro:eos vlad$ llvm-config --has-rtti
usage: llvm-config ... [...]

@pacificcode
Copy link
Contributor

@vladandrei you have llvm@4 installed in your home-brew directory but its not showing up when you called llvm-config --version i.e.
Vlads-MacBook-Pro:eos vlad$ llvm-config --version
3.3

That would mean brew did not successfully sym link llvm@4 into your /usr/local/bin directory.
I would remove the llvm install and run the build script again and that should get you in business.

brew remove --force llvm
brew install llvm@4
brew link --force llvm@4

@channprj
Copy link

channprj commented Jul 2, 2018

@DmsChrisPena Try this

@brianjohnson5972
Copy link
Contributor

This issue has gone silent for several months. Closing

@kyprimo
Copy link

kyprimo commented Nov 29, 2018

still hitting that issue.

@kyprimo
Copy link

kyprimo commented Nov 29, 2018

using latest version of eosio build.

`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.`

@jgiszczak
Copy link
Contributor

@kyprimo Try:

export LLVM_DIR=/usr/local/Cellar/llvm@4
./eosio_build.sh

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

8 participants