lucasjones / cpuminer-multi

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

error building in raspberry pi #18

Closed ghost closed 7 years ago

ghost commented 9 years ago

can't build from git in Raspberry Pi. make error: " cpu-miner.c: In function ‘main’: cpu-miner.c:1822:2: error: impossible constraint in ‘asm’ "

running same version on amd64, no problems.

ghost commented 9 years ago

Getting the same on a CuBox-i4Pro

Linux i4p 3.14.40-2-ARCH #1 SMP Fri May 1 03:42:08 MDT 2015 armv7l GNU/Linux
gcc -std=gnu99 -Ofast -flto -fuse-linker-plugin  -march=native -mfpu=neon -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   minerd-sha2-arm.o minerd-scrypt-arm.o -lcurl -ljansson -lpthread  -lcrypto 
cpu-miner.c: In function ‘main’:
cpu-miner.c:1822:2: error: impossible constraint in ‘asm’
  asm volatile("cpuid":"=a"(*where),"=b"(*(where+1)),
  ^
lto-wrapper: gcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:620: recipe for target 'minerd' failed
make[2]: *** [minerd] Error 1
make[2]: Leaving directory '/home/jason/tmp/cpuminer-multi'
Makefile:1449: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jason/tmp/cpuminer-multi'
Makefile:462: recipe for target 'all' failed
make: *** [all] Error 2
mcbiv commented 9 years ago

Same zee's for A10 Cubieboard..

Linux Cubian 3.4.79-sun4i #27 PREEMPT Fri Oct 10 03:12:28 CST 2014 armv7l GNU/Linux

cpu-miner.c: In function ‘main’: cpu-miner.c:1822: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: lto-wrapper failed collect2: error: ld returned 1 exit status Makefile:620: recipe for target 'minerd' failed make[2]: * [minerd] Error 1 make[2]: Leaving directory '/opt/cpuminer-multi' Makefile:1449: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/opt/cpuminer-multi' Makefile:462: recipe for target 'all' failed make: *\ [all] Error 2

lucasjones commented 9 years ago

I just pushed a30e5cc, which should fix the error. The latest master compiles for me on a Raspberry Pi.

mcbiv commented 9 years ago

Oh,

Sweet i will give it a try on the cube board which i believe has the same A10 chip as a Raspberry Pi. I also just today got an A80 SBC and will try it on that as well. Thanks for pushing an update so quickly and if there is any issues i will send you a “bug” report if you would like.

Marcus On Aug 6, 2015, at 9:15 AM, Lucas Jones notifications@github.com<mailto:notifications@github.com> wrote:

I just pushed a30e5cchttps://github.com/lucasjones/cpuminer-multi/commit/a30e5cc062be863bdacb5babadd33e72d0679dbf, which should fix the error. The latest master compiles for me on a Raspberry Pi.

— Reply to this email directly or view it on GitHubhttps://github.com/lucasjones/cpuminer-multi/issues/18#issuecomment-128424105.

mcbiv commented 9 years ago

Hello,

Program compiles sucessfully on CubieBoard 1 but for some reason i can not get the —config=FILE option to load any JSON formatted configuration file including the provided example-cfg.json file. Maybe i am doing something wrong but program seems to work well other than that on the A10 and is faster than i thought it would be. Good job on optimization, i will try it out on the 8 core A80 sbc this evening…

Thanks for a quick update and again great work here…

MCBIV On Aug 6, 2015, at 9:15 AM, Lucas Jones notifications@github.com<mailto:notifications@github.com> wrote:

I just pushed a30e5cchttps://github.com/lucasjones/cpuminer-multi/commit/a30e5cc062be863bdacb5babadd33e72d0679dbf, which should fix the error. The latest master compiles for me on a Raspberry Pi.

— Reply to this email directly or view it on GitHubhttps://github.com/lucasjones/cpuminer-multi/issues/18#issuecomment-128424105.

mcbiv commented 9 years ago

my bad —config=FILE working fine On Aug 6, 2015, at 9:15 AM, Lucas Jones notifications@github.com<mailto:notifications@github.com> wrote:

I just pushed a30e5cchttps://github.com/lucasjones/cpuminer-multi/commit/a30e5cc062be863bdacb5babadd33e72d0679dbf, which should fix the error. The latest master compiles for me on a Raspberry Pi.

— Reply to this email directly or view it on GitHubhttps://github.com/lucasjones/cpuminer-multi/issues/18#issuecomment-128424105.

ghost commented 7 years ago

All good! Thx lucasjones