nicehash / nheqminer

Equihash miner for NiceHash
https://www.nicehash.com
MIT License
768 stars 582 forks source link

ARM support request #200

Closed alexellis closed 7 years ago

alexellis commented 7 years ago

Could you support ARMv6 or ARMv7 even if it meant removing the optimizations in assembly.

I have a farm of Raspberry Pi 2 and 3 and can run almost any algorithm through CPUMiner, just not Equihash.

robertfoss commented 7 years ago

Adding a generic non-ASM equihash implementation should be pretty straight forward. After all it already exists in the mainline zcash implementation.

alexellis commented 7 years ago

I couldn't find the g++-multilib package for Raspbian, but yes an implementation would be great for ARM.

alexellis commented 7 years ago

Actually.. building overnight through my Dockerfile I got an error with g++ during build time. How did you manage to build zcash/zcash on ARM @robertfoss ?

g++: error: unrecognized command line option ‘-m64’
...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/thread.o...
gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o

    "g++" "-m64"  -ftemplate-depth-128 -fvisibility=hidden   -fPIC   -I/root/zcash/depends/x86_64-unknown-linux-gnu/include     -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG  -I"." -c -o "bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o" "libs/thread/src/pthread/once.cpp"

g++: error: unrecognized command line option ‘-m64’
...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o...
...skipped <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>pthread/thread.o...
...skipped <pstage/lib>libboost_thread-mt.a for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a...
...failed updating 49 targets...
...skipped 30 targets...
...updated 45 targets...
funcs.mk:238: recipe for target '/root/zcash/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-8100bd437b7/./.stamp_built' failed
make: Leaving directory '/root/zcash/depends'
make: *** [/root/zcash/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-8100bd437b7/./.stamp_built] Error 1
The command '/bin/sh -c ./zcutil/build.sh -j$(nproc)' returned a non-zero code: 2

Pi Dockerfile:

FROM resin/rpi-raspbian

RUN apt-get update -q && apt-get -qy install \  
      build-essential pkg-config libc6-dev m4 g++ \
      autoconf libtool ncurses-dev unzip git python \
      zlib1g-dev wget bsdmainutils automake

WORKDIR /root/  
RUN git clone https://github.com/zcash/zcash.git  
WORKDIR /root/zcash/  
RUN git checkout v1.0.0-rc4  
RUN ./zcutil/fetch-params.sh

RUN ./zcutil/build.sh -j$(nproc)  
robertfoss commented 7 years ago

https://forum.z.cash/t/announcing-zcash-1-0-2-for-arm64/8311

On Nov 16, 2016 4:01 AM, "Alex Ellis" notifications@github.com wrote:

Actually.. building overnight through my Dockerfile I got an error with g++ during build time. How did you manage to build zcash/zcash on ARM @robertfoss https://github.com/robertfoss ?

g++: error: unrecognized command line option ‘-m64’ ...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/thread.o... gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o

"g++" "-m64"  -ftemplate-depth-128 -fvisibility=hidden   -fPIC   -I/root/zcash/depends/x86_64-unknown-linux-gnu/include     -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG  -I"." -c -o "bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o" "libs/thread/src/pthread/once.cpp"

g++: error: unrecognized command line option ‘-m64’ ...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi/pthread/once.o... ...skipped <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>pthread/thread.o... ...skipped <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>pthread/thread.o... ...skipped <pstage/lib>libboost_thread-mt.a for lack of <pbin.v2/libs/thread/build/gcc-4.9.2/release/link-static/threading-multi>libboost_thread-mt.a... ...failed updating 49 targets... ...skipped 30 targets... ...updated 45 targets...funcs.mk:238: recipe for target '/root/zcash/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-8100bd437b7/./.stamp_built' failed make: Leaving directory '/root/zcash/depends' make: *\ [/root/zcash/depends/work/build/x86_64-unknown-linux-gnu/boost/1_62_0-8100bd437b7/./.stamp_built] Error 1 The command '/bin/sh -c ./zcutil/build.sh -j$(nproc)' returned a non-zero code: 2

Pi Dockerfile:

FROM resin/rpi-raspbian

RUN apt-get update -q && apt-get -qy install \ build-essential pkg-config libc6-dev m4 g++ \ autoconf libtool ncurses-dev unzip git python \ zlib1g-dev wget bsdmainutils automake

WORKDIR /root/ RUN git clone https://github.com/zcash/zcash.git WORKDIR /root/zcash/ RUN git checkout v1.0.0-rc4 RUN ./zcutil/fetch-params.sh

RUN ./zcutil/build.sh -j$(nproc)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nicehash/nheqminer/issues/200#issuecomment-260890598, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf7_Ha0Xgdrv16KXECbERg6GwWCvygNks5q-sZlgaJpZM4Kw0sY .

S74nk0 commented 7 years ago

@alexellis there is a fork from kost that has support for ARM (Raspberry PI). This fork is focused on CPU mining so this should do for now.

alexellis commented 7 years ago

Thanks.. I did try that and it was (as expected) not effective as finding shares. Do you have anything that supports ARM64?