Yes, performance!!! Compiling my own primeminer i got a 5% performance improvement (tnx to gmp optimizations)!!
Anyway any donation is welcome!! (I may be persuaded to create an automatic installer )
AGgPQKp7YAau1zUZqf6Pxqr3dnqoEqyBCm
1. Prepare your build system.
1.1 Install msys:
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
Leave default location (C:\MinGW)
move to C:\MinGW\bin and run mingw-get
Select "basic setup -> msys-base package"
and "All Packages -> msys-m4".
Then click on Installation -> Apply Changes.
1.2 Install Perl:
http://downloads.activestate.com/ActivePerl/releases/5.18.1.1800/ActivePerl-5.18.1.1800-MSWin32-x86-64int-297570.msi
Run installer and exclude Perl Script, PPM, documentation and examples if you don't need them for other purposes.
1.3 Install Python:
http://www.python.org/ftp/python/3.3.2/python-3.3.2.amd64.msi
Leave defaults values.
1.4 Install GCC from mingw-builds:
Download http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-posix/dwarf/x32-4.8.1-release-posix-dwarf-rev5.7z/download
Then unpack it in C: (you will obtain a C:\mingw32 folder)
1.5. Ensure that mingw-builds, Perl and Python bin folders are set in your PATH environment variable.
Open cmd and write
SET PATH=%PATH%;"C:\Perl\bin"
SET PATH=%PATH%;"C:\mingw32\bin"
SET PATH=%PATH%;"C:\Pyton33"
2. Download, unpack and build required dependencies.
Create a new folder: C:\deps\
All file downloaded in that session have to be placed there.
2.1 OpenSSL: http://www.openssl.org/source/openssl-1.0.1c.tar.gz
From a MinGw shell (C:\MinGW\msys\1.0\msys.bat), unpack the source archive with tar then configure and make:
tar xvfz openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./config
make
2.2 Berkeley DB: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
From a MinGW shell unpack the source archive, configure, edit line 113 of db.h then make:
tar xvfz db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --disable-replication --enable-mingw --enable-cxx
after configuring make sure to edit your C:\deps\db-4.8.30.NC\build_unix\db.h by replacing line 113:
now you can:
make install
2.3 Boost: http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download
From a MinGW shell unpack the source archive, then bootstrap and compile from a Windows command prompt:
tar xvfz boost_1_54_0.tar.gz
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc stage
This will compile the required boost libraries and put them into the stage folder (C:\deps\boost_1_54_0\stage).
2.4 Miniupnpc: http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz
From a MinGW shell unpack the source archive, then make
tar xvfz miniupnpc-1.8.tar.gz
2.5 GMP: https://gmplib.org/download/gmp/gmp-5.1.2.tar.xz
From a MinGW shell unpack the source archive, configure, make and install
tar xvfJ gmp-5.1.2.tar.xz
cd gmp-5.1.2
./configure --prefix=/c/deps/gmp/ --enable-cxx --with-gnu-ld
make
make install
3. Download Primecoin miner for beeeeer.org from git, compile leveldb then compile primeminer https://github.com/thbaumbach/primecoin/archive/master.zip (specific build version of that guide here, rename that zip into master.zip)
Leveldb libraries will not compile automatically so we'll need to compile them first.
3.1 Extract master.zip (for example to C:\) then start MinGW shell and change into leveldb folder:
TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a
3.2 Now with a texteditor edit BOOST_SUFFIX, INCLUDEPATHS and LIBPATHS in your C:\master\src\makefile.mingw according to your dependencies location and correct $(CURDIR) error:
INCLUDEPATHS= \
-I"$(CURDIR)" \
-I"c:/deps/boost_1_54_0" \
-I"C:/deps/db-4.8.30.NC/build_unix" \
-I"c:/deps/openssl-1.0.1c/include" \
-I"c:/deps/gmp/include"
LIBPATHS= \
-L"$(CURDIR)/leveldb" \
-L"c:/deps/boost_1_54_0/stage/lib" \
-L"C:/deps/db-4.8.30.NC/build_unix" \
-L"c:/deps/openssl-1.0.1c"
-L"c:/deps/gmp/lib"
Then in the same file also add quotes as in the code
# LevelDB support
#
DEFS += $(addprefix -I,"$(CURDIR)/leveldb/include")
DEFS += $(addprefix -I,"$(CURDIR)/leveldb/helpers")
3.3 net.cpp will need to be patched in order to compile with gcc 4.8.1:
Fix invalid conversion error with MinGW 4.8.1 in net.cpp
Open C:\master\src\net.cpp and edit those lines
search for
setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&nOne, sizeof(int));
#else
setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int));
#endif
3.4 Compile everything and create your .exe
From a Windows command prompt run:
mingw32-make -f makefile.mingw
strip primeminer.exe
The program is ready to be used!!
4. Launch the program and profit!