Main Menu

MMCPool compile

Started by FreeTrade, December 26, 2013, 03:41:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FreeTrade

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

FreeTrade

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

ig0tik3d

#27
i compiled with flags "-O3 -march=corei7-avx -maes"
./configure CFLAGS="-O3 -march=corei7-avx -maes"

FreeTrade

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

ig0tik3d

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....


FreeTrade

Quote from: ig0tik3d on December 27, 2013, 11:59:09 PM
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

ig0tik3d

#23
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
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
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
./autogen.sh
./configure --host=x86_64-w64-mingw32 CFLAGS="-O3 (flags what you need)"
make
x86_64-w64-mingw32-strip minerd.exe




FreeTrade

Quote from: ig0tik3d on December 27, 2013, 11:18:05 PM
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

ig0tik3d

MVTEcnoTrUAeYrd3yzXm3nd4S73yACDtMa 

FreeTrade

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

# include <unistd.h>

to

#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

ig0tik3d

#18
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

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

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
aclocal
to
aclocal -I m4

edit makefile.am
add
ACLOCAL_AMFLAGS = -I m4

change
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@
to
minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ -lssl -lcrypto


In the MSYS shell, navigate to the CPUminer source code directory

./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.. ))








barwizi

yes, from a security point of view that would be the way to go
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

FreeTrade

Quote from: barwizi on December 26, 2013, 09:42:21 PM
mknsis file from what i can make out.

Quote from: barwizi on December 26, 2013, 09:42:21 PM
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

barwizi

Quote from: FreeTrade on December 26, 2013, 08:19:52 PM
Quote from: barwizi on December 26, 2013, 11:13:02 AM
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.