Shaokang's Blog

Common error and solution during compiling EOSIO components:

Doesn’t have boost or boost library is lower than required.

Solution: It seems the latest version of boost is not in the ubuntu package management right now. I compiled and installed it from source to solve this issue. I installed version 1.67. But the minimum version it requires is 1.57 (I remember).

1
2
3
wget -O boost_1_67_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download
tar xzvf boost_1_67_0.tar.gz
cd boost_1_67_0/

Then, get the required libraries and setup. The one required at here is icu for boost::regex. But I installed all of them in case they will be needed in some other places.

1
2
sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev
./bootstrap.sh --prefix=/usr/

Then, build it and install it:

1
2
./b2 # Build it
sudo ./b2 install # install it

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.

Solution: Error happens while compiling EOSIO.contracts.

  1. Be sure EOS is compiled and installed from source instead of ubuntu package.

  2. If the EOS is compiled and installed from source. You could find the place for this Cmake file easily.

    1
    2
    3
    cd EOS_BUILD_PATH # EOS_BUILD_PATH is the directory EOS was cloned to.
    find . -name "eosio-config.cmake"
    export eosio_DIR="PATH_FOUND" # PATH_FOUND is the path found up by the previous command

    The path is usually at EOS_BUILD_PATH/build/lib/cmake/eosio/. And it is good to use absolute directory.

    And then, do ./build.sh again.

Doesn’t have llvm or doesn’t have required version of llvm while building eosio.cdt.

Solution: llvm package is from another repository. So, add --recursive while git clone.

Did install EOS by using the default installing shell but can not start the program by simply run nodeos from terminal.

Solution: I find this happens on ubuntu 18.04. Use the absolute path to start server instead. Usually, the nodeos program is at EOSIO_BUILD_PATH/build/bin/nodeos.

 Comments