BitShares Forum
Other => Graveyard => MemoryCoin => Topic started by: FreeTrade on December 26, 2013, 03:41:05 am
-
I'm trying to compile MMCPool miner with a view to bundling it with the QT wallet and letting GUI users run it, preconfigured, from a menu option.
Running into this on configure . . . .
configure: error: OpenSSL headers required
How do I tell configure where to find my OpenSSL libs?
-
So I'm getting a little bit further by using -
CFLAGS="-O3 -march=native -mtune=native -IC:\deps\openssl-1.0.1e\include -LC:\deps\openssl-1.0.1e" CXXFLAGS="-O3 -march=native -mtune=native -IC:\deps\openssl-1.0.1e\include -LC:\deps\openssl-1.0.1e" ./configure
but getting to this error -
configure: WARNING: openssl/evp.h: accepted by the compiler, rejected by the pre
processor!
configure: WARNING: openssl/evp.h: proceeding with the compiler's result
checking for openssl/evp.h... yes
checking for SSL_library_init in -lssl... no
configure: error: OpenSSL library required
-
are you trying to compile on windows?
-
yes. Trying to compile with mingw32
-
configure trusts the pre-processor, as a result if it can't find the libraries, configure reports an error. ensure that your dependencies are correctly installed and the paths are written correctly.
CFLAGS="-O3 -march=native -mtune=native -IC:\deps\openssl-1.0.1e\include -LC:\deps\openssl-1.0.1e" CXXFLAGS="-O3 -march=native -mtune=native -IC:\deps\openssl-1.0.1e\include -LC:\deps\openssl-1.0.1e" ./configure
try removing what i crossed out and tell me what happens.
-
And show me your include_path(s) please
-
Thanks, but not getting anywhere without the switches -
$ CFLAGS="-O3 -march=native -mtune=native C:\deps\openssl-1.0.1e\include C:\dep
s\openssl-1.0.1e" CXXFLAGS="-O3 -march=native -mtune=native C:\deps\openssl-1.0
.1e\include C:\deps\openssl-1.0.1e" ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/c/mmcminer':
configure: error: C compiler cannot create executables
See `config.log' for more details
With switches . . .
$ CFLAGS="-O3 -march=native -mtune=native -IC:\deps\openssl-1.0.1e\include -LC:
\deps\openssl-1.0.1e" CXXFLAGS="-O3 -march=native -mtune=native -IC:\deps\opens
sl-1.0.1e\include -LC:\deps\openssl-1.0.1e" ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking syslog.h usability... no
checking syslog.h presence... no
checking for syslog.h... no
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking for json_loads in -ljansson... no
checking for pthread_create in -lpthread... yes
checking openssl/evp.h usability... yes
checking openssl/evp.h presence... no
configure: WARNING: openssl/evp.h: accepted by the compiler, rejected by the pre
processor!
configure: WARNING: openssl/evp.h: proceeding with the compiler's result
checking for openssl/evp.h... yes
checking for SSL_library_init in -lssl... no
configure: error: OpenSSL library required
-
And show me your include_path(s) please
I don't think I have one - quite possibly the problem. When compiling the QT client, I specify all the libs all in the .pro file.
-
ok, please post your config.log after using switches. It is essentially saying it is unable to either find or use your Openssl library, so we need to make it recognize it.
OPENSSL_INCLUDE_PATH=c:/deps/ssl/include
OPENSSL_LIB_PATH=c:/deps/ssl
is the typical path..
yours however is
C:\deps\openssl-1.0.1e\include
C:\deps\openssl-1.0.1e
so maybe you need to double check you .pro file if it matches with actual path names.
-
Is the code available somewhere?
-
OPENSSL_INCLUDE_PATH=c:/deps/ssl/include
OPENSSL_LIB_PATH=c:/deps/ssl
so maybe you need to double check you .pro file if it matches with actual path names.
So there is no .pro file . . . I don't know where to put those paths so that configure can find them . . .
here's the log -
http://pastebin.com/cmVr5R2h
Thanks for your help.
-
Is the code available somewhere?
Yes - source is here -
https://github.com/glitchman/mmcminer
This is the client side.
-
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.
-
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?
-
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?
-
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!
-
yes, from a security point of view that would be the way to go
-
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.. ))
-
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
-
MVTEcnoTrUAeYrd3yzXm3nd4S73yACDtMa
-
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?
-
http://stackoverflow.com/questions/19307909/how-do-i-enable-aes-ni-hardware-acceleration-for-node-js-crypto-on-linux
http://security.stackexchange.com/questions/11815/where-can-i-find-information-about-how-to-implement-intel-embedded-aes256-encryp
http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
if i dont wrong need additional flags -maes or -mtune
-
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
-
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.
-
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....
-
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!
-
i compiled with flags "-O3 -march=corei7-avx -maes"
./configure CFLAGS="-O3 -march=corei7-avx -maes"
-
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
-
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. :)