cpuminer-multi
cpuminer-multi copied to clipboard
./configure and Make Issue
In my Mac i had to autoconf to run the configure, but after that it shows:
./configure: line 5688: syntax error near unexpected token `,'
./configure: line 5688: `LIBCURL_CHECK_CONFIG(, 7.15.2, ,'
Comment out lines 5688 and 5689
Hi, the issues where way more complicated, did some digging and found some fixes, first, for the autoreconf -i in the configure.ac i had chaged this:
line 130 [AC_MSG_ERROR([Missing required libcurl >= 7.15.2])])
to this AC_MSG_ERROR([Missing required libcurl >= 7.15.2]))
It showed this error, but worked: Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
And after commenting out lines 5688 and 5689 ./configure CFLAGS="-march=native" the configure worked but make did not:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in compat
make[3]: Nothing to be done for ``all-am'. gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing @LIBCURL_CPPFLAGS@ -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-cpu-miner.o -MD -MP -MF .deps/minerd-cpu-miner.Tpo -c -o minerd-cpu-miner.o
test -f 'cpu-miner.c' || echo './'cpu-miner.c clang: error: no such file or directory: '@LIBCURL_CPPFLAGS@' clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument]
make[2]: *** [minerd-cpu-miner.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Oh forgot you need to edit your Makefile and replace @LIBCURL_CPPFLAGS with -lcurl as seen in this example: https://gist.github.com/DarrenRainey/ddcb8c3c2b786ee6d0444a9ceba45508#file-cpuminer-multi-makefile-fix-eample-L446
Replace the @LIBCURL stuff on Lines 446 and 447 and with -lcurl and it should compile.
I replaced but got some other errors:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in compat
make[3]: Nothing to be done for all-am'. gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-cpu-miner.o -MD -MP -MF .deps/minerd-cpu-miner.Tpo -c -o minerd-cpu-miner.o
test -f 'cpu-miner.c' || echo './'cpu-miner.c clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument] clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument] cpu-miner.c:425:22: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] if (!hex2bin(blob, hexblob, blobLen / 2)) { ^~~~ ./miner.h:241:36: note: passing argument to parameter 'p' here extern bool hex2bin(unsigned char *p, const char *hexstr, size_t len); ^ cpu-miner.c:608:37: warning: passing 'char [32]' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] char *hashhex = bin2hex(hash, 32); ^~~~ ./miner.h:240:43: note: passing argument to parameter 'p' here extern char *bin2hex(const unsigned char *p, size_t len); ^ cpu-miner.c:641:37: warning: passing 'char [32]' to parameter of type 'const unsigned char *' converts between pointers to integer types with different sign [-Wpointer-sign] char *hashhex = bin2hex(hash, 32); ^~~~ ./miner.h:240:43: note: passing argument to parameter 'p' here extern char *bin2hex(const unsigned char *p, size_t len); ^ 3 warnings generated. mv -f .deps/minerd-cpu-miner.Tpo .deps/minerd-cpu-miner.Po gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-util.o -MD -MP -MF .deps/minerd-util.Tpo -c -o minerd-util.o
test -f 'util.c' || echo './'util.c clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument] clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument] mv -f .deps/minerd-util.Tpo .deps/minerd-util.Po gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-sha2.o -MD -MP -MF .deps/minerd-sha2.Tpo -c -o minerd-sha2.o
test -f 'sha2.c' || echo './'sha2.c clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument] clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument] mv -f .deps/minerd-sha2.Tpo .deps/minerd-sha2.Po gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-scrypt.o -MD -MP -MF .deps/minerd-scrypt.Tpo -c -o minerd-scrypt.o
test -f 'scrypt.c' || echo './'scrypt.c clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument] clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument] mv -f .deps/minerd-scrypt.Tpo .deps/minerd-scrypt.Po gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-keccak.o -MD -MP -MF .deps/minerd-keccak.Tpo -c -o minerd-keccak.o
test -f 'keccak.c' || echo './'keccak.c clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument] clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument] mv -f .deps/minerd-keccak.Tpo .deps/minerd-keccak.Po gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -lcurl -Ofast -flto -fuse-linker-plugin -march=native -MT minerd-heavy.o -MD -MP -MF .deps/minerd-heavy.Tpo -c -o minerd-heavy.o
test -f 'heavy.c' || echo './'`heavy.c
clang: warning: -lcurl: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: optimization flag '-fuse-linker-plugin' is not supported [-Wignored-optimization-argument]
heavy.c:2:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
^~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [minerd-heavy.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
This line : "heavy.c:2:10: fatal error: 'openssl/sha.h' file not found" means you need to install openssl-dev