madMAx43v3r / chia-plotter

Apache License 2.0
2.28k stars 665 forks source link

Is ARM compile possible? #645

Open toto99303 opened 3 years ago

toto99303 commented 3 years ago

Hello guys,

I'm trying to compile it on Raspberry Pi 4 just for the fun of it, but I get this error:

[ 99%] Building CXX object CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o In file included from /home/ubuntu/chia-plotter/lib/bls-signatures/src/elements.hpp:22, from /home/ubuntu/chia-plotter/lib/bls-signatures/src/privatekey.hpp:24, from /home/ubuntu/chia-plotter/lib/bls-signatures/src/bls.hpp:18, from /home/ubuntu/chia-plotter/src/chia_plot.cpp:16: /home/ubuntu/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const uint8_t*, size_t)’: /home/ubuntu/chia-plotter/lib/bls-signatures/src/util.hpp:62:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 62 | for (int i=0; i < len; ++i) | ^~~ /home/ubuntu/chia-plotter/lib/bls-signatures/src/util.hpp: In static member function ‘static std::string bls::Util::HexStr(const std::vector&)’: /home/ubuntu/chia-plotter/lib/bls-signatures/src/util.hpp:70:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 70 | for (int i=0; i < data.size(); ++i) | ^~~ [100%] Linking CXX executable test_phase_3 [100%] Built target test_phase_3 [100%] Linking CXX executable test_phase_1 [100%] Built target test_phase_1 In file included from /home/ubuntu/chia-plotter/src/chia_plot.cpp:14: /home/ubuntu/chia-plotter/include/chia/cpuid.h: In constructor ‘CPUInfo::CPUInfo()’: /home/ubuntu/chia-plotter/include/chia/cpuid.h:30:46: error: impossible constraint in ‘asm’ 30 | : "a" (funcId), "c" (subFuncId)); | ^ compilation terminated due to -fmax-errors=1. make[2]: [CMakeFiles/chia_plot.dir/build.make:63: CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:406: CMakeFiles/chia_plot.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 ubuntu@ubuntu:~/chia-plotter$

Is it even possible to compile for ARM, or the CPU instructions are totally different for the plotter to work?

we-sell-bags commented 3 years ago

ok... so basically it is just 1 error. basically a shitty assumption in the code added for HW info... (#600) they assumed it is "win32 " or something else..... linux/osx/arm/pdp11/cray/some other thing not win32 with ZERO regard for the CPU infrastructure.....

andyvk85 commented 3 years ago

The older version from 1-2 weeks ago can be compiled on ARM platform, I checked it on a 64 core ARM server at AWS Cloud.

BTW: Also the plotting itself runs very well / fast!

toto99303 commented 3 years ago

@we-sell-bags thanks! I was able to compile prior to (#600 ) Not onto the fun part :)

cayolblake commented 3 years ago

The older version from 1-2 weeks ago can be compiled on ARM platform, I checked it on a 64 core ARM server at AWS Cloud.

BTW: Also the plotting itself runs very well / fast!

Fast as in how many seconds?