lucasjones / cpuminer-multi

Multi-algo CPUMiner & Reference Cryptonote Miner (JSON-RPC 2.0)
Other
634 stars 1.49k forks source link

Compile Error #25

Open nikhiljha opened 8 years ago

nikhiljha commented 8 years ago
In file included from miner.h:9:0,
                 from cpu-miner.c:42:
c:\mingw\include\pthread.h:320:8: error: redefinition of 'struct timespec'
 struct timespec {
        ^
In file included from c:\mingw\include\unistd.h:96:0,
                 from cpu-miner.c:19:
c:\mingw\include\parts\time.h:105:8: note: originally defined here
 struct timespec
        ^
cpu-miner.c: In function 'miner_thread':
cpu-miner.c:1061:70: error: 'MEM_LARGE_PAGES' undeclared (first use in this function)
   persistentctx = VirtualAlloc(NULL, sizeof(struct cryptonight_ctx), MEM_LARGE_PAGES, PAGE_READWRITE);
                                                                      ^
cpu-miner.c:1061:70: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [minerd-cpu-miner.o] Error 1

Not sure what this means

nikhiljha commented 8 years ago

I added the -D-HAVE-TIMESPECS flag. (by the way I'm on Mingw for windows 32 bit.)

Now I have this error:

 || echo './'`cpu-miner.c
cpu-miner.c: In function 'miner_thread':
cpu-miner.c:1061:70: error: 'MEM_LARGE_PAGES' undeclared (first use in this function)
   persistentctx = VirtualAlloc(NULL, sizeof(struct cryptonight_ctx), MEM_LARGE_PAGES, PAGE_READWRITE);
nikhiljha commented 8 years ago

Messed around with it some more and now I have

cpu-miner.c: In function ‘miner_thread’:
cpu-miner.c:1056:139: error: ‘MAP_HUGETLB’ undeclared (first use in this function)
   persistentctx = (struct cryptonight_ctx *)mmap(0, sizeof(struct cryptonight_ctx), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
                                                                                                                                           ^
cpu-miner.c:1056:139: note: each undeclared identifier is reported only once for each function it appears in
cpu-miner.c:1056:153: error: ‘MAP_POPULATE’ undeclared (first use in this function)
   persistentctx = (struct cryptonight_ctx *)mmap(0, sizeof(struct cryptonight_ctx), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0);
                                                                                                                                                         ^
cpu-miner.c:1058:88: error: ‘MADV_HUGEPAGE’ undeclared (first use in this function)
   madvise(persistentctx, sizeof(struct cryptonight_ctx), MADV_RANDOM | MADV_WILLNEED | MADV_HUGEPAGE);