불과 며칠 전에 1.1.3 버전이 Release 되었다. 1.1.2 부터 PV62(Protocol Version 62) 와 PV63 을 지원 중이며, 1.1.2 대비 eth Console 과 AlethOne 크래쉬 버그픽스가 있었다. 이 1.1.3 Release Branch 로 빌드 해보기로 한다.
Mac OS X 에서는 그나마 빌드 및 실행이 잘되는 편인데, Windows 빌드는 예전 버전들 부터 잘 되지 않는 편이다. 빌드는 되더라도 기능에 버그가 있거나 하는 경우가 많다.
▌준비할 것
빌드하기 전에 우선 아래 준비사항이 모두 준비되었는지 확인하자.
- Windows 7 또는 8 64비트 (32 비트 버전과 Windows 10 은 지원하지 않음)
- Git for Windows 1.9.0 이상
- 7-Zip
- CMake 3.0 이상
- Windows 7 또는 8 SDK
- Visual Studio 2013 Community Edition (Update 5 를 별도로 받아 Build 넘버 12.0.40629.00 이 되도록 한다)
Visual Studio 2015 는 아직 지원 안함
▌환경 설치
▪ Git 설치
Git 사이트 에서 Git for Windows 다운로드 받고, Git Bash Shell 을 설치하도록 한다.
설치하면 Git Bash 로 실행 되는지 정도는 확인하자.
▪ 7zip 설치
7zip 사이트 에서 최신 exe 버전을 다운로드 한다.
다운로드 받은 exe 파일을 실행하여 원하는 Directory 에 설치한다
그리고 반드시 설치한 디렉토리를 PATH 에 추가해 주어야 한다
위처럼 System 의 PATH 환경변수에 7zip 설치된 경로를 추가 해 주었다.
▪ CMake 설치
CMake 사이트 에서 Latest Release 에서 Installer 버전을 다운로드 받아서 설치한다.
PATH 에 CMake 를 자동 추가하도록 설치 시 옵션을 선택한다.
▪ Windows SDK 설치
▪ Visual Studio 2013 Community
Visual Studio 2013 Community 사이트 에서 Installer 를 다운로드 받고 설치한다. 시간이 꽤 걸린다.
위 처럼 Update 5 를 설치하고 있는지 확인한다.
이제 소스를 Checkout 하고 빌드를 해보도록 하자
▌소스 Clone
Git Bash 를 통해 MinGW 의 Bash Shell 로 들어간다.
우선 디렉토리를 아래와 같이 만들었고, project 밑으로 프로젝트를 clone 할 예정이다.
[goodjoon project]$ pwd
/d/ethereum/project
[goodjoon project]$
/d/ethereum/project
[goodjoon project]$
git 으로 Repository 를 Clone 한다. Submodule 들이 다수 걸려있으므로, submodule 들도 --recursive 옵션으로 모두 가져온다.
[goodjoon project]$
brella.gitproject]$ git clone --recursive https://github.com/ethereum/webthree-umbrella
Cloning into 'webthree-umbrella'...
remote: Counting objects: 71041, done.
remote: Compressing objects: 100% (2/2), done.
brella.gitproject]$ git clone --recursive https://github.com/ethereum/webthree-umbrella
Cloning into 'webthree-umbrella'...
remote: Counting objects: 71041, done.
remote: Compressing objects: 100% (2/2), done.
Receiving objects: 56% (40071/71041), 16.92 MiB | 2.96 MiB/s
webthree-umbrella 가 clone 되었고,
[goodjoon project]$ ls -al
total 8
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:16 ./
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:04 ../
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:16 webthree-umbrella/
[goodjoon project]$
total 8
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:16 ./
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:04 ../
drwxr-xr-x 1 korean44 없음 0 Feb 14 23:16 webthree-umbrella/
[goodjoon project]$
webthree-umbrella 해서 git status 를 해보면
[goodjoon webthree-umbrella]$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
[goodjoon webthree-umbrella]$
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
[goodjoon webthree-umbrella]$
확인해보면, 위 처럼 develop Branch 에 HEAD 가 있음을 알 수 있다. 그래서, Release 브랜치로 다시 checkout 을 해야한다.
[goodjoon webthree-umbrella]$ git checkout release M webthree-helpers Branch release set up to track remote branch release from origin. Switched to a new branch 'release' [goodjoon webthree-umbrella]$ git status On branch release Your branch is up-to-date with 'origin/release'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: webthree-helpers (new commits) no changes added to commit (use "git add" and/or "git commit -a") [goodjoon webthree-umbrella]$
release Branch 로 checkout 을 하고 status 를 보면, submodule 이 실제로 update 가 안되었기 때문에 modified 된것처럼 나온다.
Submodule 들도 Update 해주자
[goodjoon webthree-umbrella]$ git submodule update --recursive
Submodule path 'webthree-helpers': checked out '4932539374f9b9ea1030b4514c5292620d55f3c0'
[goodjoon webthree-umbrella]$ git status
On branch release
Your branch is up-to-date with 'origin/release'.
nothing to commit, working directory clean
[goodjoon webthree-umbrella]$
Submodule path 'webthree-helpers': checked out '4932539374f9b9ea1030b4514c5292620d55f3c0'
[goodjoon webthree-umbrella]$ git status
On branch release
Your branch is up-to-date with 'origin/release'.
nothing to commit, working directory clean
[goodjoon webthree-umbrella]$
불과 사흘전에 Release 를 해서 그런지 Submodule 들이 대부분 최신 Branch 여서 webthree-helpers 브랜치만 Update 되었다.
▌Dependency 다운로드
Windows 에서 빌드를 하기 위해서는 llvm 및 Qt 을 비롯해 아래와 같은 라이브러리들이 필요하다
boost 1.55.0
cryptopp 5.6.2
curl 7.4.2
jsoncpp 1.6.2
json-rpc-cpp 0.5.0
leveldb 1.2
llvm 3.7.0
microhttpd 0.9.2
OpenCL_ICD 1
qt 5.4.1
miniupnpc 1.9
v8 3.15.9
cryptopp 5.6.2
curl 7.4.2
jsoncpp 1.6.2
json-rpc-cpp 0.5.0
leveldb 1.2
llvm 3.7.0
microhttpd 0.9.2
OpenCL_ICD 1
qt 5.4.1
miniupnpc 1.9
v8 3.15.9
apt 나 brew, port 가 없는 Windows 에서 일일이 라이브러리를 다운로드 받아 설치하기란 매우 번거로운 일이기때문에 C++DEV 팀에서 간단한 배치를 하나 제공한다.
/d/ethereum/project/webthree-umbrella/webthree-helpers/extdep
위 경로로 가보면 getstuff.bat 파일이 있는데, 이 파일을 실행시키면 모든 dependency 라이브러리들을 다운로드 받는다
[goodjoon extdep]$ ./getstuff.bat
한참동안을 뭔가 잘못된 것 처럼 가만히 있는다. 라이브러리를 하나씩 다운로드 받고 압축 풀고를 반복한다. 4.4GB 를 다운받고 압축 푸느라 수십분 정도 작업이 길어질 수 있으므로 TV나 좀 보다오자.
인터넷 연결만 잘 되어있다면 안될 이유는 없을것이다.
오늘은 너무 졸려서 이만..^^;;
다음은 본격적인 소스 빌드와 오류 해결로 넘어가보겠다.
반응형
'Blockchain > Ethereum' 카테고리의 다른 글
C+++ Ethereum, Private Network 구성하기 #3 - eth 실행하기 (2) | 2016.03.06 |
---|---|
C+++ Ethereum, Private Network 구성하기 #2 - Genesis 정보 만들기 (0) | 2016.03.02 |
C+++ Ethereum, Private Network 구성하기 #1 (1) | 2016.02.26 |
C++ Ethereum - Windows 소스 빌드 / 빌드 및 오류해결 (0) | 2016.02.21 |
Ethereum Repository 설명 (1) | 2016.02.13 |