Git Product home page Git Product logo

Comments (8)

 avatar commented on July 23, 2024

btw - compiling with a fresh dump of the repo taken from 10:40am PST 1/16/2014 - the compile errors are now as follows:

sgminer-sgminer.o:sgminer.c:(.text+0x11b35): undefined reference to `llround'
sgminer-sgminer.o:sgminer.c:(.text+0x1cc48): undefined reference to `timeEndPeriod'
sgminer-sgminer.o:sgminer.c:(.text+0x1ef04): undefined reference to `timeBeginPeriod'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: sgminer-sgminer.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [sgminer.exe] Error 1
make[2]: Leaving directory `/home/Mike/sgminer-master'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Mike/sgminer-master'
make: *** [all] Error 2

from sgminer.

Drogean avatar Drogean commented on July 23, 2024

Hey folks,

I was able to compile a build successfully so I'll go over a tidbit that helped me.

First, do NOT use the latest version of MingW. The way i got it to work was to go through the Windows_Build txt file on CgMiner 3.7.2 and install the EXACT version of MingW listed (google search mingw-get-inst-20120426 and install only that).

I'd say 95% of the errors can be resolved by removing the latest version, installing the older one listed, and starting from scratch.

Also, when downloading the "PKG-CONFIG" files, make sure you chooser Version 2 because you'll notice Version 3(latest) does not have a DEV package download.

I have created a fork of the directions here πŸ‘
https://github.com/Drogean/sgminer/blob/b1de4c896b7719cde70d33d90cb2d44f03790956/doc/windows-build.txt

from sgminer.

veox avatar veox commented on July 23, 2024

Merged.

from sgminer.

tonobitc avatar tonobitc commented on July 23, 2024

This issue is caused by the use of -D WIN32_LEAN_AND_MEAN

from sgminer.

tonobitc avatar tonobitc commented on July 23, 2024

The fix for the winsock issue can also be resolved by including winsock2.h before windows.h
credit goes to Bufius the vertminer author for figuring it out.

Here is the error:
mingw\include\ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead."

from sgminer.

veox avatar veox commented on July 23, 2024

@tonobitc this has been merged with your pull request some time ago.

@ninjitsu is it still present?

from sgminer.

veox avatar veox commented on July 23, 2024

No further input, seems fixed. Reopen if necessary.

from sgminer.

jayanh avatar jayanh commented on July 23, 2024

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 <winsock2.h> after is unsupported."
#error "Including <winsock2.h> after <winsock.h> 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

from sgminer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.