Pages:
Author

Topic: New demonstration CPU miner available - page 13. (Read 386323 times)

full member
Activity: 128
Merit: 100
March 23, 2011, 01:05:43 AM
Got it. What an embarrassing error.  Grin

Thank you.
newbie
Activity: 40
Merit: 0
March 22, 2011, 09:50:24 PM
cdnbcguy@hiscomputer:~/cpuminer-0.8.1$ minerd
No command 'minerd' found, did you mean:
 Command 'mined' from package 'mined' (universe)
minerd: command not found

What the problem, please?
Try ./minerd since . is traditionally not on your path.
full member
Activity: 216
Merit: 100
March 22, 2011, 06:34:49 PM
I am running Ubuntu 10.10 on an AMD Athlon X2 64 bit laptop

When I follow the instructions and do

   CFLAGS="-O3 -Wall -msse2" ./configure
   make

it runs fine and produces minerd as an executable.

But when I run it I get this

cdnbcguy@hiscomputer:~/cpuminer-0.8.1$ minerd
No command 'minerd' found, did you mean:
 Command 'mined' from package 'mined' (universe)
minerd: command not found

What the problem, please?
What'd "make install" output?
full member
Activity: 128
Merit: 100
March 22, 2011, 04:58:47 PM
I am running Ubuntu 10.10 on an AMD Athlon X2 64 bit laptop

When I follow the instructions and do

   CFLAGS="-O3 -Wall -msse2" ./configure
   make

it runs fine and produces minerd as an executable.

But when I run it I get this

cdnbcguy@hiscomputer:~/cpuminer-0.8.1$ minerd
No command 'minerd' found, did you mean:
 Command 'mined' from package 'mined' (universe)
minerd: command not found

What the problem, please?
legendary
Activity: 1596
Merit: 1100
March 22, 2011, 01:16:08 PM
Version 0.8.1 released.  Some non-critical bugfixes, and one feature (User-Agent) that assists pool server operators in isolating problems to specific miner clients.

Changes:
- Make --user, --pass actually work

- Add User-Agent HTTP header to requests, so that server operators may
  more easily identify the miner client.

- Fix minor bug in example JSON config file

SHA1: 0e60652fb0d29c6d20ed40bfce721bcd7a231b51  cpuminer-installer-0.8.1.zip
MD5: cc42cf0ff88958325dfedbd199f71a9e  cpuminer-installer-0.8.1.zip
newbie
Activity: 2
Merit: 0
March 22, 2011, 12:01:44 PM
Hi, no it doesn't.  I've really only just started playing with it and looking at it tbh, if I get a chance I'll have a bash with yasm and report back Smiley
newbie
Activity: 16
Merit: 0
March 22, 2011, 10:58:49 AM
I just compiled and ran this on OS X 10.6.6 by creating a byteswap.h and using no more than ./configure and make.  (No special options etc.)

Obviously you'll need the OS X developer tools installed but aside from that I did nothing funky.

Just create a file called byteswap.h with the following 4 lines in it in the same directory as everything else.

Code:
#include
#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)

As far as I can see this is working fine, still testing though but no build probs after that.

Edit : Ah, just saw chromicants patch, that's probably a better way to bundle it into the build Smiley  Still, hope this helps someone.

Hi rich_rich. Does your compiled version have the sse2_64 algorithm as an option? If you don't install YASM, the compiler doesn't even try to make the sse2_64 so it works, albeit without sse2_64. If you have YASM however, you get the errors I described earlier in the thread. Still, using one of the other algorithm is a better option for mining than official client.
newbie
Activity: 2
Merit: 0
March 22, 2011, 10:46:12 AM
I just compiled and ran this on OS X 10.6.6 by creating a byteswap.h and using no more than ./configure and make.  (No special options etc.)

Obviously you'll need the OS X developer tools installed but aside from that I did nothing funky.

Just create a file called byteswap.h with the following 4 lines in it in the same directory as everything else.

Code:
#include
#define bswap_16(x) OSSwapInt16(x)
#define bswap_32(x) OSSwapInt32(x)
#define bswap_64(x) OSSwapInt64(x)

As far as I can see this is working fine, still testing though but no build probs after that.

Edit : Ah, just saw chromicants patch, that's probably a better way to bundle it into the build Smiley  Still, hope this helps someone.
newbie
Activity: 16
Merit: 0
March 22, 2011, 09:49:09 AM
Try replacing "-f elf64" with "-f macho64" in the x86_64/Makefile as a workaround. Also, you need to make sure you're producing a 64-bit binary while you're compiling. Can't remember how to do that with XCode, but if you don't, the SSE2 code as written will fail. The code uses the added registers that come with the x86_64 architecture to prevent reading/writing to memory.

No dice. I ran the configure with the arch x86_64 command like this:
Code:
CFLAGS="-O3 -Wall -msse2 -arch x86_64" ./configure

then edited the x86_64/Makefile as you suggested (elf -> macho). I still get the similar error shown here:

Code:
make  all-recursive
Making all in compat
Making all in jansson
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in x86_64
make[2]: Nothing to be done for `all'.
gcc -DHAS_YASM -O3 -Wall -msse2 -arch x86_64 -pthread  -o minerd cpu-miner.o util.o sha256_generic.o sha256_4way.o sha256_via.o sha256_cryptopp.o sha256_sse2_amd64.o -lcurl compat/jansson/libjansson.a -lpthread x86_64/libx8664.a
ld: warning: in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols:
  "_CalcSha256_x64", referenced from:
      _scanhash_sse2_64 in sha256_sse2_amd64.o
      _scanhash_sse2_64 in sha256_sse2_amd64.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [minerd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Seems like something, perhaps gcc (Version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)) , doesn't like the file x86_64/libx8664.a? That or I am not forcing a proper 64bit build for the confused Mac compiler.

For interest, I installed Debian on a virtual machine on my MacBook Pro and compiled cpuminer with SSE2_64 there with no problem. In fact, it runs quite well in the VM - over 3600 hashes/core/sec on the mobile i7, and over 3000 hashes/core/sec on the older Xeons in the MacPro.


newbie
Activity: 40
Merit: 0
March 22, 2011, 08:30:15 AM
So I tried to compile on my newer MacBook Pro (Intel i7; OS 10.6.6) with Xcode (and YASM 1.1.0) installed using the tarball version 0.8 of cpuminer with chromicant's patch. Indeed, the previous issue I had with libcurl seems to be machine-specific thing, but I ran into another problem. The configure runs fine but I run into a "in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)" error while trying to make amd2_sse64 module.    
Here is the output after running make:

Code:
Making all in x86_64
/usr/local/bin/yasm -f elf64 sha256_xmm_amd64.asm
rm -f libx8664.a
ar cru libx8664.a sha256_xmm_amd64.o
ranlib libx8664.a
ranlib: warning for library: libx8664.a the table of contents is empty (no object file members in the library define global symbols)

Any ideas? If I make without the sse2_amd64 module it builds and runs fine using the original algorithms as you may have guessed.

Try replacing "-f elf64" with "-f macho64" in the x86_64/Makefile as a workaround. Also, you need to make sure you're producing a 64-bit binary while you're compiling. Can't remember how to do that with XCode, but if you don't, the SSE2 code as written will fail. The code uses the added registers that come with the x86_64 architecture to prevent reading/writing to memory.
sr. member
Activity: 258
Merit: 250
March 22, 2011, 04:39:10 AM
BitcoinPool.com was updated to add support for jgarzik's CPU miner's long polling requests.

From the client side, Long Polling should be using GET method instead of POST method. That is, for it to be an actual "comet-style" long poll.

Either way though, we now support both GET and POST to long polling side channels.

...and to answer your question (jgarzik) in a completely late fashion, and in a different thread... our pool is "based on" your pool server in the sense that I used your pool as a reference when I wrote my own. However, we're running on a completely different framework, and not using sqlite3.

Great miner btw. Smiley
newbie
Activity: 16
Merit: 0
March 22, 2011, 03:54:01 AM
So I tried to compile on my newer MacBook Pro (Intel i7; OS 10.6.6) with Xcode (and YASM 1.1.0) installed using the tarball version 0.8 of cpuminer with chromicant's patch. Indeed, the previous issue I had with libcurl seems to be machine-specific thing, but I ran into another problem. The configure runs fine but I run into a "in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)" error while trying to make amd2_sse64 module.    
Here is the output after running make:

Code:
make  all-recursive
Making all in compat
Making all in jansson
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT dump.o -MD -MP -MF .deps/dump.Tpo -c -o dump.o dump.c
mv -f .deps/dump.Tpo .deps/dump.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c
mv -f .deps/hashtable.Tpo .deps/hashtable.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c
mv -f .deps/load.Tpo .deps/load.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT strbuffer.o -MD -MP -MF .deps/strbuffer.Tpo -c -o strbuffer.o strbuffer.c
mv -f .deps/strbuffer.Tpo .deps/strbuffer.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT utf.o -MD -MP -MF .deps/utf.Tpo -c -o utf.o utf.c
mv -f .deps/utf.Tpo .deps/utf.Po
gcc -DHAVE_CONFIG_H -I. -I../..     -O3 -Wall -msse2 -MT value.o -MD -MP -MF .deps/value.Tpo -c -o value.o value.c
mv -f .deps/value.Tpo .deps/value.Po
rm -f libjansson.a
ar cru libjansson.a dump.o hashtable.o load.o strbuffer.o utf.o value.o
ranlib libjansson.a
make[3]: Nothing to be done for `all-am'.
Making all in x86_64
/usr/local/bin/yasm -f elf64 sha256_xmm_amd64.asm
rm -f libx8664.a
ar cru libx8664.a sha256_xmm_amd64.o
ranlib libx8664.a
ranlib: warning for library: libx8664.a the table of contents is empty (no object file members in the library define global symbols)
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT cpu-miner.o -MD -MP -MF .deps/cpu-miner.Tpo -c -o cpu-miner.o cpu-miner.c
mv -f .deps/cpu-miner.Tpo .deps/cpu-miner.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT sha256_generic.o -MD -MP -MF .deps/sha256_generic.Tpo -c -o sha256_generic.o sha256_generic.c
mv -f .deps/sha256_generic.Tpo .deps/sha256_generic.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT sha256_4way.o -MD -MP -MF .deps/sha256_4way.Tpo -c -o sha256_4way.o sha256_4way.c
mv -f .deps/sha256_4way.Tpo .deps/sha256_4way.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT sha256_via.o -MD -MP -MF .deps/sha256_via.Tpo -c -o sha256_via.o sha256_via.c
mv -f .deps/sha256_via.Tpo .deps/sha256_via.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT sha256_cryptopp.o -MD -MP -MF .deps/sha256_cryptopp.Tpo -c -o sha256_cryptopp.o sha256_cryptopp.c
mv -f .deps/sha256_cryptopp.Tpo .deps/sha256_cryptopp.Po
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson   -DHAS_YASM -O3 -Wall -msse2 -MT sha256_sse2_amd64.o -MD -MP -MF .deps/sha256_sse2_amd64.Tpo -c -o sha256_sse2_amd64.o sha256_sse2_amd64.c
mv -f .deps/sha256_sse2_amd64.Tpo .deps/sha256_sse2_amd64.Po
gcc -DHAS_YASM -O3 -Wall -msse2 -pthread  -o minerd cpu-miner.o util.o sha256_generic.o sha256_4way.o sha256_via.o sha256_cryptopp.o sha256_sse2_amd64.o -lcurl compat/jansson/libjansson.a -lpthread x86_64/libx8664.a
ld: warning: in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols:
  "_CalcSha256_x64", referenced from:
      _scanhash_sse2_64 in sha256_sse2_amd64.o
      _scanhash_sse2_64 in sha256_sse2_amd64.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [minerd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any ideas? If I make without the sse2_amd64 module it builds and runs fine using the original algorithms as you may have guessed.


legendary
Activity: 1596
Merit: 1100
March 21, 2011, 09:33:58 PM
- Suport --user/--pass options (and "user" and "pass" in config file), as an alternative to the current --userpass

--user/--pass is broken in version 0.8.  Either obtain the latest -git for a fix, or continue to use --userpass until the next release.

newbie
Activity: 16
Merit: 0
March 21, 2011, 04:53:32 PM
Ok... I added chromicant's 5 line patch for byteswap.h which seems to have worked (as far as I can tell), but I then ran into a libcurl problem shown here:

Code:
checking for curl-config... /sw2/bin/curl-config
checking for the version of libcurl... 7.21.2
checking for libcurl >= version 7.10.1... yes
checking whether libcurl is usable... no
configure: error: Missing required libcurl >= 7.10.1

As far as I can tell libcurl was install correctly, but I reinstalled it from fink (http://pdb.finkproject.org/pdb/package.php/libcurl4?rel_id=10.6-x86_64-current-stable) and when that didn't work, I rebuilt it from the latest source (7.21.4; http://curl.haxx.se/download.html). I am not sure if there is something strange or broken about this machine so I will try to compile on another, fresher Mac tomorrow. Curl -v gives:

Code:
curl 7.21.2 (i386-apple-darwin10.6.0) libcurl/7.21.2 OpenSSL/0.9.8l zlib/1.2.3 c-ares/1.7.3 libssh2/1.2.7 librtmp/2.3
legendary
Activity: 1596
Merit: 1100
March 21, 2011, 03:51:51 PM
I think byte swapping is simple enough that we can afford to create compat/byteswap.h, and include inline versions of byteswap macros for the case where the OS does not provide.  This seems like an area of breakage that we could solve permanently.

#ifdef __APPLE__ is fine, but we should provide fallbacks nonetheless.

Volunteers?   Smiley

newbie
Activity: 40
Merit: 0
March 21, 2011, 03:07:54 PM
I have only spent a couple minutes playing with it but I got stuck at the same byteswap.h problem described previously in this thread (see: https://bitcointalksearch.org/topic/m.48679). I am sure it is possible so I'll give it another go when I have some time.

Hmm. Looks like it'll be a 5 line patch to fix that. Something like (the 5 lines plus the rest of the define):

Code:
#if defined(__APPLE__)
#include
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define WANT_BUILTIN_BSWAP
#else
#include
#endif

Taken from XOrg, which had the same problem on OSX.

...and I think jgarzik's solution needs to be massaged into the OSX code above for maximum cleanliness!
legendary
Activity: 1596
Merit: 1100
March 21, 2011, 03:07:43 PM
I have only spent a couple minutes playing with it but I got stuck at the same byteswap.h problem described previously in this thread (see: https://bitcointalksearch.org/topic/m.48679). I am sure it is possible so I'll give it another go when I have some time.

Those with the ability to test can add

     AC_CHECK_HEADERS(byteswap.h)

to configure.ac, and then check

     #ifdef HAVE_BYTESWAP_H
     ... current code ...
     #else
     ... OSX code ...
     #endif

after running ./autogen.sh with proper autoconf/libcurl/etc. build dependencies, to regenerate configure.

newbie
Activity: 16
Merit: 0
March 21, 2011, 02:57:46 PM
As far as I know no one has been able to easily compile and get this to run on OS X natively. However, you can run the miner (unfortunately without ufasoft's sse2 optimizations) using the following steps:

Urm. Have you tried to compile it natively using XCode on OSX 10.6 on a machine that can handle SSE2? I'd like to see some bug reports as to why it won't compile. I don't think there's anything super specific that would prevent a build from happening. I've seen nothing on what sort of compile errors one gets on OSX. Also remember, I crafted the SSE2 code in jgarzik's miner to require the 64-bit mode of Intel/AMD chips. So if you're running a 32-bit kernel/userspace, you won't be able to use it.

(I'd try myself, but my Mac is in little bits...and it's just a CoreDuo, so I couldn't test the SSE2 code if I wanted to)

I do know my SSE2 WILL NOT WORK in win64, since the calling ABI is different.

The one place where there probably is a problem is I used ELF64 as the output for yasm. That should be Mach-O for OSX...but it may also just work.

I have only spent a couple minutes playing with it but I got stuck at the same byteswap.h problem described previously in this thread (see: https://bitcointalksearch.org/topic/m.48679). I am sure it is possible so I'll give it another go when I have some time.
newbie
Activity: 40
Merit: 0
March 21, 2011, 02:50:47 PM
As far as I know no one has been able to easily compile and get this to run on OS X natively. However, you can run the miner (unfortunately without ufasoft's sse2 optimizations) using the following steps:

Urm. Have you tried to compile it natively using XCode on OSX 10.6 on a machine that can handle SSE2? I'd like to see some bug reports as to why it won't compile. I don't think there's anything super specific that would prevent a build from happening. I've seen nothing on what sort of compile errors one gets on OSX. Also remember, I crafted the SSE2 code in jgarzik's miner to require the 64-bit mode of Intel/AMD chips. So if you're running a 32-bit kernel/userspace, you won't be able to use it.

(I'd try myself, but my Mac is in little bits...and it's just a CoreDuo, so I couldn't test the SSE2 code if I wanted to)

I do know my SSE2 WILL NOT WORK in win64, since the calling ABI is different.

The one place where there probably is a problem is I used ELF64 as the output for yasm. That should be Mach-O for OSX...but it may also just work.
newbie
Activity: 16
Merit: 0
March 21, 2011, 02:44:38 PM
for a complete newb how do i go around to make this work on mac OSx 10.6?
As far as I know no one has been able to easily compile and get this to run on OS X natively. However, you can run the miner (unfortunately without ufasoft's sse2 optimizations) using the following steps:

1) Install MacPorts (here:http://www.macports.org/install.php). This software will allow you to easily install various linux packages on your Mac.
2) Open up the terminal, and run 'sudo port -v selfupdate' to get the latest package info and then 'sudo port install wine'. This will install wine, an application that will let you run windows programs.
3) Download the windows installer of the miner (from here: https://bitcointalksearch.org/topic/m.24217) and unzip it. Run it in the terminal with 'wine cpuminer-installer.exe' and make sure to choose a directory you will remember (I just made one on the desktop). If you aren't sure the full path to cpuminer-installer.exe, just drag the file from the finder window to the terminal window and terminal will add it.
4) Run the miner in the terminal with 'wine /yourdirectory/minerd.exe --help' or with whatever command line options you decide. I found the cryptopp_asm32 algorithm to give my MacPro the highest hashing rates.

Happy mining.

Pages:
Jump to: