JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
770 stars 545 forks source link

Mining with MAC #170

Closed bitminer2017 closed 5 years ago

bitminer2017 commented 5 years ago

I want to CPU mine via My Mac Your wallet does not work. and I cant Find the miner for Mac high Sierra is there one avaliable?

bitminer2017 commented 5 years ago

Hello any Admins here to answer???

lordgamegenie commented 5 years ago

JayDDee either fell off the planet or abandoned this hub. To your question there is one working cpu miner for Mac I know and that is quagliero's cpuminer-multi.

bitminer2017 commented 5 years ago

Thanks!!!!!

Tomcatt commented 5 years ago

This one is a better miner I think. I found a docker version but it's old. Not too sure how to mod docker to run this one.

JayDDee commented 5 years ago

I'm back.

Some work needs to be done to get cpuminer-opt working on MAC. This requires some development knowledge on MAC which I don't have. But I'm willing to work with someone who does.

I assume many errors will be due to missing libraries. If any libraries aren't available it creates even more work.

If someone has a compile console, hopefully with the trivial erros already worked out including library issues, I can lookit over for clues.

One technique that can be used is to remove the algo that have problems compiling. It's simple to do if you know a little bit about Makefile. Just delete the offending algo's source file from Makefile.am and delete the algo registration in algo-gate.c.

This is effective of only one or two algos cause problems and can determne if the core code works on MAC.

JayDDee commented 5 years ago

I don't like to leave this open if nothing is going on. I'm willing to help as I can but the leg work has to be done by a MAC user with some technical skills. And that's not me.

If no one steps up I'm just going to close the issue..

Tomcatt commented 5 years ago

I can go so far when it comes to compiling. I can do what I can and google the rest

JayDDee commented 5 years ago

@Tomcatt

If you're willing to post your compile errors when you get stuck I can have al ook at them, as well as anyone else reading, and provide input.

As always please provide commands executed, and the fist warnings and errors. Also please mention any code changes you may have made, if you are so adventurous.

I expect there will be algos that just won't compile but I hope the core code can. It may be necessary to remove problem algos to move forward. It's fairly simple:

Tomcatt commented 5 years ago

Yeah sure, I'll send you what errors I'll receive. UPDATE:

cpu-miner.c:39:10: fatal error: 'openssl/sha.h' file not found

include <openssl/sha.h>

     ^~~~~~~~~~~~~~~

algo-gate-api.c:18:10: fatal error: 'openssl/sha.h' file not found

include <openssl/sha.h>

     ^~~~~~~~~~~~~~~

api.c:30:10: fatal error: 'openssl/sha.h' file not found

include <openssl/sha.h>

     ^~~~~~~~~~~~~~~

1 error generated. make[2]: [cpuminer-api.o] Error 1 make[2]: Waiting for unfinished jobs.... mv -f .deps/cpuminer-sysinfos.Tpo .deps/cpuminer-sysinfos.Po 1 error generated. make[2]: [cpuminer-cpu-miner.o] Error 1 1 error generated. make[2]: [cpuminer-algo-gate-api.o] Error 1 make[1]: [all-recursive] Error 1 make: [all] Error 2

I've installed brew and I have openssl install but not sure how to get it to look at it unless I need to github that old version of openssl 1.0 (common problem I run across with wallets.)

JayDDee commented 5 years ago

You need openssl installed. I don't know how to do this but it could be a recurring theme. Expect to see more errors for files or symbols not found. The error mesage should give a hint what package is missing. You should refer to the compile instructions for a list of likely missing packages. Whether all of them are available on MAC is a different question.

Edit: When you look for packages look specifically for the development version. Some packages are split with seperate run time, and development versions. If there's no seperate dev package the dev files may be included in the main package.

Tomcatt commented 5 years ago

Okay, got passed the openssl error. New problem:

In file included from algo/argon2/argon2a/ar2/ar2-scrypt-jane.c:17: In file included from algo/argon2/argon2a/ar2/sj/scrypt-jane-portable.h:306: algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:313:3: error: unknown token in expression a2(mov [%1 + 0], eax) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:185:19: note: expanded from macro 'a2'

define a2(x, y) GNU_AS2(x, y)

                     ^

algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:178:24: note: expanded from macro 'GNU_AS2'

define GNU_AS2(x, y) #x ", " #y ";\n"

                          ^
:487:2: note: expanded from here "mov [%1 + 0]" ^ :5:6: note: instantiated into assembly here mov [%rsi + 0], eax; ^ In file included from algo/argon2/argon2a/ar2/ar2-scrypt-jane.c:17: In file included from algo/argon2/argon2a/ar2/sj/scrypt-jane-portable.h:306: algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:314:3: error: unknown token in expression a2(mov [%1 + 4], ebx) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:185:19: note: expanded from macro 'a2' #define a2(x, y) GNU_AS2(x, y) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:178:24: note: expanded from macro 'GNU_AS2' #define GNU_AS2(x, y) #x ", " #y ";\n" ^ :489:2: note: expanded from here "mov [%1 + 4]" ^ :6:6: note: instantiated into assembly here mov [%rsi + 4], ebx; ^ In file included from algo/argon2/argon2a/ar2/ar2-scrypt-jane.c:17: In file included from algo/argon2/argon2a/ar2/sj/scrypt-jane-portable.h:306: algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:315:3: error: unknown token in expression a2(mov [%1 + 8], ecx) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:185:19: note: expanded from macro 'a2' #define a2(x, y) GNU_AS2(x, y) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:178:24: note: expanded from macro 'GNU_AS2' #define GNU_AS2(x, y) #x ", " #y ";\n" ^ :3:2: note: expanded from here "mov [%1 + 8]" ^ :7:6: note: instantiated into assembly here mov [%rsi + 8], ecx; ^ In file included from algo/argon2/argon2a/ar2/ar2-scrypt-jane.c:17: In file included from algo/argon2/argon2a/ar2/sj/scrypt-jane-portable.h:306: algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:316:3: error: unknown token in expression a2(mov [%1 + 12], edx) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:185:19: note: expanded from macro 'a2' #define a2(x, y) GNU_AS2(x, y) ^ algo/argon2/argon2a/ar2/sj/scrypt-jane-portable-x86.h:178:24: note: expanded from macro 'GNU_AS2' #define GNU_AS2(x, y) #x ", " #y ";\n" ^ :5:2: note: expanded from here "mov [%1 + 12]" ^ :8:6: note: instantiated into assembly here mov [%rsi + 12], edx; ^ 1 warning and 4 errors generated. make[2]: *** [algo/argon2/argon2a/ar2/cpuminer-ar2-scrypt-jane.o] Error 1 make[2]: *** Waiting for unfinished jobs.... mv -f algo/blake/.deps/cpuminer-blake2b.Tpo algo/blake/.deps/cpuminer-blake2b.Po mv -f algo/blake/.deps/cpuminer-blake2s.Tpo algo/blake/.deps/cpuminer-blake2s.Po mv -f algo/blake/.deps/cpuminer-blake2s-gate.Tpo algo/blake/.deps/cpuminer-blake2s-gate.Po mv -f algo/argon2/argon2d/argon2d/.deps/cpuminer-opt.Tpo algo/argon2/argon2d/argon2d/.deps/cpuminer-opt.Po mv -f algo/blake/.deps/cpuminer-blake2s-4way.Tpo algo/blake/.deps/cpuminer-blake2s-4way.Po mv -f algo/argon2/argon2a/ar2/.deps/cpuminer-opt.Tpo algo/argon2/argon2a/ar2/.deps/cpuminer-opt.Po mv -f algo/blake/.deps/cpuminer-sph-blake2s.Tpo algo/blake/.deps/cpuminer-sph-blake2s.Po mv -f algo/blake/.deps/cpuminer-blakecoin-gate.Tpo algo/blake/.deps/cpuminer-blakecoin-gate.Po mv -f algo/blake/.deps/cpuminer-blakecoin-4way.Tpo algo/blake/.deps/cpuminer-blakecoin-4way.Po mv -f algo/blake/.deps/cpuminer-blakecoin.Tpo algo/blake/.deps/cpuminer-blakecoin.Po mv -f algo/blake/.deps/cpuminer-mod_blakecoin.Tpo algo/blake/.deps/cpuminer-mod_blakecoin.Po 1 warning generated. mv -f .deps/cpuminer-cpu-miner.Tpo .deps/cpuminer-cpu-miner.Po mv -f algo/blake/.deps/cpuminer-decred-gate.Tpo algo/blake/.deps/cpuminer-decred-gate.Po mv -f algo/blake/.deps/cpuminer-sph_blake.Tpo algo/blake/.deps/cpuminer-sph_blake.Po mv -f crypto/.deps/cpuminer-c_skein.Tpo crypto/.deps/cpuminer-c_skein.Po make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
JayDDee commented 5 years ago

That one will require surgery, that algo must be removed. Fortunately it's simple to remove an algo To remove argon2a:

delete the algo folder: rm -rf algo/argon2/argon2a Be careful don't delete argon2d (yet).

Edit algo-gate-api.c and delete or coment out the call to register argon2.

 case ALGO_ALLIUM:       register_allium_algo       ( gate ); break;
 case ALGO_ANIME:        register_anime_algo        ( gate ); break;

// case ALGO_ARGON2: register_argon2_algo ( gate ); break; case ALGO_ARGON2D250: register_argon2d_crds_algo ( gate ); break; case ALGO_ARGON2D500: register_argon2d_dyn_algo ( gate ); break; case ALGO_ARGON2D4096: register_argon2d4096_algo ( gate ); break; case ALGO_AXIOM: register_axiom_algo ( gate ); break;

Edit Makefile.am and delete all references to files in algo/argon2/argon2a

Do a clean compile.

Edit: formatting is messed up, can't seem to get it straight.

JayDDee commented 5 years ago

It looks like this has stalled, I guess it's too much work. It is going to be an iterative task installing missing packages, fixing or culling problem algos, repeat.

Last call, it's closing time.

JayDDee commented 5 years ago

Goodnight.