Author Topic: MMCPool compile  (Read 12718 times)

0 Members and 1 Guest are viewing this topic.

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Yes! That's fixed it. Phew! I hate configuration. Much thanks for all your help.

Going to bundle it all together with the wallet now - should be able to offer pool mining direct from the GUI now. :)
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Thanks. I think it's because I'm running it without the required .dlls - I'll see if I can add those and hopefully that'll sort it out
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline ig0tik3d

  • Full Member
  • ***
  • Posts: 50
    • View Profile
i compiled with flags "-O3 -march=corei7-avx -maes"
./configure CFLAGS="-O3 -march=corei7-avx -maes"
« Last Edit: December 28, 2013, 01:41:21 am by ig0tik3d »

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
hmm - so looks like yours is compiling with AES-NI support. But I'm getting .5 has per min on 8 threads on i7 4770 - so pretty sure mine isn't!
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline ig0tik3d

  • Full Member
  • ***
  • Posts: 50
    • View Profile
i7-3770 with aes support
miner32 - 1.75 (4 threads)
miner64 - 1.80 (4 threads)
wallet32- 1,72 (4 threads)
hm.. on my test pc i dont see any difference ... 64 bit version miner a little faster ... miner32 and wallet the same speed....


Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
or try compile 64 bit version...


Hmm, would rather get a lowest-common-denominator install (32bit) for distribution with the wallet. I don't think 64bit makes that much performance difference for this algorithm, so not so worried about that. But the AES-NI instructions are key.

Not finding any of the -mtune -maes options work. Weird because the GUI wallet solo mines with AES-NI quite happily, and that's 32bit.
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline ig0tik3d

  • Full Member
  • ***
  • Posts: 50
    • View Profile
or try compile 64 bit version...

1. mingw64
Download MinGW64 from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
 Choose mingw-w64-bin_i686-mingw_20111220.zip
 Extract ZIP to C:\MinGW64
 Add C:\MinGW64\bin to your path before C:\MinGW\bin

2.curl
Code: [Select]
cd /c/deps
tar -xvzf curl-7.30.0.tar.gz
cd curl-7.30.0
./configure --host=x86_64-w64-mingw32 –-prefix=/c/mingw64
make
make install
cp /c/deps/curl-7.30.0/docs/libcurl/libcurl.m4 /c/mingw/share/aclocal/libcurl.m4


3. Install pthreads
download pthreads-20100604.zip from http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/pthreads/ and put it in C:\deps\
 unzip the file to c:\deps\
 In the mingw64 subdirectory is pthreads-w64.zip - extract the contents to C:\MinGW64

4.openssl
Code: [Select]
cd /c/deps
tar xvzf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
CROSS_COMPILE="x86_64-w64-mingw32-" ./Configure mingw64  shared --prefix=/c/mingw64
make
make install

5.compile source
Code: [Select]
./autogen.sh
./configure --host=x86_64-w64-mingw32 CFLAGS="-O3 (flags what you need)"
make
x86_64-w64-mingw32-strip minerd.exe

« Last Edit: December 28, 2013, 12:34:08 am by ig0tik3d »


Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
MVTEcnoTrUAeYrd3yzXm3nd4S73yACDtMa

Many thanks. 200MMC on it's way.

Something I'm noticing is that the hashrate is very low (one sixth where it should be) when I run the .exe - looks like it is not using the AES-NI instructions. Missing a switch somewhere maybe?
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline ig0tik3d

  • Full Member
  • ***
  • Posts: 50
    • View Profile
MVTEcnoTrUAeYrd3yzXm3nd4S73yACDtMa 

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Wow. Thanks so much for your generosity in writing such a detailed guide. Can you post an MMC address for a tip?

One small addition - I get this error on compile,
minerd-cpu-miner.o:cpu-miner.c:(.text+0x6a5): undefined reference to `sleep'
minerd-cpu-miner.o:cpu-miner.c:(.text+0xaf6): undefined reference to `sleep'
minerd-cpu-miner.o:cpu-miner.c:(.text+0xc2f): undefined reference to `sleep'
minerd-cpu-miner.o:cpu-miner.c:(.text.startup+0x210): undefined reference to `sleep'

but it is easily fixed by following this advice -
http://stackoverflow.com/questions/8764295/undefined-reference-to-sleep-but-i-did-include-unistd-h

In cpu-miner.c

change

Code: [Select]
# include <unistd.h>
to

Code: [Select]
#ifdef __unix__
# include <unistd.h>
#elif defined _WIN32
# include <windows.h>
#define sleep(x) Sleep(1000 * x)
#endif

 
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline ig0tik3d

  • Full Member
  • ***
  • Posts: 50
    • View Profile
maybe someone will be need this information... how to build miner for mmcpool.com on windows (32-bit)...

1. Install MinGW and the MSYS Developer Tool Kit (http://www.mingw.org/)
Choose msys-base, myngw32-base,myngw32-gcc-g++  then apply changes
(check if set path in windows env. c:/mingw/bin)

2.Install libcurl
download curl-7.30.0.tar.gz from http://curl.haxx.se/download.html and put it in C:\deps\
in MSYS shell
Code: [Select]
cd /c/deps
tar -xvzf curl-7.30.0.tar.gz
cd curl-7.30.0
./configure –prefix=/c/mingw
make
make install
copy c:\deps\curl-7.30.0\docs\libcurl\libcurl.m4 c:\mingw\share\aclocal
copy c:\deps\curl-7.30.0\curl-config c:\mingw\bin

3.Install opensll
download  OpenSSL: http://www.openssl.org/source/openssl-1.0.1e.tar.gz and put it in C:\deps\
in MSYS shell
Code: [Select]
cd /c/deps
tar xvzf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./Configure --prefix=/c/mingw shared mingw
make
make install

4.Compile miner.
download source https://github.com/glitchman/mmcminer
extract in c:/deps
create folde m4 ... copy c:\deps\curl-7.30.0\docs\libcurl\libcurl.m4 c:\deps\mmcminer\m4
edit autogen.sh
change
Code: [Select]
aclocalto
Code: [Select]
aclocal -I m4
edit makefile.am
add
Code: [Select]
ACLOCAL_AMFLAGS = -I m4
change
Code: [Select]
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ to
Code: [Select]
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ -lssl -lcrypto

In the MSYS shell, navigate to the CPUminer source code directory
Code: [Select]
./autogen.sh
./configure CFLAGS="-O3 -msse2"
make
strip minerd.exe

copy minerd.exe, C:\MinGW\bin\libcurl-4.dll, and C:\MinGW\bin\pthreadGC2.dll to the same directory

enjoy.. ))







« Last Edit: December 27, 2013, 10:25:25 pm by ig0tik3d »

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
yes, from a security point of view that would be the way to go
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
mknsis file from what i can make out.

however, if you are just trying to bundle that with the QT, why not just use the pre-compiled version?

Because I didn't compile it!
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
yes, the paths are clearly not included. give me a minute


ok, so you'll have to manually add all the paths to your dependencies and libraries. they are not there.

Thanks. How would I go about doing that?

mknsis file from what i can make out.


however, if you are just trying to bundle that with the QT, why not just use the pre-compiled version?
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.