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

OSX compile error #3695

Closed
3s3s opened this issue Sep 12, 2021 · 7 comments
Closed

OSX compile error #3695

3s3s opened this issue Sep 12, 2021 · 7 comments

Comments

@3s3s
Copy link

3s3s commented Sep 12, 2021

When I follow this instruction https://github.com/monero-project/monero-gui#building-on-os-x
I have this error : "clang: error: the clang compiler does not support '-march=x86-64'"

More logs from terminal:

-- Found ICU: /opt/homebrew/opt/icu4c/include (found version "69.1") 
-- Configuring done
CMake Warning (dev) at monero/src/CMakeLists.txt:93 (add_library):
  Policy CMP0115 is not set: Source file extensions must be explicit.  Run
  "cmake --help-policy CMP0115" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  File:

    /Users/a12345/monero-gui/monero/src/rpc/instanciations.cpp
Call Stack (most recent call first):
  monero/src/CMakeLists.txt:81 (monero_add_library_with_deps)
  monero/src/rpc/CMakeLists.txt:101 (monero_add_library)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/a12345/monero-gui/build/release
[  1%] Automatic MOC and UIC for target gui_version
[  1%] Built target gui_version_autogen
[  1%] Built target genversiongui
[  1%] Automatic MOC and UIC for target obj_gui_version
[  1%] Built target obj_gui_version_autogen
[  1%] Building CXX object CMakeFiles/obj_gui_version.dir/obj_gui_version_autogen/mocs_compilation.cpp.o
clang: error: the clang compiler does not support '-march=x86-64'
make[3]: *** [CMakeFiles/obj_gui_version.dir/obj_gui_version_autogen/mocs_compilation.cpp.o] Error 1
make[2]: *** [CMakeFiles/obj_gui_version.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2

How can this be fixed?

@selsta
Copy link
Collaborator

selsta commented Sep 12, 2021

Do you have a M1 Mac?

@3s3s
Copy link
Author

3s3s commented Sep 12, 2021

Do you have a M1 Mac?

Seems yes.
Mac OS Big Sur
version 11.5.2
Chip Apple M1

@selsta
Copy link
Collaborator

selsta commented Sep 13, 2021

Try #3697

@3s3s
Copy link
Author

3s3s commented Sep 13, 2021

Try #3697

Not helped.

[ 22%] Building C object monero/external/db_drivers/liblmdb/CMakeFiles/lmdb.dir/midl.c.o
[ 22%] Linking C static library liblmdb.a
[ 22%] Built target lmdb
[ 22%] Building CXX object monero/external/easylogging++/CMakeFiles/easylogging.dir/easylogging++.cc.o
clang: error: the clang compiler does not support '-march=x86-64'
make[3]: *** [monero/external/easylogging++/CMakeFiles/easylogging.dir/easylogging++.cc.o] Error 1
make[2]: *** [monero/external/easylogging++/CMakeFiles/easylogging.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2

@selsta
Copy link
Collaborator

selsta commented Sep 13, 2021

It did help, there is a different issue now. You also have to apply monero-project/monero@1ac7134 inside the monero submodule.

@3s3s
Copy link
Author

3s3s commented Sep 14, 2021

Still not working (((

[ 22%] Built target unbound
Consolidate compiler generated dependencies of target lmdb
[ 23%] Built target lmdb
Consolidate compiler generated dependencies of target easylogging
[ 23%] Built target easylogging
Consolidate compiler generated dependencies of target qrcodegen
[ 24%] Built target qrcodegen
[ 24%] Building CXX object monero/contrib/epee/src/CMakeFiles/epee.dir/byte_slice.cpp.o
clang: error: the clang compiler does not support '-march=x86-64'
make[3]: *** [monero/contrib/epee/src/CMakeFiles/epee.dir/byte_slice.cpp.o] Error 1
make[2]: *** [monero/contrib/epee/src/CMakeFiles/epee.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release] Error 2

@selsta
Copy link
Collaborator

selsta commented Oct 29, 2021

Delete this line and do the other explained steps in this issue, then it will compile fine: https://github.com/monero-project/monero-gui/blob/master/CMakeLists.txt#L27

Confirmed myself on a M1 Mac.

Next Monero GUI release (v0.17.3.0) will have proper support for M1, then you will only have to enter make.

@selsta selsta closed this as completed Oct 29, 2021
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