Contents
- [컴] windows 에서bitcoin build - VM 이용
- [컴] windows 에서bitcoin build - MinGW
windows 7 에서 mingw 를 이용하여 설치
MinGW 설치
일단 내 경우에는 MinGW 가 설치되어있던 것을 지우고, 새롭게 설치했다.
- d:\MinGW32
- 아래 package 만 설치한다.
- msys-base-bin
- msys-autoconf-bin
- msys-automake-bin
- msys-libtool-bin
- Installation -> Apply
MinGW-w64
- Download MinGW-w64 - for 32 and 64 bit Windows from SourceForge.net
- d:\MinGW32 에 copy
- 시스템 PATH 에 d:\MinGW32\bin 추가
openssl
- download openssl-1.0.1l.tar.gz
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- tar xvfz openssl-1.0.1l.tar.gz (꼭 mingw shell 에서 tar 로 압축을 풀어야 symlink issue 를 피해갈 수 있다.)
- cd /d/coindeps/openssl-1.0.1l
- ./Configure no-zlib no-shared no-dso no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2 no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3 mingw
- make depend
- d:\coindeps\openssl-1.0.1l\apps\openssl.exe
berkeley-db-4.8
- download berkeley-db/db-4.8.30.NC.tar.gz
- d:\coindeps\db-4.8.30.NC\ 에 풀어놓는다.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/coindeps/db-4.8.30.NC/build_unix
- ../dist/configure --enable-mingw --enable-cxx --disable-shared --disable-replication
- make
boost
- download boost/1.57.0/
- d:\coindeps\boost_1_57_0> bootstrap.bat mingw
- d:\coindeps\boost_1_57_0> b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc variant=release link=static threading=multi runtime-link=static stage
minupnpc
download miniupnpc-1.9.20150206.tar.gz
d:\coindeps\minupnpc 에 풀어놓는다.
d:\coindeps\miniupnpc>mingw32-make -f Makefile.mingw init upnpc-static
protobuf
- download v2.6.1/protobuf-2.6.1.tar.gz
- d:\coindeps\protobuf-2.6.1\ 에 풀어놓는다.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/coindeps/protobuf-2.6.1
- configure --disable-shared
- make
libevent
d:\coindeps\libevent-2.0.22-stable\ 에 풀어놓는다.
MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
configure
make
qrencode
libpng
- download libpng-1.6.16.tar.gz
- d:\coindeps\libpng-1.6.16\ 에 풀어놓는다.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/coindeps/libpng-1.6.16
- configure --disable-shared
- make
- cp .libs/libpng16.a .libs/libpng.a
qrencode
- download qrencode-3.4.4.tar.gz
- d:\coindeps\qrencode-3.4.4\ 에 풀어놓는다.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/coindeps/qrencode-3.4.4
- LIBS="../libpng-1.6.16/.libs/libpng.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.16" \
png_LIBS="-L../libpng-1.6.16/.libs" \
configure --enable-static --disable-shared --without-tools - make
Qt5
qtbase
- download qtbase-opensource-src-5.3.2.7z
- d:\coindeps\qt\qtbase-5.3.2\ 에 풀어놓자.
- configure.bat 실행(아래 code 참조)
- mingw32-make
set INCLUDE=d:\coindeps\libpng-1.6.16;d:\coindeps\openssl-1.0.1l\include set LIB=d:\coindeps\libpng-1.6.16\.libs;d:\coindeps\openssl-1.0.1l cd d:\coindeps\qt\qtbase-5.3.2 configure.bat -release -opensource -confirm-license -static -make libs -no-sql-sqlite -no-opengl -system-zlib -qt-pcre -no-icu -no-gif -system-libpng -no-libjpeg -no-freetype -no-angle -no-vcproj -openssl -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug
qttools
- download qttools-opensource-src-5.3.2.7z
- d:\coindeps\qt\qttools-opensource-src-5.3.2\ 에 풀어놓자.
- qmake qttolls.pro
- mingw32-make 실행(아래 참조)
set PATH=%PATH%;d:\qt\5.3.2\bin cd d:\qt\qttools-opensource-src-5.3.2\ qmake qttools.pro mingw32-make
gmp
- download gmp-6.1.0.tar.bz2
- d:\coindeps\gmp-6.1.0\ 에 풀어놓자.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/coindep/gmp-6.1.0
- ./configure --disable-shared
Build Bitcoin
- download bitcoin releases
- d:\mine\programming\cplusplus\bitcoin\bitcoin-0.12.0 에 풀어놓는다.
- MinGW shell 실행(d:\MinGW32\msys\1.0\msys.bat)
- cd /d/mine/programming/cplusplus/bitcoin/bitcoin-0.12.0
- ./autogen.sh
- ./configure (아래 코드 참고)
- make
./configure BOOST_ROOT=/d/coindeps/boost_1_57_0 \ CPPFLAGS="-I/d/coindeps/libevent-2.0.22-stable/include \ -I/d/coindeps/db-4.8.30.NC/build_unix \ -I/d/coindeps/openssl-1.0.1l/include \ -I/d/coindeps \ -I/d/coindeps/protobuf-2.6.1/src \ -I/d/coindeps/libpng-1.6.16 \ -I/d/coindeps/qrencode-3.4.4 \ -I/usr/local/BerkeleyDB.4.8/inlcude \ -I/d/coindeps/gmp-6.1.0" \ LDFLAGS="-L/d/coindeps/libevent-2.0.22-stable/.libs \ -L/d/coindeps/db-4.8.30.NC/build_unix \ -L/d/coindeps/openssl-1.0.1l \ -L/d/coindeps/miniupnpc \ -L/d/coindeps/protobuf-2.6.1/src/.libs \ -L/d/coindeps/libpng-1.6.16/.libs \ -L/d/coindeps/qrencode-3.4.4/.libs \ -L/usr/local/BerkeleyDB.4.8/lib \ -L/d/coindeps/gmp-6.1.0/.libs" \ --disable-upnp-default --disable-tests --with-qt-incdir=/d/coindeps/qt/qtbase-5.3.2/include --with-qt-libdir=/d/coindeps/qt/qtbase-5.3.2/lib --with-qt-plugindir=/d/coindeps/qt/qtbase-5.3.2/plugins --with-qt-bindir=/d/coindeps/qt/qtbase-5.3.2/bin --with-protoc-bindir=/d/coindeps/protobuf-2.6.1/src
build 결과
0.9.4 버전 / 0.10.4 버전 에서는 잘 compile 된다.- https://github.com/bitcoin/bitcoin/archive/v0.9.4.zip
- https://github.com/bitcoin/bitcoin/archive/v0.10.4.zip
0.12.0 버전에서는
아래 같은 error 가 발생했다.
... d:\mine\programming\cplusplus\bitcoin\bitcoin-0.12.0\src/wallet/crypter.cpp:96: undefined reference to `EVP_CIPHER_CTX_cleanup' collect2.exe: error: ld returned 1 exit status make[2]: *** [bitcoind.exe] Error 1 make[2]: Leaving directory `/d/mine/programming/cplusplus/bitcoin/bitcoin-0.12.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/d/mine/programming/cplusplus/bitcoin/bitcoin-0.12.0/src' make: *** [all-recursive] Error 1
댓글 없음:
댓글 쓰기