5.5. 종속성 설치하기

This page contains references and guides about installation of various tools you may need during build of different targets of Iroha project.

주석

Please note that most likely you do not need to install all the listed tools. Some of them are required only for building specific versions of Iroha Client Library.

5.5.1. Automake

5.5.1.1. 우분투에서 설치하기

sudo apt install automake
automake --version
# automake (GNU automake) 1.15

5.5.2. Bison

5.5.2.1. 우분투에서 설치하기

sudo apt install bison
bison --version
# bison (GNU Bison) 3.0.4

5.5.3. CMake

Minimum required version is 3.11.4, but we recommend to install the latest available version (3.12.0 at the moment).

5.5.3.1. 우분투에서 설치하기

우분투 저장소의 CMake는 버전이 맞지 않기 때문에 직접 설치릉 해야 합니다. 아래에 Cmake를 소스에서 빌드하고 설치할 수 있는 방법이 있습니다.

wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
tar -xvzf cmake-3.11.4.tar.gz
cd cmake-3.11.4/
./configure
make
sudo make install
cmake --version
# cmake version 3.11.4

5.5.3.2. macOS에서 설치하기

brew install cmake
cmake --version
# cmake version 3.12.1

5.5.4. 깃

5.5.4.1. 우분투에서 설치하기

sudo apt install git
git --version
# git version 2.7.4

5.5.5. 파이썬

5.5.5.1. 우분투에서 설치하기

파이썬2

sudo apt install python-dev
python --version
# Python 2.7.12

파이썬3

sudo apt install python3-dev
python3 --version
# Python 3.5.2

5.5.5.2. macOS에서 설치하기

파이썬2

brew install python
python --version
# Python 2.7.12

파이썬3

brew install python3
python3 --version
# Python 3.5.2

5.5.6. PIP

5.5.6.1. 우분투에서 설치하기

파이썬2

sudo apt install python-pip
pip --version
# pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

파이썬3

sudo apt install python3-pip
pip3 --version
# pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)

5.5.6.2. macOS에서 설치하기

파이썬2

sudo easy_install pip
pip --version
# pip 9.0.3 from /usr/local/lib/python2.7/site-packages (python 2.7)

파이썬3

wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
python3 -m pip --version
# pip 9.0.3 from /usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (python 3.6)

5.5.7. 부스트

5.5.7.1. 우분투에서 설치하기

git clone https://github.com/boostorg/boost /tmp/boost;
(cd /tmp/boost ; git submodule update --init --recursive);
(cd /tmp/boost ; /tmp/boost/bootstrap.sh);
(cd /tmp/boost ; /tmp/boost/b2 headers);
(cd /tmp/boost ; /tmp/boost/b2 cxxflags="-std=c++14" install);
ldconfig;
rm -rf /tmp/boost

5.5.7.2. macOS에서 설치하기

brew install boost

5.5.8. Protobuf

5.5.8.1. macOS에서 설치하기

CMAKE_BUILD_TYPE="Release"
git clone https://github.com/google/protobuf /tmp/protobuf;
(cd /tmp/protobuf ; git checkout 106ffc04be1abf3ff3399f54ccf149815b287dd9);
cmake \
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
    -Dprotobuf_BUILD_TESTS=OFF \
    -Dprotobuf_BUILD_SHARED_LIBS=ON \
    -H/tmp/protobuf/cmake \
    -B/tmp/protobuf/.build;
cmake --build /tmp/protobuf/.build --target install;
ldconfig;
rm -rf /tmp/protobuf