dari88's diary

これから趣味にするプログラミング/PHP/javascript/kohana/CMS/web design/

CPU Mining用のVert-Minerの64bit版をコンパイルする方法

 Scrypt-Progressive-N algorithmを使用している仮想通貨(crypto coin)をマイニングするためにVert-Minerなるものが必要です。win32bit版のCPU minerはこちらから入手できます。高速化を狙って64bit版をコンパイルします。結論として、倍速になりました。

 

MinGW-w64/MSYSを構築する

・msysは下記からゲットします。

  http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/

MinGW-w64は下記を使用します。

  http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-posix/seh/x86_64-4.8.2-release-posix-seh-rt_v3-rev3.7z/download

・構築については最近の日記に書いているので省略します。

 

最初にcURLコンパイルする

cURLのサイトからソースをゲットします。今回はcurl-7.35.0.zipを使用しました。

・ソースをホームの下に配置してコンパイルします。

cd curl-7.35.0
configure --host=x86_64-w64-mingw32 --disable-shared --with-winssl --enable-ipv6 --prefix=/home/curl64
make
make install

 

Vert-Minerをコンパイルする

ここからソースをゲットして、ホームの下に配置します。

・/home/curl64/share/aclocal/libcurl.m4 を /usr/share/aclocal にコピーします。

・/home/curl64/bin/curl-config を ~/cpuminer-vert-master にコピーします。

コンパイルします。

cd cpuminer-vert-master
sh autogen.sh
CFLAGS="-DPTW32_STATIC_LIB -static" configure --host=x86_64-w64-mingw32
make

・~/cpuminer-vert-maste/minerd.exe が完成品です。