KL0nLutiy / sgminer-kl

GNU General Public License v3.0
19 stars 13 forks source link

failure to compile (unix) #18

Closed MaynardMiner closed 6 years ago

MaynardMiner commented 6 years ago

make[2]: Entering directory '/root/sgminer-kl/sph' CC bmw.o CC echo.o CC jh.o CC luffa.o CC simd.o CC blake.o CC cubehash.o CC groestl.o CC keccak.o CC shavite.o CC skein.o CC sha2.o CC sha2big.o CC fugue.o CC gost.o CC hamsi.o CC haval.o CC panama.o CC shabal.o CC whirlpool.o CC sha256_Y.o In file included from ../miner.h:17:0, from sha256_Y.c:35: ../algorithm.h:7:19: fatal error: CL/cl.h: No such file or directory compilation terminated. In file included from ../miner.h:17:0, from sha256_Y.c:35: ../algorithm.h:7:19: fatal error: CL/cl.h: No such file or directory compilation terminated. Makefile:538: recipe for target 'sha256_Y.o' failed make[2]: [sha256_Y.o] Error 1 make[2]: Leaving directory '/root/sgminer-kl/sph' Makefile:1923: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/sgminer-kl' Makefile:678: recipe for target 'all' failed make: *** [all] Error 2

MaynardMiner commented 6 years ago

../algorithm.h:7:19: fatal error: CL/cl.h: No such file or directory

I'm pretty sure that should be CL/ocl.h

I can' figure out where to edit to change that.

MaynardMiner commented 6 years ago

It's in aglorithm.h

I was wrong. I tried it.

MaynardMiner commented 6 years ago

root@AMD:~/sgminer-kl# find / -iname cl.h 2>/dev/null /opt/AMDAPPSDK-3.0/include/CL/cl.h

It looks like I have that file

MaynardMiner commented 6 years ago

sgminer.c:9374:4: warning: enumeration value ‘ALGO_CRE’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_SCRYPT’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_NSCRYPT’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_X11’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_X13’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_X14’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_X15’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_LYRA2Z’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_KECCAK’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_QUARK’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_TWE’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_FUGUE’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_NIST’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_FRESH’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_WHIRL’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_NEOSCRYPT’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_WHIRLPOOLX’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_LYRA2RE’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_LYRA2REV2’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_PLUCK’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_YESCRYPT’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_YESCRYPT_MULTI’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_BLAKECOIN’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_BLAKE’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_VANILLA’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_ETHASH’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_CRYPTONIGHT’ not handled in switch [-Wswitch] sgminer.c:9374:4: warning: enumeration value ‘ALGO_EQUIHASH’ not handled in switch [-Wswitch] sgminer.c: At top level: sgminer.c:262:13: warning: ‘test_pool’ declared ‘static’ but never defined [-Wunused-function] static bool test_pool(struct pool *pool); ^ sgminer.c: In function ‘main’: sgminer.c:9190:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(fd, &eth_nonce, 4); ^ sgminer.c:9191:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(fd, entropy, sizeof(entropy)); ^ Makefile:1026: recipe for target 'sgminer-sgminer.o' failed make[1]: [sgminer-sgminer.o] Error 1 make[1]: Leaving directory '/root/sgminer-kl' Makefile:1923: recipe for target 'install-recursive' failed make: [install-recursive] Error 1

I copied CL/cl.h to /usr/local/include (and all other files in ADMAPPSDK-3.0/include/)

It started to work, but then I got this.

MaynardMiner commented 6 years ago

FILE _iob[] = { stdin, stdout, stderr }; extern "C" FILE cdecl iob_func(void) { return _iob; }

-"stdin,stdout,*stderr" expression must have a constant value -"C" expected and identifier

Cannot be compiled as is because of this. Just thought you should know.

KL0nLutiy commented 6 years ago

@MaynardMiner, I will look on it.

MaynardMiner commented 6 years ago

It works fine when I remove those two lines from code, and well- So good job.

Quick question though, if you can help a newb:

Is there a way to compile a binary with flags that will generate an all-purpose binary for Unix? When I compile it, it compiles and works fine in my system, but when I pass it to another user and they try it, it fails.

I have been working on adding AMD to my profit-switching miner for HiveOS, and I can't seem to compile a binary that works for other users. It seems to only work with my system. I've compiled plenty of ccminers- I am new to AMD.

KL0nLutiy commented 6 years ago

I not shure why it is may not work, but if it not working, the other iser must to recompile it.

MaynardMiner commented 6 years ago

So should I design it then to compile in their rig, then?

I can do that.

It's just weird that avermore released binary is the only sgminer that seems to work on multiple user systems. All other ones I attempt to compile and add fail for anyone else but me.

geebeezzz1 commented 6 years ago

did you fix it?

i try to install it on smos with no success

MaynardMiner commented 6 years ago

remove these lines in sgminer.c

FILE _iob[] = { stdin, stdout, stderr }; extern "C" FILE cdecl iob_func(void) { return _iob; }

It will compile. I'm assuming he has them for visual basic...I'm guessing.

My repo has a version with the lines removed.

It's identical to his, just those lines are removed.