EOSIO / eosio.contracts

Smart contracts that provide some of the basic functions of the EOSIO blockchain
https://eosio.github.io/eosio.contracts/latest
MIT License
326 stars 415 forks source link

Build error: CMake cannot find eosio configs. #163

Closed gaboesquivel closed 5 years ago

gaboesquivel commented 5 years ago

I'm getting this error both on MacOS Sierra 10.13.6 ( my host machine ) and on ubuntu 18 on a docker container when trying to compile eosio.contracts v1.5.1

-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:7 (find_package):
  By not providing "Findeosio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "eosio", but
  CMake did not find one.

  Could not find a package configuration file provided by "eosio" with any of
  the following names:

    eosioConfig.cmake
    eosio-config.cmake

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

CMake Error at CMakeLists.txt:11 (EOSIO_CHECK_VERSION):
  Unknown CMake command "EOSIO_CHECK_VERSION".

-- Configuring incomplete, errors occurred!

Mac OS Environment

➜ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G4015
➜ nodeos --version
v1.5.1
➜ eosio-cpp --version
eosio-cpp version 1.4.1

Docker Ubuntu Environment

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
# nodeos --version
v1.5.0
# eosio-cpp --version
eosio-cpp version 1.4.1

To replicate the Ubuntu issue simply clone https://github.com/eoscostarica/eos-local/tree/EOS-1.5, run make setup and type Y to init the chain.

gaboesquivel commented 5 years ago

setting env variables doesn't help

gaboesquivel commented 5 years ago

it seems the eosio.contracts v1.5 definitively won't compile thru the ./build.sh script if you install the precompiled eosio and eosio.cdt binaries.

I just uninstalled everything on my MacBook reinstalled eosio and eosio.cdt thru homebrew... and I'm still getting the same error.

Actually the instructions on github are for compilation from source.

That means that if you follow instructions in https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence you will never be able to complete them.

gaboesquivel commented 5 years ago

got everything setup with the latest tools versions. turns out we were just confused about how to read system contract data from another contract, there's no need to compile eosio.contracts for contract development. we're good now

f0rm2l1n commented 5 years ago

Dudes, after reading this issue, I try building all those files from the source. But I'm facing the same problem as you did, can you share some suggestions?