Advertisement
Guest User

Untitled

a guest
Feb 18th, 2014
2,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. Detailed Windows build instructions, using MinGW (64-bit):
  2. Install MinGW and the MSYS Developer Tool Kit (http://www.mingw.org/)
  3. * Choose C, C++ and MSys on install and select to have it update its libraries
  4. * Install into C:\MinGW
  5. * Add C:\MinGW\bin and c:\MinGW\msys\1.0 to your path
  6. Download MinGW64 from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
  7. * Choose mingw-w64-bin_i686-mingw_20111220.zip
  8. * Extract ZIP to C:\MinGW64
  9. * Add C:\MinGW64\bin to your path before C:\MinGW\bin
  10. Install libcurl devel (http://curl.haxx.se/download.html)
  11. * download curl-7.30.0.tar.gz from http://curl.haxx.se/download.html and put it in C:\deps\
  12. * launch an MSYS shell and enter the following commands (the configure step will take a long time!)
  13. cd /c/deps
  14. tar -xvzf curl-7.30.0.tar.gz
  15. cd curl-7.30.0
  16. ./configure --host=x86_64-w64-mingw32 –-prefix=/c/mingw64
  17. make
  18. make install
  19. cp /c/deps/curl-7.30.0/docs/libcurl/libcurl.m4 /c/mingw/share/aclocal/libcurl.m4
  20. Install pthreads
  21. * download pthreads-20100604.zip from http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/pthreads/ and put it in C:\deps\
  22. * unzip the file to c:\deps\
  23. * In the mingw64 subdirectory is pthreads-w64.zip - extract the contents to C:\MinGW64
  24. Configure mingw path
  25. * create C:\MinGW\msys\1.0\etc\fstab with following configuration:
  26. c:/mingw /mingw
  27. In the MSYS shell, navigate to the CPUminer source code direcctory
  28. * You will likely get higher hashrates by forcing the compiler to build the executable for your
  29. specific CPU architecture. This is done by adding "-march=<value>" into the CFLAGS. Those
  30. values can be found at http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options
  31. common choices for intel are : core2, corei7, corei7-avx
  32. common choices for AMD are : athlon-fx
  33. or -msse2,-msse3,-msse4,-mavx ...
  34. * Execute the following (replacing the value of -march with the value for your CPU type)
  35. ./autogen.sh
  36. ./configure --host=x86_64-w64-mingw32 CFLAGS="-O3 -march=core2"
  37. make
  38. Strip minerd.exe
  39. * Execute the following:
  40. x86_64-w64-mingw32-strip minerd.exe
  41. Combine the executable with the dependencies
  42. * copy minerd.exe, C:\MinGW64\bin\libcurl-4.dll, and C:\MinGW64\bin\pthreadGC2-w64.dll to the same directory
  43.  
  44. For Win32 target hosts
  45. Prepare compilations
  46. * place mstcpip.h and _mingw_unicode.h in MinGW\include (they already exist in the MinGW installation tree)
  47. Configure Curl compiling with:
  48. * ./configure --host=i686-pc-mingw32 CPPFLAGS="-DWIN32 -DWIN32_LEAN_AND_MEAN" –-prefix=/c/mingw
  49. Clean previous compilations and execute same steps as Win64 targets
  50. * make clean
  51. make
  52. make install
  53. if not already done, as the file never changes: cp /c/deps/curl-7.30.0/docs/libcurl/libcurl.m4 /c/mingw/share/aclocal/libcurl.m4
  54. Add pthreads win32 package:
  55. * through the MinGW Installation manager
  56. Configure CPUMiner compiling with:
  57. * ./autogen.sh
  58. ./configure --host=i686-pc-mingw32 CPPFLAGS="-DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN" CFLAGS="-O2 -march=core2"
  59. (Note: only O2 optimization to avoid crash. core2 architecture ideal for Xeon processor)
  60. Clean previous compilations and Compile CPUMiner
  61. * make clean
  62. make
  63. Strip minerd.exe
  64. * mingw32-strip minerd.exe
  65. Combine the executable with the dependencies
  66. * copy minerd.exe, C:\MinGW\bin\libcurl-4.dll, C:\MinGW\bin\pthreadGC2.dll and C:\MinGW\bin\libgcc_s_dw2-1.dll to the same directory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement