Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon - build failed #260

Open
gringum opened this issue Dec 3, 2021 · 2 comments
Open

Apple Silicon - build failed #260

gringum opened this issue Dec 3, 2021 · 2 comments

Comments

@gringum
Copy link

gringum commented Dec 3, 2021

It seems some misunderstanding about options for Cmake?

-- Configuring done
-- Generating done
-- Build files have been written to: xxxxxxxx/grin/dev/grin-miner/grin-miner/target/debug/build/cuckoo_miner-86e8b47af42b98f9/out/build
running: "cmake" "--build" "." "--target" "" "--config" "Debug" "--parallel" "8"

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

  CMAKE_ASM_COMPILER
  CMAKE_ASM_FLAGS

Usage: cmake --build

[options] [-- [native-options]]
cmake --build --preset [options] [-- [native-options]]
Options:
= Project binary directory to be built.
--preset , --preset=
= Specify a build preset.
--list-presets
= List available build presets.
--parallel [], -j []
= Build in parallel using the given number of jobs.

@gringum gringum changed the title Apple Silicon - cannot compile Apple Silicon - build failed Dec 3, 2021
@gringum
Copy link
Author

gringum commented Dec 3, 2021

when I go a little bit deeper I think maybe the --target "" might be problem and then I also see that -march=native is throwing some errors

[ 15%] Building CXX object CMakeFiles/cuckatoo_mean_cpu_avx2_31.dir/cuckoo/src/cuckatoo/mean.cpp.o
[ 17%] Building CXX object CMakeFiles/cuckatoo_lean_cpu_compat_31.dir/cuckoo/src/cuckatoo/lean.cpp.o
clangclang: : clangclang: : clang: errorerrorerror: : : the clang compiler does not support '-march=native'the clang compiler does not support '-march=native'the clang compiler does not support '-march=native'
error: the clang compiler does not support '-march=native'
error: the clang compiler does not support '-march=native'

@quentinlesceller
Copy link
Member

quentinlesceller commented Dec 3, 2021

AFAIK the option -march=native will not work on Apple M1.
Out of curiosity I've tried replacing it with -mcpu=apple-m1 and managed to start the build of Cuckoo (https://github.com/tromp/cuckoo/tree/master/src/cuckoo).
No luck to build the whole cuckoo-miner crate though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants