pooler / cpuminer Goto Github PK
View Code? Open in Web Editor NEWCPU miner for Litecoin and Bitcoin
Home Page: https://bitcointalk.org/index.php?topic=55038.0
License: Other
CPU miner for Litecoin and Bitcoin
Home Page: https://bitcointalk.org/index.php?topic=55038.0
License: Other
This is a multi-threaded CPU miner for Litecoin and Bitcoin, fork of Jeff Garzik's reference cpuminer. License: GPLv2. See COPYING for details. Downloads: https://sourceforge.net/projects/cpuminer/files/ Git tree: https://github.com/pooler/cpuminer Dependencies: libcurl http://curl.haxx.se/libcurl/ jansson http://www.digip.org/jansson/ (jansson is included in-tree) Basic *nix build instructions: ./autogen.sh # only needed if building from git repo ./nomacro.pl # in case the assembler doesn't support macros ./configure CFLAGS="-O3" # make sure -O3 is an O and not a zero! 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 instructions, using MinGW: Install MinGW and the MSYS Developer Tool Kit (http://www.mingw.org/) * Make sure you have mstcpip.h in MinGW\include If using MinGW-w64, 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 In the MSYS shell, run: ./autogen.sh # only needed if building from git repo LIBCURL="-lcurldll" ./configure CFLAGS="-O3" make 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. PowerPC: No runtime CPU detection. To use AltiVec instructions, add "-maltivec" 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. The miner uses the VIA Padlock Hash Engine where available. Usage instructions: Run "minerd --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. Also many issues and FAQs are covered in the forum thread dedicated to this program, https://bitcointalk.org/index.php?topic=55038.0
When cross-compiling for iOS on armv7s or armv7 (on OS X) ld throws this lot out:
ld: warning: ignoring file minerd-cpu-miner.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-cpu-miner.o
ld: warning: ignoring file minerd-util.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-util.o
ld: warning: ignoring file minerd-sha2.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-sha2.o
ld: warning: ignoring file minerd-scrypt.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-scrypt.o
ld: warning: ignoring file minerd-sha2-arm.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-sha2-arm.o
ld: warning: ignoring file minerd-scrypt-arm.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (armv7s): minerd-scrypt-arm.o
and then fails with:
Undefined symbols for architecture armv7s:
"_main", referenced from:
start in crt1.3.1.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [minerd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This happens regardless of whether neon is enabled or not.
libcurl.a and libjansson.a were both compiled (for armv7(s)) and manually referenced in the Makefile.
My environment is OS X 10.9.1 with iOS 7.0 SDK set up for cross-compiling by:
$ export IPHONEOS_DEPLOYMENT_TARGET="4.3"
$ export $ CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
$ export CFLAGS="-arch [ARCH] -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"
$ export LDFLAGS="-arch [ARCH] -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk"
$ ./configure --disable-shared --enable-static --host="armv7-apple-darwin"
$ make -j `sysctl -n hw.logicalcpu_max`
Which is essentially the method on this page: http://seiryu.home.comcast.net/~seiryu/libcurl-ios.html
I have literally no clue what the error is on about to be honest, I guess it's not compiling those files for the architecture correctly. Maybe they're not compiling for armv7(s) but instead compiling for my actual system, I wouldn't know how to tell.
I assume this is an issue rather than just being me however I guess very few people have bothered to try compiling a miner on iOS, libcurl and libjansson did compile fine. Not sure quite how I'll interface with the miner once it's compiled since NSTask is not available on iOS, figured I'd work that out once I have something to experiment with.
Thanks!
Probably because as v1.38 cannot handle macros. I tried with several MacPorts gcc variants, but no avail. Is there a way to expand macros in scrypt-x64.S with a script, or maybe with as on linux and use the result?
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I/opt/local/include -O3 -MT minerd-scrypt-x64.o -MD -MP -MF .deps/minerd-scrypt-x64.Tpo -c -o minerd-scrypt-x64.o test -f 'scrypt-x64.S' || echo './'
scrypt-x64.S
scrypt-x64.S:182:Alignment too large: 15. assumed.
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:suffix or operands invalid for rol' scrypt-x64.S:11:suffix or operands invalid for
rol'
scrypt-x64.S:11:suffix or operands invalid for rol' scrypt-x64.S:11:suffix or operands invalid for
rol'
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:expecting operand before ','; got nothing
scrypt-x64.S:11:suffix or operands invalid for rol' scrypt-x64.S:11:suffix or operands invalid for
rol'
....
many more lines like this following.
Is scrypt-x64.S compatible with the llvm/clang assembler?
Failure message follows:
cc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I/usr/local/include -O2 -pipe -fno-strict-aliasing -MT minerd-scrypt-x64.o
-MD -MP -MF .deps/minerd-scrypt-x64.Tpo -c -o minerd-scrypt-x64.o `test -f 'scrypt-x64.S' || echo './'`scrypt-x64.S
<instantiation>:4:7: error: unknown token in expression
roll , %ebp
^
scrypt-x64.S:311:2: note: while in macro instantiation
salsa8_core_gen_doubleround
^
<instantiation>:7:7: error: unknown token in expression
roll , %ebp
^
scrypt-x64.S:311:2: note: while in macro instantiation
salsa8_core_gen_doubleround
^
<instantiation>:10:7: error: unknown token in expression
roll , %ebp
^
scrypt-x64.S:311:2: note: while in macro instantiation
salsa8_core_gen_doubleround
^
<instantiation>:13:7: error: unknown token in expression
roll , %ebp
^
scrypt-x64.S:311:2: note: while in macro instantiation
salsa8_core_gen_doubleround
^
<instantiation>:17:10: error: invalid operand for instruction
roll 3, %ebp
^~~~
scrypt-x64.S:311:2: note: while in macro instantiation
salsa8_core_gen_doubleround
^
<instantiation>:20:10: error: invalid operand for instruction
roll 3, %ebp
^~~~
... output truncated ....
Causes pthreads library to crash!
Hi, I just noticed that there is no Windows x64 package for 2.2.3. If there is some compiling issue I would be happy to compile it on my machine and provide the build for others to download. I'm not sure if it was skipped accidentally or not, however the x64 version works wonders compared to the 32 version so it would be nice to offer the latest to everyone.
Hi, would it be possible to add an verbose output of the solved share difficulty as cgminer does?
Please, add option for username/password for http proxy.
Okay am having trouble. Everytime I go to build this, something is wrong. Am running on Mac OS X 10.9 Using homebrew as well with min stuff installed. My Path is correct in terminal. I have the dependacies and I keep getting errors that are upetting to even build this or attempt to all the time. Example from following the nix build: Users/Richard/Downloads/cpuminer-master/autogen.sh
Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Okay I fix this and went into the file and changed it to AM_CPPFLAGS , nothing was reported afterwards with autogen. Than did the one after that Okay
,' ./configure: line 5586:
LIBCURL_CHECK_CONFIG(, 7.15.2, ,'So I go to the file and check out that line and read about it. Am assuming that this is needed and it can't find it. I would of thought that it was apart of curl or maybe point to the libs -L OR -l , nothing works.
2.3.1 ran for about 2 hours on OS X 10.7, then segfaulted overnight. Now it segfaults 100% of the time right after startup:
$ nice -n 18 ./minerd -c mycfg.json
[2013-06-21 08:50:49] 4 miner threads started, using 'scrypt' algorithm.
[2013-06-21 08:50:49] Starting Stratum on stratum+tcp://redacted
Segmentation fault: 11
Edit: This was using the downloaded binary. I will be able to report performance on other flavors of OS X in a little while.
Is there anyway to compile this to not trigger antivirus false positives? too many AV products trigger. Thank you.
When I start the miner I get this problem with http request... which than repeats every 30 seconds.
The message:
HTTP request failed: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Could the problem be on the pool's side..?
The latest binaries for windows are being detected as Win32:Crypt-OSW by avast!
Is this a false positive ?
does minerd support multiple pools from the command line? and if so, does minerd support writing the running config out to a config file?
โ ./configure CFLAGS="-O3"
checking build system type... x86_64-apple-darwin12.0.0
checking host system type... x86_64-apple-darwin12.0.0
checking target system type... x86_64-apple-darwin12.0.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc -std=gnu99 needs -traditional... no
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking dependency style of gcc -std=gnu99... gcc3
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... no
configure: WARNING: The assembler does not support the AVX instruction set.
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
./configure: line 5566: syntax error near unexpected token `,'
./configure: line 5566: `LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
would like to supply any information you need :)
If you try to compile git source code on Centos 6 64 bit, it compiles right but do not works. All computed results are rejected by server. I guess that they are computed wrong.
It would be nice to add some kind of selftest to --benchmark option
Thanks for your cpuminer pooler, I can compile and use it in MacMiner fine, but I'm having no luck with this:
https://github.com/Thirtybird/cpuminer
due to the macros around scrypt-jane-portable-x86.h
I'd much appreciate it if you'd take a look at integrating support in your cpuminer!
Is there going to be any development in this area? I like pooler's cpuminer. Am unsure what is exactly going on with the cryptocoin world and all these miners, just made for to be used with one coin. BitShares PTS and such other coins/ DAC's and or Hybrid coins that will be coming out and such. Most the miners offered has some flaws it seems. Check out girino for a list of miners that am talking about. https://github.com/girino . I dunno, pooler/cpuminer is very fast it seems compared to all these miners that I have used for recent coins that use POW such as PTS. One thing I did notice, it is less CPU intense, in the fact my temps don't actually go as high when using pooler's cpuminer, yet as I stated Poolers seem faster to mine and share. Also there seems to be connectivity issues as well. I don't like the fact weather it works or not, that they force say donating out of people through the miner's as they state. There always seems to be connectivity issues with the jh Protominer, makes me think it is built in, so it starts to mine for the developer again. I also don't like the fact some pool's for these new coins are only letting you use specfic miners.
Hi,
First of all thanks for so Great Work!!! Many thanks. Works super fast!
And about the issues: basically it isn't an issue. It's an advice, could you please export all this stuff to dll-file, this case everybody can use it form e.g: C#.
Many Thanks
./configure: line 5555: syntax error near unexpected token ,' ./configure: line 5555:
LIBCURL_CHECK_CONFIG(, 7.15.2, ,'
make: *** [config.status] Error 2
This happens if I try to compile it using make. Commenting out this line ends up with it not being able to find Libcurl.
I am running OpenSUSE 64-bit. :)
will you update the tarball for OSX compilation since there have been changes?
Is there a way ./configure to remove all references to sha256? If not, would you consider forking for a scrypt-only version?
additional info: trying to avoid AntiVirus false positives (still) and wondering if this could do it for a short term. Also, maybe some obfuscating code? -- Seems A.V. triggers are signature based.
in get_stratum_session_id function
the json_t *val is "result" field but you treat as response "ALL"
hsn@acer:~/ltminer % make
make all-recursive
Making all in compat
Making all in jansson
cc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I/usr/local/include -g -O2 -MT minerd-scrypt-x86.o -MD -MP -MF .deps/minerd-scrypt-x86.Tpo -c -o minerd-scrypt-x86.o test -f 'scrypt-x86.S' || echo './'
scrypt-x86.S
:6:7: error: unknown token in expression
roll , %edi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:11:7: error: unknown token in expression
roll , %ebp
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:16:10: error: invalid operand for instruction
roll 3, %ebx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:21:10: error: invalid operand for instruction
roll 8, %ecx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:23:7: error: unknown token in expression
roll , %edi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:29:7: error: unknown token in expression
roll , %ecx
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:36:10: error: invalid operand for instruction
roll 3, %ebx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:41:10: error: invalid operand for instruction
roll 8, %esi
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:43:7: error: unknown token in expression
roll , %edi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:49:7: error: unknown token in expression
roll , %esi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:56:10: error: invalid operand for instruction
roll 3, %ebx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:61:10: error: invalid operand for instruction
roll 8, %ecx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:63:7: error: unknown token in expression
roll , %edi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:68:7: error: unknown token in expression
roll , %ecx
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:75:10: error: invalid operand for instruction
roll 3, %ebx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:80:10: error: invalid operand for instruction
roll 8, %esi
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:82:7: error: unknown token in expression
roll , %edi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:88:7: error: unknown token in expression
roll , %esi
^
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
:95:10: error: invalid operand for instruction
roll 3, %ebx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
๐ฏ10: error: invalid operand for instruction
roll 8, %ecx
^~~~
scrypt-x86.S:393:2: note: while in macro instantiation
salsa8_core_gen_quadround
^
[ lot more ]
Please, add possibility to define own scan time even when long polling is enabled. Currently it is fixed to be 60 seconds, and -s parameter is ignored.
When compiling from a clone with the recommended CFLAGS I get the following output:
cpuminer [master] % ./configure CFLAGS="-03"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/m3talsmith/src/mining/cpuminer':
configure: error: C compiler cannot create executables
See `config.log' for more details
I also attempted compile it with some CFLAGS I found on the bitcoin forum, but I think I ran into the macro expansion error you were having with OSX:
cpuminer [master] % ./configure CFLAGS="-mtune=amdfam10 -O3 -ffast-math -mabm -msse4a -pipe"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc -std=gnu99 needs -traditional... no
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking dependency style of gcc -std=gnu99... gcc3
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
./configure: line 5502: syntax error near unexpected token `,'
./configure: line 5502: `LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
My CPU is an AMD Phenom II X6 1075T (6 core of course). I'm running the latest nightly build of Ubuntu 13.04 as of 2013/04/05. Log here: https://gist.github.com/m3talsmith/5322557 .
I'm always tentative to use something I can't compile. Thanks for looking into this.
I'm using Linux Mint and I have libcurl3 installed. When I run ./configure CFLAGS="-O3"
it gives me the following error:
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
./configure: line 5542: syntax error near unexpected token `,'
./configure: line 5542: `LIBCURL_CHECK_CONFIG(, 7.15.2, ,'
I think autogen.sh
gave me a warning but I'm not sure if it's related to this.
Hello,
Can you add Crypto API (Linux):
http://en.wikipedia.org/wiki/Crypto_API_(Linux)
To have better asm, better performance due to in kernel calculation, and more evolutive asm (maintened into the kernel).
Cheers,
First after reading through the closed issues I'd like to thank you for supporting FreeBSD, and you work in general, we all owe you a beer.
It would be nice to see a documentation update for FreeBSD users, more specifically an addition under the x86-64 section.
Doing this brought me from 32 KH/s to 40 KH/s, a fairly healthy improvement matching that of other OSes using a Xeon E3-1220. Ideally you'd support Clang as gcc soon won't exist in FreeBSD, which I tried but it failed to build.
mv -f .deps/minerd-scrypt-x86.Tpo .deps/minerd-scrypt-x86.Po
/usr/bin/clang -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I/usr/local/include -g -O2 -MT minerd-scrypt-x64.o -MD -MP -MF .deps/minerd-scrypt-x64.Tpo -c -o minerd-scrypt-x64.o test -f 'scrypt-x64.S' || echo './'
scrypt-x64.S
*** [minerd-scrypt-x64.o] Error code 1
If you'd like a full log or more information let me know. Thanks.
Please add this info to README: to build minerd.exe from pooler-cpuminer-2.2.3.tar.gz in MinGW 64 on Windows 7 I had to add `-DPTW32_STATIC_LIB' to my CFLAGS at ./configure. Otherwise make fails with:
gcc -std=gnu99 -O3 -march=native -mtune=native -pipe -o minerd.exe minerd-cpu-miner.o minerd-util.o minerd-sha2.o minerd-sha2-arm.o minerd-sha2-x86.o minerd-sha2-x64.o minerd-scrypt.o minerd-scrypt-arm.o minerd-scrypt-x86.o minerd-scrypt-x64.o -lcurldll compat/jansson/libjansson.a -lpthread -lws2_32 -lpthread
minerd-cpu-miner.o:cpu-miner.c:(.text+0x5dd): undefined reference to `__imp_pthread_mutex_lock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x5ee): undefined reference to `__imp_pthread_mutex_unlock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0xd12): undefined reference to `__imp_pthread_mutex_lock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0xd5c): undefined reference to `__imp_pthread_mutex_unlock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x15ac): undefined reference to `__imp_pthread_mutex_lock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x163d): undefined reference to `__imp_pthread_mutex_unlock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x1746): undefined reference to `__imp_pthread_mutex_lock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x1772): undefined reference to `__imp_pthread_mutex_unlock'
minerd-cpu-miner.o:cpu-miner.c:(.text+0x1b3d): undefined reference to `__imp_pthread_mutex_unlock'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: minerd-cpu-miner.o: bad reloc address 0x50 in section `.data'
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make[2]: *** [minerd.exe] Error 1
make[2]: Leaving directory `/home/msieczkx/cpuminer-2.2.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/msieczkx/cpuminer-2.2.3'
make: *** [all] Error 2
Also, the README could mention the nice how-to on pthreads installation, for MinGW 64 users: http://www.mythtv.org/wiki/MythTV_on_Windows#libpthread_2 (mind the `libpthread.a' rename "trick").
As I'm a complete MingW newbie, it took me several hours to sort these 2 things out. Probably others would find such hints usefull.
./autogen.sh
configure.ac:15: installing ./compile' configure.ac:4: installing
./config.guess'
configure.ac:4: installing ./config.sub' configure.ac:6: installing
./install-sh'
configure.ac:6: installing ./missing' compat/jansson/Makefile.am: installing
./depcomp'
Makefile.am: installing `./INSTALL'
configure.ac:102: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
then, after continuing:
.checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
./configure: line 5484: syntax error near unexpected token ,' ./configure: line 5484:
LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
joe@josephfix-ThinkPad-X61:~/Downloads/pooler-cpuminer-ff69f18$ make
make: *** No targets specified and no makefile found. Stop.
getting error on ubuntu 12.04
./configure: line 5488: syntax error near unexpected token `7.10.1,'
./configure: line 5488: `LIBCURL_CHECK_CONFIG(7.10.1,'
Running minerd --help
isn't acceptable, at least have a man page or USAGE.md or something. I couldn't make heads or tails of the --help and whether i needed a mining server or not (apparently this is a solo or pooled miner, so where am I supposed to get a mining server anyhow?)
When running ./autogen.sh, I get the following output:
configure.ac:13: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Makefile.am: installing './INSTALL'
Makefile.am: installing './depcomp'
configure.ac:113: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
I'm running an up-to-date ArchLinux x64, autoconf 2.69-1, automake 1.14-1 already installed. Any ideas how to investigate/fix this?
Thanx,
Sasha
why the cpuminer's scrypt output is not equal to "https://github.com/litecoin-project/litecoin/blob/master-0.8/src/scrypt.cpp#L329"
in cpuminer, i call like this:
int main(void)
{
uint32_t job[32];
uint32_t hash[8];
uint32_t midstate[8];
unsigned char *scratchbuf = (unsigned char *)malloc(SCRYPT_BUFFER_SIZE);
memset(scratchbuf, 0, SCRYPT_BUFFER_SIZE);
for (int i = 0; i < 32; i++) {
job[i] = 0x55555555;
}
job[19] = 0;
job[20] = 0x80000000;
job[31] = 0x00000280;
sha256_init(midstate);
sha256_transform(midstate, job, 0);
scrypt_1024_1_1_256(job, hash, midstate, scratchbuf);
char *h = (char *)hash;
for (int j = 0; j < 32; j++) {
printf("%02x", h[j] & 0xff);
}
printf("\n");
}
in the litecoin, i call like this:
int main()
{
uint32_t job[32];
uint32_t hash[8] = {0};
for (int i = 0; i < 32; i++) {
job[i] = 0x55555555;
}
job[19] = 0;
job[20] = 0x80000000;
job[31] = 0x00000280;
scrypt_1024_1_1_256((const char *)job, (char *)hash);
char *h = (char *)hash;
for (int j = 0; j < 32; j++) {
printf("%02x", h[j] & 0xff);
}
printf("\n");
return 0;
}
On AIX build fails with the following message:
[...]
/tmp/cpuminer-2.3.2/compile gcc -std=gnu99 -maix64 -O3 -pthread -o minerd minerd-cpu-miner.o minerd-util.o minerd-sha2.o minerd-sha2-arm.o minerd-sha2-x86.o minerd-sha2-x64.o minerd-scrypt.o minerd-scrypt-arm.o minerd-scrypt-x86.o minerd-scrypt-x64.o /tmp/devel/lib/libcurl.a -lz compat/jansson/libjansson.a -lpthread
gcc: error: minerd-sha2-arm.o: No such file or directory
gcc: error: minerd-sha2-x86.o: No such file or directory
gcc: error: minerd-sha2-x64.o: No such file or directory
gcc: error: minerd-scrypt-arm.o: No such file or directory
gcc: error: minerd-scrypt-x86.o: No such file or directory
gcc: error: minerd-scrypt-x64.o: No such file or directory
make[2]: *** [minerd] Error 1
make[2]: Leaving directory `/tmp/cpuminer-2.3.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/cpuminer-2.3.2'
make: *** [all] Error 2
Hi. CPU_WHICH_CPUSET should be CPU_WHICH_TID, i.e.:
cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(cpuset_t), &set);
cpuset(2) explains what CPU_WHICH_TID == -1 case means (current thread).
Current code sometimes assign all threads to only one CPU, depends on scheduler used and other things.
How do I configure this miner so that it doesn't send proof-of-work to the server? I am solo mining (against conventional wisdom) and hence would like to avoid the proof-of-work overhead.
If I understand right, every time a proof-of-work is sent, a new work is provided by the server and the search for a hash begins anew. I would like to avoid that.
I tried to understand the code, but couldn't fully grok it (perhaps because I haven't fully understood the protocols). If there is some tweak I can do to the code, in the absence of a configuration, please do let me know.
Hi,
the error message from the subject line plagues mostly users of a straight windows port of cpuminer, as well as users of cudaminer.
What happens is that occasionally the socket "goes bad" and stratum_recv_line gets an empty string. It fails to tokenize that and returns a NULL pointer. This results in stratum_disconnect getting called.
stratum_disconnect tries to acquire the socket mutex and in some cases does not ever get access to it, resulting in the code hanging.
This deadlock occurs when at about the same time some worker tried to send results with stratum_send_line, which holds the same mutex until the line was completely sent. Unfortunately when the socket is in a broken state, the socket write call fails and there seems to be a loop inside the send_line function that will indefinitely retry, consuming 25% CPU resources (one core) permanently while holding that mutex!
So, we could add a timeout to send_line, after which it either temporarily releases the mutex - or it leaves the function alltogether reporting a failure.
Why this only hits Windows users - I don't know. Maybe winsock2 behaves a bit differently than Linux sockets.
Also it hits about once a day, in my experience - making it cumbersome to let a miner run unattended.
neither the link for downloading the x86 or x64 Windows versions are working.
adius:~/cpuminer$ ./configure CFLAGS="-O3"
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking target system type... x86_64-apple-darwin13.0.0
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
./configure: line 5586: syntax error near unexpected token `,'
./configure: line 5586: `LIBCURL_CHECK_CONFIG(, 7.15.2, ,'
adius:~/cpuminer$
Line 705 in cpu-miner.c
!*g_work.job_id
prevents me from mining at all (keeps it in the sleep state)
changed to !g_work.job_id and it works.
SuSe Linux, Intel (icc) compiler
Cloned the git repo. Running into a couple problems.
libcurl isn't being found, and there may be a syntax error in ./configure.
OSX has libcurl 7.24.0 included. Location of the lib is found via the curl-config utility, i.e.:
curl-config --libs //-L/usr/local/lib -lcurl -lssl -lcrypto -lldap -lz
I'm not terribly familiar with this build system. The only check I find for libcurl is line 5566 of configure, "LIBCURL_CHECK_CONFIG". There's a syntax error here:
./configure: line 5566: syntax error near unexpected token ,' ./configure: line 5566:
LIBCURL_CHECK_CONFIG(, 7.10.1, ,'
Happy to help further diagnose and test fixes.
It looks there's already a primecoin pooled mining, http://ypool.net got a self made primecoin miner and a 'self' protocol. the sources are available in https://github.com/jh000/jhPrimeminer.git
maybe cpuminer will be the first public miner with stratum protocol support for primecoin :)
I have been looking at the code, and judging by what it uses, I would assume that the program have been coded in C (correct me if I am wrong). If so, would if be better to use C++ instead. C++ may have some feature that will increase the performance of the code, and even if a total code revamp is impossible, I am pretty sure only some small changes is needed to change C code to C++.
Hi,
I'm getting disconnects frequently like this:
[2014-02-01 19:41:09] submit_upstream_work stratum_send_line failed
[2014-02-01 19:41:09] ...retry after 30 seconds
I'm using the latest cpuminer and connected to a p2pool setup by myself.
Does cpuminer use BLAS or LAPACK for some/all of the calculations? Could there be a performance gain by using a highly tuned/optimized BLAS?
Have you ever considered merging all your excellent cpu mining code into a project like bfgminer (which has horrible cpu support)? Would you be offended if someone else did that? I would love to only use one tool to mine if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.