firoorg / cpuminer-xzc

cpuminer for Zcoin Lyra2Z PoW
Other
32 stars 47 forks source link

cross-compiled failed to ARM platform #5

Open KerwinKoo opened 7 years ago

KerwinKoo commented 7 years ago

HI,

I tried to compile the latest CPUMiner on ARM. I got the following error message:

......

arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I.  -fno-strict-aliasing -I./compat/jansson -I. -I/usr/openwrt-cc/lede-trunk/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/usr/include -I/usr/openwrt-cc/lede-trunk/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/include -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/usr/include -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/include/fortify -I/usr/openwrt-cc/lede-trunk/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-5.4.0_musl-1.1.16_eabi/include   -Wno-pointer-sign -Wno-pointer-to-int-cast   -Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -iremap /usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3:cpuminer-1.3.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro   -MT lyra2/cpuminer-Lyra2.o -MD -MP -MF lyra2/.deps/cpuminer-Lyra2.Tpo -c -o lyra2/cpuminer-Lyra2.o `test -f 'lyra2/Lyra2.c' || echo './'`lyra2/Lyra2.c
lyra2/Lyra2.c:24:23: fatal error: mm_malloc.h: No such file or directory
compilation terminated.
Makefile:1611: recipe for target 'lyra2/cpuminer-Lyra2.o' failed
make[5]: *** [lyra2/cpuminer-Lyra2.o] Error 1
make[5]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:2348: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:558: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3'
Makefile:42: recipe for target '/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3/.built' failed
make[2]: *** [/usr/openwrt-cc/lede-trunk/build_dir/target-arm_cortex-a15+neon-vfpv4_musl-1.1.16_eabi/cpuminer/cpuminer-1.3.3/.built] Error 2
make[2]: Leaving directory '/usr/openwrt-cc/lede-trunk/package/github/cpuminer'
package/Makefile:106: recipe for target 'package/github/cpuminer/compile' failed
make[1]: *** [package/github/cpuminer/compile] Error 2
make[1]: Leaving directory '/usr/openwrt-cc/lede-trunk'
Build failed - please re-run with -j1 to see the real error message
/usr/openwrt-cc/lede-trunk/include/toplevel.mk:197: recipe for target 'package/github/cpuminer/compile' failed

As we see, the error information is lyra2/Lyra2.c:24:23: fatal error: mm_malloc.h: No such file or directory and I try to find the same issue in other project. But it not useful because I didn't add the -march=native option as compile.

How can I run it in ARM?

atarate commented 7 years ago

try setting your compiler with clang.... gcc doesn't have mm_malloc.h header in their library

thiagoarreguy commented 6 years ago

Same error here:

lyra2/Lyra2.c:24:23: fatal error: mm_malloc.h: Arquivo ou diretório não encontrado

include

compilation terminated. Makefile:1611: recipe for target 'lyra2/cpuminer-Lyra2.o' failed make[2]: * [lyra2/cpuminer-Lyra2.o] Error 1 make[2]: Esperando que outros processos terminem. lyra2/Sponge.c:27:23: fatal error: immintrin.h: Arquivo ou diretório não encontrado

include

compilation terminated.

IgorUserowsky commented 6 years ago

platform= raspberry pi 2

same issue is described here: https://github.com/clab/dynet/issues/266

setting export CC=/usr/bin/clang and export CXX=/usr/bin/clang++

does not remedy the situation for me.

febri503 commented 1 year ago

make file mm_malloc.h ``` #define _mm_malloc(size, al) aligned_alloc(al, size)

define _mm_free(ptr) free(ptr) ```

immintrin.h ``` #if !defined(arm)

include "sse2neon.h"

endif ```