genesismining / sgminer-gm

A multi-algo GPU miner
GNU General Public License v3.0
340 stars 146 forks source link

Error when build sgminer-gm on ARM #139

Open Zenitur opened 6 years ago

Zenitur commented 6 years ago

algorithm/cryptonight.c says:

algorithm/cryptonight.c: In function ‘cryptonight’:
algorithm/cryptonight.c:159:2: error: impossible constraint in ‘asm’
  __asm__("mul %%rdx":
  ^~~~~~~

OS: Debian 9 "Stretch" Hardware: Raspberry Pi 3 with OpenCL support

manfire commented 6 years ago

yes, you cannont execute asm code on arm.... you need to modify the code

maxibelino commented 6 years ago

hi, @manfire , how do you do that? thanks!

Zenitur commented 6 years ago

I'd tried to compile cgminer 3.7.2 on Raspberry Pi. It was successfully compiled. When I tried to start it (with scrypt algo), it didn't show any hashrate and results, but GPU temperature rises. After few hours, the program stopped to work and shutdown.

I'd used nightly build of VC4CL, because there is no one stable release at this moment.

maxibelino commented 6 years ago

@Zenitur ...this would connect to a remote node? i don't realize how would it download all the blockchain into the RPi (more than 40 GBytes) Sorry, but i also don't know what is VC4CL....

Zenitur commented 6 years ago

maxibelino, you don't need to download all the blockchain. Did you know what is a mining pool?

maxibelino commented 6 years ago

yes you attach to a mining pool to mine "in group" and share profits

jayanh commented 6 years ago

Hi! i compile sgminer on windows and got this issue

Does anyone know how to solve, please help

c:\mingw\include\ws2tcpip.h:16:2: error: #error "ws2tcpip.h is not compatible wi th winsock.h. Include winsock2.h instead."

error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead

." ^~~~~ In file included from c:\mingw\include\ws2tcpip.h:19:0, from util.h:32, from miner.h:29, from compat.h:12, from api.c:28: c:\mingw\include\winsock2.h:49:2: error: #error "Including after is unsupported."

error "Including after is unsupported."

^~~~~ c:\mingw\include\winsock2.h:50:2: warning: #warning "Falling back to WinSock v1. 1 protocol." [-Wcpp]

warning "Falling back to WinSock v1.1 protocol."

^~~ In file included from util.h:32:0, from miner.h:29, from compat.h:12, from api.c:28: c:\mingw\include\ws2tcpip.h:124:8: error: redefinition of 'struct ip_mreq' struct ip_mreq { ^~~ In file included from c:\mingw\include\ptw32_errno.h:176:0, from c:\mingw\include_ptw32.h:157, from c:\mingw\include\pthread.h:76, from compat.h:9, from api.c:28: c:\mingw\include\winsock.h:411:8: note: originally defined here struct ip_mreq ^~~ In file included from util.h:32:0, from miner.h:29, from compat.h:12, from api.c:28: c:\mingw\include\ws2tcpip.h:298:13: error: expected '=', ',', ';', 'asm' or 'a ttribute' before 'freeaddrinfo' void WSAAPI freeaddrinfo (struct addrinfo); ^~~~ c:\mingw\include\ws2tcpip.h:299:12: error: expected '=', ',', ';', 'asm' or 'a ttribute' before 'getaddrinfo' int WSAAPI getaddrinfo (const char,const char,const struct addrinfo, ^~~ c:\mingw\include\ws2tcpip.h:301:12: error: expected '=', ',', ';', 'asm' or 'a ttribute' before 'getnameinfo' int WSAAPI getnameinfo(const struct sockaddr,socklen_t,char,DWORD, ^~~ make[2]: [sgminer-api.o] Error 1 make[2]: Leaving directory /home/Administrator/sgminer' make[1]: [all-recursive] Error 1 make[1]: Leaving directory/home/Administrator/sgminer' make: *** [all] Error 2