Grin-miner build error

Just wondering if anyone is still familiar with it:

I am building in multipass (VM) like this:

multipass launch --name grin-miner --mem 2G --disk 10G --cpus 2 bionic
curl https://sh.rustup.rs -sSf | sh; source $HOME/.cargo/env
sudo apt-get update
sudo apt install cmake libncurses5-dev libncursesw5-dev zlib1g-dev libssl-dev pkg-config
sudo reboot
git clone https://github.com/mimblewimble/grin-miner.git
cd grin-miner
git submodule update --init
cargo build

I am commenting line 40 and uncommenting 38 in Cargo.toml to disable building CUDA plugins:
https://github.com/mimblewimble/grin-miner/blob/master/Cargo.toml

I get this error:

error: failed to run custom build command for cuckoo_miner v4.0.0 (/home/ubuntu/grin-miner/cuckoo-miner)

Caused by:
process didn’t exit successfully: /home/ubuntu/grin-miner/target/debug/build/cuckoo_miner-35394f57386d62a6/build-script-build (exit status: 101)
— stdout
cargo:rerun-if-changed=src/cuckoo_sys/plugins/CMakeLists.txt
many similar lines removed for brevity
cargo:rerun-if-changed=src/cuckoo_sys/plugins/cuckoo/doc/cuckoo.tex
running: “cmake” “/home/ubuntu/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins” “-DBUILD_CUDA_PLUGINS=FALSE” “-DCMAKE_INSTALL_PREFIX=/home/ubuntu/grin-miner/target/debug/build/cuckoo_miner-c9549945161d764b/out” “-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC” “-DCMAKE_C_COMPILER=/usr/bin/cc” “-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC” “-DCMAKE_CXX_COMPILER=/usr/bin/c++” “-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC” “-DCMAKE_ASM_COMPILER=/usr/bin/cc” “-DCMAKE_BUILD_TYPE=Debug”
– The C compiler identification is GNU 7.5.0
– The CXX compiler identification is GNU 7.5.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Configuring done
– Generating done
– Build files have been written to: /home/ubuntu/grin-miner/target/debug/build/cuckoo_miner-c9549945161d764b/out/build
running: “cmake” “–build” “.” “–target” “” “–config” “Debug” “–”
Scanning dependencies of target cuckatoo_mean_cpu_compat_31
[ 2%] Building CXX object CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/cuckoo/src/cuckatoo/mean.cpp.o
CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/build.make:62: recipe for target ‘CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/cuckoo/src/cuckatoo/mean.cpp.o’ failed
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/all’ failed
Makefile:83: recipe for target ‘all’ failed

— stderr
CMake Warning:
Manually-specified variables were not used by the project:

  CMAKE_ASM_COMPILER
  CMAKE_ASM_FLAGS

c++: error: unrecognized command line option ‘-m64’
c++: error: unrecognized command line option ‘-mno-avx2’; did you mean ‘-Wno-a,’?
make[2]: *** [CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/cuckoo/src/cuckatoo/mean.cpp.o] Error 1
make[1]: *** [CMakeFiles/cuckatoo_mean_cpu_compat_31.dir/all] Error 2
make: *** [all] Error 2
thread ‘main’ panicked at ’
command did not execute successfully, got: exit status: 2

build script failed, must exit now’, /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish…
error: build failed

Oh right, grin-miner has precompiled releases too.

-bash: /usr/local/bin/grin-miner: cannot execute binary file: Exec format error

I think this is the answer I was looking for, that of course you can’t just run this on M1/ARM as is.