티스토리 뷰

반응형

원본 사이트 : https://hyperledger-indy.readthedocs.io/projects/sdk/en/latest/docs/build-guides/index.html

다음은 특정 플랫폼을 위한 Indy SDK를 구축하는 방법에 대한 다양한 지침입니다.

  • Ubuntu
  • Mac
  • Windows
  • RHEL
  • Building binaries of LibIndy for Android
  • Building binaries of Libnullpay for Android

 

Ubuntu

Setup Indy SDK build environment for Ubuntu based distro (Ubuntu 16.04)

원본 사이트 : https://hyperledger-indy.readthedocs.io/projects/sdk/en/latest/docs/build-guides/ubuntu-build.html

1. Rust 및 rustup을 설치하십시오(https://www.rust-lang.org/install.html).

2. 필요한 기본 라이브러리 및 유틸리티를 설치하십시오.

apt-get update && \
apt-get install -y \
   build-essential \
   pkg-config \
   cmake \
   libssl-dev \
   libsqlite3-dev \
   libzmq3-dev \
   libncursesw5-dev

3. libindy에는 최신 1.0.14 버전의 libsodium이 필요하지만 Ubuntu 16.04의 apt 저장소에서는 설치를 지원하지 않습니다. 이 때문에 소스에서 libsodium을 빌드하고 설치해야합니다.

cd /tmp && \
  curl https://download.libsodium.org/libsodium/releases/old/libsodium-1.0.14.tar.gz | tar -xz && \
   cd /tmp/libsodium-1.0.14 && \
   ./configure --disable-shared && \
   make && \
   make install && \
   rm -rf /tmp/libsodium-1.0.14

1) libindy를 빌드합니다.

git clone https://github.com/hyperledger/indy-sdk.git
cd ./indy-sdk/libindy
cargo build
cd ..

참고: apt 저장소에서 설치된 libindy debian 패키지는 libsodium과 정적으로 연결되어 있습니다. 수동으로 빌드할 경우 --features sodium_static을 cargo build 명령에 전달하면 됩니다.

1. 통합 테스트 실행: Docker를 사용하여 로컬 노드 풀 시작

 If you use this method then you have to specify the TEST_POOL_IP as specified below  when running the tests.

 It can be useful if we want to launch integration tests inside another container attached to
 the same docker network.
  • 테스트 실행
cd libindy
RUST_TEST_THREADS=1 cargo test
  • TEST_POOL_IP 환경 변수를 제공하여 테스트 풀의 IP를 변경할 수 있습니다.
RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test

1. indy-cli 빌드(선택 사항)

indy-cli는 libindy에 의존하며 이를 빌드해야합니다.

cd cli/
RUSTFLAGS=" -L ../libindy/target/debug" cargo build

 

위의 libindy 빌드 지침을 따른 경우 기본 빌드 유형은 debug입니다.

libindy를 path에 추가하십시오. /path/to를 libindy 디렉토리의 실제 경로로 바꾸십시오. bash 사용:

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/libindy/target/{BUILD TYPE}" >> ~/.bashrc
sudo ldconfig
source ~/.bashrc

indy-cli를 실행하려면 cli/target/debug로 이동하여 ./indy-cli를 실행하십시오.

Docker에서 Ubuntu 기반 환경의 작성 예는 libindy/ci/ubuntu.dockerfile을 참조하십시오.

 

Mac

원본 사이트 : https://hyperledger-indy.readthedocs.io/projects/sdk/en/latest/docs/build-guides/mac-build.html

자동화된 빌드: 저장소를 복제하고 libindy 폴더에서 mac.build.sh를 실행하십시오.

 

Manual steps(수동 단계)

1. Rust 및 rustup을 설치하십시오(https://www.rust-lang.org/install.html).

2. 필요한 기본 라이브러리 및 유틸리티 설치 (libsodium은 버전<1.0.15가 필요하므로 homebrew에 URL과 함께 추가됨)

brew install pkg-config
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/65effd2b617bade68a8a2c5b39e1c3089cc0e945/Formula/libsodium.rb   
brew install automake 
brew install autoconf
brew install cmake
brew install openssl
brew install zeromq
brew install zmq

3. 환경 변수 설정:

export PKG_CONFIG_ALLOW_CROSS=1
export CARGO_INCREMENTAL=1
export RUST_LOG=indy=trace
export RUST_TEST_THREADS=1

 

4. OPENSSL_DIR 변수 설정: 설치된 openssl 라이브러리의 path

for version in `ls -t /usr/local/Cellar/openssl/`; do
     export OPENSSL_DIR=/usr/local/Cellar/openssl/$version
     break
done

 

5. 라이브러리 체크아웃 및 빌드:

git clone https://github.com/hyperledger/indy-sdk.git
cd ./indy-sdk/libindy
cargo build

6. CLI, libnullpay 또는 libindy에 의존하는 기타 항목을 컴파일하려면 다음을 수행하십시오.

export LIBRARY_PATH=/path/to/sdk/libindy/target/<config>
cd ../cli
cargo build

 

7. DYLD_LIBRARY_PATH 및 LD_LIBRARY_PATH 환경 변수를 indy-sdk/libindy/target/debug 경로로 설정하십시오. 이를 유지하기 위해 .bash_profile에 넣을 수 있습니다.

 

Note on running local nodes(로컬 노드 실행에 대한 참고 사항)

MacOS에서 로컬 노드를 실행하려면 Docker 컨테이너와 로컬 호스트간에 포트 매핑을 설정해야 할 수 있습니다. Indy SDK README의 지침을 따르십시오.

 

IOError while running of whole set of tests on MacOS(MacOS에서 전체 테스트를 실행하는 동안 IOError)

전체 테스트 세트(carge test)를 실행하면 일부 테스트가 실패할 수 있습니다. 그러나 개별실행의 경우 실패한 테스트가 성공합니다. IOError Too many open files와 같은 오류 메시지가 로그에 나타나면 기본 제한을 변경하여 문제를 해결할 수 있습니다.

ulimit -n <new limit value>

https://jira.hyperledger.org/browse/IS-1038

 

Windows

(생략)

 

RHEL

(생략)

 

Building binaries of LibIndy for Android

(생략)

 

Building binaries of Libnullpay for Android

(생략)

반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함