lucasjones / cpuminer-multi

Multi-algo CPUMiner & Reference Cryptonote Miner (JSON-RPC 2.0)
Other
638 stars 1.5k forks source link

Error of make![ARM CPU] #45

Open RESBI opened 7 years ago

RESBI commented 7 years ago

Wen i make this program on my PI,always this error.

root@resbi:~/srcs/xmr# make -j4 make all-recursive make[1]: Entering directory '/root/srcs/xmr' Making all in compat make[2]: Entering directory '/root/srcs/xmr/compat' make[3]: Entering directory '/root/srcs/xmr/compat' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/root/srcs/xmr/compat' make[2]: Leaving directory '/root/srcs/xmr/compat' make[2]: Entering directory '/root/srcs/xmr' gcc -Ofast -flto -fuse-linker-plugin -march=native -pthread -o minerd minerd-cpu-miner.o minerd-util.o minerd-sha2.o minerd-scrypt.o minerd-keccak.o minerd-heavy.o minerd-quark.o minerd-skein.o minerd-ink.o minerd-blake.o minerd-cryptonight.o minerd-fresh.o minerd-x11.o minerd-x13.o minerd-x14.o minerd-x15.o sha3/minerd-sph_keccak.o sha3/minerd-sph_hefty1.o sha3/minerd-sph_groestl.o sha3/minerd-sph_skein.o sha3/minerd-sph_bmw.o sha3/minerd-sph_jh.o sha3/minerd-sph_shavite.o sha3/minerd-sph_blake.o sha3/minerd-sph_luffa.o sha3/minerd-sph_cubehash.o sha3/minerd-sph_simd.o sha3/minerd-sph_echo.o sha3/minerd-sph_hamsi.o sha3/minerd-sph_fugue.o sha3/minerd-sph_shabal.o sha3/minerd-sph_whirlpool.o crypto/minerd-oaes_lib.o crypto/minerd-c_keccak.o crypto/minerd-c_groestl.o crypto/minerd-c_blake256.o crypto/minerd-c_jh.o crypto/minerd-c_skein.o crypto/minerd-hash.o crypto/minerd-aesb.o -L/usr/lib/aarch64-linux-gnu -lcurl -ljansson -lpthread -lcrypto cpu-miner.c: In function 'main': cpu-miner.c:1823:2: error: impossible constraint in 'asm' asm volatile("cpuid":"=a"(where),"=b"((where+1)), ^ lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Makefile:622: recipe for target 'minerd' failed make[2]: [minerd] Error 1 make[2]: Leaving directory '/root/srcs/xmr' Makefile:1466: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/srcs/xmr' Makefile:464: recipe for target 'all' failed make: *** [all] Error 2 root@resbi:~/srcs/xmr#

RESBI commented 7 years ago

When I make ”https://github.com/OhGodAPet/cpuminer-multi“ this one,always: make all-recursive make[1]: Entering directory '/root/srcs/cpuminer-multi' Making all in compat make[2]: Entering directory '/root/srcs/cpuminer-multi/compat' make[3]: Entering directory '/root/srcs/cpuminer-multi/compat' make[3]: Nothing to be done for 'all-am'. make[3]: Leaving directory '/root/srcs/cpuminer-multi/compat' make[2]: Leaving directory '/root/srcs/cpuminer-multi/compat' make[2]: Entering directory '/root/srcs/cpuminer-multi' gcc -DHAVE_CONFIG_H -I. -pthread -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16 -O2 -fno-strict-aliasing -march=native -MT minerd-cryptonight_lobotomized.o -MD -MP -MF .deps/minerd-cryptonight_lobotomized.Tpo -c -o minerd-cryptonight_lobotomized.o test -f 'cryptonight_lobotomized.c' || echo './'cryptonight_lobotomized.c In file included from cryptonight.h:6:0, from cryptonight_lobotomized.c:1: miner.h:188:58: warning: 'struct cryptonight_ctx' declared inside parameter list uint32_t max_nonce, unsigned long hashes_done, struct cryptonight_ctx persistentctx); ^ miner.h:188:58: warning: its scope is only this definition or declaration, which is probably not what you want cryptonight_lobotomized.c:2:23: fatal error: x86intrin.h: No such file or directory compilation terminated. Makefile:685: recipe for target 'minerd-cryptonight_lobotomized.o' failed make[2]: [minerd-cryptonight_lobotomized.o] Error 1 make[2]: Leaving directory '/root/srcs/cpuminer-multi' Makefile:776: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/srcs/cpuminer-multi' Makefile:420: recipe for target 'all' failed make: *** [all] Error 2 It says:”fatal error: x86intrin.h“ But I don't know how to install this lib.

0xAliNik commented 7 years ago

Architecture-specific notes: CryptoNight works only on x86 and x86-64.

use this https://github.com/lucasjones/cpuminer-multi for ARM.

ch155260 commented 7 years ago

When I make " https://github.com/lucasjones/cpuminer-multi " on my aarch64 system,get below error cpu-miner.c: In function &main*: cpu-miner.c:1823:2: error: impossible constraint in &asm* asm volatile("cpuid":"=a"(where),"=b"((where+1)), ^ lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Makefile:622: recipe for target 'minerd' failed make[2]: [minerd] Error 1 make[2]: Leaving directory '/root/cpuminer-multi' Makefile:1466: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/cpuminer-multi' Makefile:464: recipe for target 'all' failed make: *** [all] Error 2

My procedure as below: 1.git clone https://github.com/lucasjones/cpuminer-multi

  1. ./autogen.sh 3../configure CFLAGS="-march=native"

when I add -mfpu=neon to CFLAGS will get error as below: checking whether the C compiler works... no configure: error: in /root/cpuminer-multi': configure: error: C compiler cannot create executables Seeconfig.log' for more details

config.log: configure:3447: $? = 0 configure:3436: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:3447: $? = 1 configure:3436: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated. configure:3447: $? = 1 configure:3467: checking whether the C compiler works configure:3489: gcc -march=native -mfpu=neon conftest.c >&5 gcc: error: unrecognized command line option '-mfpu=neon' configure:3493: $? = 1 configure:3531: result: no configure: failed program was:

DarrenRainey commented 7 years ago

I've had the same problem as well but it seems to build a bit more if you just use ./configure

RESBI commented 7 years ago

@ch155260 Same problem with you!

why-what-how commented 7 years ago

I get same problem… Pine64 + ubuntu

tkinjo1985 commented 7 years ago

it worked Pine64+!

https://github.com/tkinjo1985/cpuminer-multi

joshuapinter commented 6 years ago

@tkinjo1985 Thanks for fixing that issue!

I tried this on a 96-core ARM server and it worked great. Just clone his git branch like so:

git clone https://github.com/tkinjo1985/cpuminer-multi.git

cd cpuminer-multi

./build.sh

If you're on Ubuntu/Debian, of course make sure you install the necessary packages:

apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

And then ./cpuminer --help

tkinjo1985 commented 6 years ago

@joshuapinter

I'm happy to have been able to help you out.