Skip to content

KryptoNova/cpuminer-opt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is forked by Jay D Dee.

Updated for v3.3.2 Windows support.

Building on linux prerequisites:

It is assumed users know how to install packages on their system and be able to compile standard source packages. This is basic Linux and beyond the scope of cpuminer-opt.

Make sure you have the basic development packages installed. Here is a good start:

http://askubuntu.com/questions/457526/how-to-install-cpuminer-in-ubuntu

Install any additional dependencies needed by cpuminer-opt. The list below are some of the ones that may not be in the default install and need to be installed manually. There may be others, read the error messages they will give a clue as to the missing package.

The folliwing command should install everything you need on Debian based packages:

sudo apt-get install build-essential libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev automake

Building on Linux, see below for Windows.

Dependencies

build-essential (for Ubuntu, Development Tools package group on Fedora) automake libjansson-dev libgmp-dev libcurl4-openssl-dev libssl-dev pthreads zlib

tar xvzf [file.tar.gz] cd [file]

Run build.sh to build on Linux or execute the following commands.

./autogen.sh CFLAGS="-O3 -march=native -Wall" CXXFLAGS="$CFLAGS -std=gnu++11" ./configure --with-curl make

Start mining.

./cpuminer -a algo ...

Building on Windows prerequisites:

msys mingw_w64 Visual C++ redistributable 2008 X64 openssl, not sure about this

Install msys and mingw_w64, only needed once.

Unpack msys into C:\msys or your preferred directory.

Install mingw__w64 from win-builds. Follow instructions, check "msys or cygwin" and "x86_64" and accept default existing msys instalation.

Open a msys shell by double clicking on msys.bat. Note that msys shell uses linux syntax for file specifications, "C:" is mounted at "/c/".

Add mingw bin directory to PATH variable PATH="/c/msys/opt/windows_64/bin/:$PATH"

Instalation complete, compile cpuminer-opt

Unpack cpuminer-opt source files using tar from msys shell, or using 7zip or similar Windows program.

In msys shell cd to miner directory. cd /c/path/to/cpuminer-opt

Run winbuild.sh to build on Windows or execute the following commands.

./autogen.sh CFLAGS="-O3 -march=native -Wall" CXXFLAGS="$CFLAGS -std=gnu++11 -fpermissive" ./configure --with-curl make

The following tips may be useful for older AMD CPUs.

Some users with AMD CPUs without AES_NI have reported problems compiling with build.sh or "-march=native". Problems have included compile errors and poor performance. These users are recommended to compile manually specifying "-march=btver1" on the configure command line.

Support for even older x86_64 without AES_NI or SSE2 is not availble. cpuminer-multi by TPruvot supports this architecture.

The rest of this file is taken from cpuminer-multi.


CPUMiner-Multi

Build Status

This is a multi-threaded CPU miner, fork of pooler's cpuminer (see AUTHORS for list of contributors).

Table of contents

Algorithms

Currently supported

  • scrypt (Litecoin, Dogecoin, Feathercoin, ...)
  • scrypt:N
  • sha256d (Bitcoin, Freicoin, Peercoin/PPCoin, Terracoin, ...)
  • axiom (Axiom Shabal-256 based MemoHash)
  • blake (Saffron [SFR] Blake-256)
  • bmw (Midnight [MDT] BMW-256)
  • cryptonight (Bytecoin [BCN], Monero)
  • cryptonight-light (Aeon)
  • dmd-gr (Diamond-Groestl)
  • fresh (FreshCoin)
  • groestl (Groestlcoin)
  • lyra2RE (Lyrabar, Cryptocoin)
  • lyra2REv2 (VertCoin [VTC])
  • myr-gr (Myriad-Groestl)
  • neoscrypt (Feathercoin)
  • nist5 (MistCoin [MIC], TalkCoin [TAC], ...)
  • pentablake (Joincoin)
  • pluck (Supcoin [SUP])
  • quark (Quarkcoin)
  • qubit (MyriadCoin [MYR])
  • skein (Skeincoin, Myriadcoin, Xedoscoin, ...)
  • skein2 (Woodcoin)
  • s3 (OneCoin)
  • x11 (Darkcoin [DRK], Hirocoin, Limecoin, ...)
  • x13 (Sherlockcoin, [ACE], [B2B], [GRC], [XHC], ...)
  • x14 (X14, Webcoin [WEB])
  • x15 (RadianceCoin [RCE])
  • zr5 (Ziftrcoin [ZRC])

Implemented, but untested

  • ? blake2s
  • ? hefty1 (Heavycoin)
  • ? keccak (Maxcoin HelixCoin, CryptoMeth, Galleon, 365coin, Slothcoin, BitcointalkCoin)
  • ? luffa (Joincoin, Doomcoin)
  • ? shavite3 (INKcoin)
  • ? sib X11 + gost (SibCoin)

Planned support for

  • scrypt-jane (YaCoin, CopperBars, Pennies, Tickets, etc..)

Dependencies

Download

Build

Basic *nix build instructions:

  • just use ./build.sh OR
  • ./autogen.sh # only needed if building from git repo
  • ./nomacro.pl # only needed if building on Mac OS X or with Clang
  • ./configure CFLAGS="-O3 -march=native" --with-crypto --with-curl
    • Use -march=native if building for a single machine

  • make

Notes for AIX users:

  • To build a 64-bit binary, export OBJECT_MODE=64
  • GNU-style long options are not supported, but are accessible via configuration file

Basic Windows build with Visual Studio 2013

  • All the required .lib files are now included in tree (windows only)
  • AVX enabled by default for x64 platform (AVX2 and XOP could also be used)

Basic Windows build instructions, using MinGW64:

  • Install MinGW64 and the MSYS Developer Tool Kit (http://www.mingw.org/)
    • Make sure you have mstcpip.h in MinGW\include
  • install pthreads-w64
  • Install libcurl devel (http://curl.haxx.se/download.html)
    • Make sure you have libcurl.m4 in MinGW\share\aclocal
    • Make sure you have curl-config in MinGW\bin
  • Install openssl devel (https://www.openssl.org/related/binaries.html)
  • In the MSYS shell, run:
    • for 64bit, you can use ./mingw64.sh else : ./autogen.sh # only needed if building from git repo
    • LIBCURL="-lcurldll" ./configure CFLAGS="-march=native"
      • Use -march=native if building for a single machine

    • make

Windows build steps:

install in order:

GNUstep Cairo, ProjectCenter, Gorm are probably not needed but install them anyways.

Intsall Win-builds 1.5.0 and choose and choose Cygwin or MYSY, and select x86_64 set path to /c/bin/GNUstep/msys/ (Or the path you have installed GNUstep). Clone github repo https://github.com/nicehash/cpuminer-opt. Open C:\bin\GNUstep\msys\1.0\msys.bat and cd to cloned repo path. Run the following commands:

  • PATH="/c/bin/GNUstep/msys/opt/windows_64/bin/:$PATH" (or the path you have installed GNUstep) to add opt/windows_64 to path.
  • run ./autogen
  • use one of the scripts mingw64.sh (build native extension for CPU), mingw64aes.sh for AES support, mingw64sse2.sh for SSE2 support, mingw64avx(+aes).sh for AVX(_AES) support and mingw64avx2(+aes).sh for AVX2(_AES) support
  • the built cpuminer.exe binary requires libraries (copy them from or set PATH to C:\bin\GNUstep\msys\opt\windows_64\bin when running):
    • libcrypto.dll
    • libcrypto-1.0.0.dll
    • libcurl-4.dll
    • libgcc_s_dw2-1.dll
    • libgcc_s_seh-1.dll
    • libgmp-10.dll
    • libgmpxx-4.dll
    • libjansson-4.dll
    • libjson-c-2.dll
    • libsasl.dll
    • libsigc-2.0-0.dll
    • libssl.dll
    • libssl-1.0.0.dll
    • libstdc++-6.dll
    • libwinpthread-1.dll
    • libz-1.dll

Architecture-specific notes:

  • ARM:
    • No runtime CPU detection. The miner can take advantage of some instructions specific to ARMv5E and later processors, but the decision whether to use them is made at compile time, based on compiler-defined macros.
    • To use NEON instructions, add "-mfpu=neon" to CFLAGS.
  • x86:
    • The miner checks for SSE2 instructions support at runtime, and uses them if they are available.
  • x86-64:
    • The miner can take advantage of AVX, AVX2 and XOP instructions, but only if both the CPU and the operating system support them.
      • Linux supports AVX starting from kernel version 2.6.30.
      • FreeBSD supports AVX starting with 9.1-RELEASE.
      • Mac OS X added AVX support in the 10.6.8 update.
      • Windows supports AVX starting from Windows 7 SP1 and Windows Server 2008 R2 SP1.
    • The configure script outputs a warning if the assembler doesn't support some instruction sets. In that case, the miner can still be built, but unavailable optimizations are left off.

Usage instructions

Run "cpuminer --help" to see options.

Connecting through a proxy

Use the --proxy option.

To use a SOCKS proxy, add a socks4:// or socks5:// prefix to the proxy host
Protocols socks4a and socks5h, allowing remote name resolving, are also available since libcurl 7.18.0.

If no protocol is specified, the proxy is assumed to be a HTTP proxy.
When the --proxy option is not used, the program honors the http_proxy and all_proxy environment variables.

Donations

Donations for the work done in this fork are accepted :

Tanguy Pruvot :

  • BTC: 1FhDPLPpw18X4srecguG3MxJYe4a1JsZnd
  • ZRC: ZX6LmrCwphNgitxvDnf8TX6Tsegfxpeozx

Lucas Jones :

  • MRO: 472haywQKoxFzf7asaQ4XKBc2foAY4ezk8HiN63ifW4iAbJiLnfmJfhHSR9XmVKw2WYPnszJV9MEHj9Z5WMK9VCNHaGLDmJ
  • BTC: 139QWoktddChHsZMWZFxmBva4FM96X2dhE

Credits

CPUMiner-multi was forked from pooler's CPUMiner, and has been started by Lucas Jones.

  • tpruvot added all the recent features and newer algorythmns
  • Wolf9466 helped with Intel AES-NI support for CryptoNight

License

GPLv2. See COPYING for details.

About

No description, website, or topics provided.

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 81.7%
  • C++ 7.9%
  • Assembly 7.6%
  • Objective-C 2.0%
  • Roff 0.2%
  • NSIS 0.2%
  • Other 0.4%