Member Site › Forums › Rosetta 3 › Rosetta 3 – Build/Install › arm64 processor is not supported for new M1 chip
- This topic has 5 replies, 3 voices, and was last updated 3 years, 8 months ago by Anonymous.
-
AuthorPosts
-
-
March 29, 2021 at 6:36 pm #3732Anonymous
Hello,
I’m fairly new to dealing with these kinds of software installation and compilation. I want to download the latest release of rosetta on my M1 Macbook air laptop and I’ve run into the following problem when I try to compile the rosetta bundle in the Rosetta/main/source directory:
source % ./scons.py -j6 mode=release bin
scons: Reading SConscript files …
Traceback (most recent call last):
File “/Users/martinfe/Rosetta/main/source/SConstruct”, line 183, in main
build = SConscript(“tools/build/setup.py”)
File “/Users/martinfe/Rosetta/main/source/external/scons-local/scons-local-3.0.4/SCons/Script/SConscript.py”, line 667, in __call__
return method(*args, **kw)
File “/Users/martinfe/Rosetta/main/source/external/scons-local/scons-local-3.0.4/SCons/Script/SConscript.py”, line 604, in SConscript
return _SConscript(self.fs, *files, **subst_kw)
File “/Users/martinfe/Rosetta/main/source/external/scons-local/scons-local-3.0.4/SCons/Script/SConscript.py”, line 285, in _SConscript
call_stack[-1].globals)
File “/Users/martinfe/Rosetta/main/source/tools/build/setup.py”, line 451, in <module>
build = setup()
File “/Users/martinfe/Rosetta/main/source/tools/build/setup.py”, line 441, in setup
build.options_requested, build.options = setup_build_options()
File “/Users/martinfe/Rosetta/main/source/tools/build/setup.py”, line 140, in setup_build_options
supported, actual.os, requested.arch
File “/Users/martinfe/Rosetta/main/source/tools/build/setup_platforms.py”, line 190, in select_arch
raise KeyError(“Processor ‘%s’ with machine designation ‘%s’ is unsupported.” % (actual, machine))
KeyError: “Processor ‘arm’ with machine designation ‘arm64’ is unsupported.”
scons: done reading SConscript files.
scons: Building targets …
scons: *** Do not know how to make File target `bin’ (/Users/martinfe/Rosetta/main/source/bin). Stop.
scons: building terminated because of errors.
I read through this ouput and noticed the KeyError: “Processor ‘arm’ with machine designation ‘arm64’ is unsupported.”
I dont know this for certain but i am assuming this processor ‘arm64’ is new for the M1 chip and maybe this software is not updated to use it.
I went to Rosetta/main/source/tools/build/setup_platforms.py and edited the following dictionary as such:
processor_translation = {
# Results from platform.processor()
“arm64”: “x86”, #THIS IS WHAT I INSERTED
“i386”: “x86”,
“i486”: “x86”,
“i586”: “x86”,
“i686” : “x86”,
“x86_64” : “x86”,
“ppc64” : “ppc64”,
“powerpc” : “ppc”,
# Results from os.uname()
# This isn’t strictly true. But we are not currently distinguishing
# between AMD and Intel processors.
“athlon” : “x86”,
“Power Macintosh” : “ppc”,
# Some architectures for Gentoo Linux — should be handled by the processor.machine() fallback
#”Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz” : “x86”,
#’Intel(R) Xeon(TM) CPU 3.00GHz’ : “x86”,
#’Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz’ : “x86”,
}
and I added this new line so that it would bypass the processor issue and it kind of worked but the I got the following output after trying to execute ./scons.py in Rosetta/main/source:
./scons.py -j6 mode=release bin
scons: Reading SConscript files …
Running versioning script … Release package detected, using rosetta/main/.release.json to acquire version information…
Done. (0.0 seconds)
Number of option files updated: 0
Total 4547 options.
Finished updating ResidueProperty code
— no changes needed
Finished updating VariantType code
— no changes needed
scons: done reading SConscript files.
scons: Building targets …
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/apps/public/AbinitioRelax.o -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/apps/public/AbinitioRelax.cc
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/devel/init.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/devel/init.cc
clang: error: the clang compiler does not support ‘-march=native’
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/init.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/protocols/init/init.cc
clang: error: the clang compiler does not support ‘-march=native’
clang: error: the clang compiler does not support ‘-march=native’
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register1.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/protocols/init/register1.cc
clang: error: the clang compiler does not support ‘-march=native’
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register2.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/protocols/init/register2.cc
clang: error: the clang compiler does not support ‘-march=native’
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/apps/public/AbinitioRelax.o] Error 1
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/devel/init.os] Error 1
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/init.os] Error 1
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register1.os] Error 1
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register2.os] Error 1
clang++ -o build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register3.os -c -std=c++11 -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -isystem /usr/local/include -march=core2 -mtune=generic -pipe -Qunused-arguments -DUNUSUAL_ALLOCATOR_DECLARATION -ftemplate-depth-256 -stdlib=libstdc++ -W -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=native -mtune=native -stdlib=libc++ -Wno-unused-variable -Wno-implicit-function-declaration -O3 -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/clang/12.0 -Isrc/platform/macos/32/clang -Isrc/platform/macos/32 -Isrc/platform/macos src/protocols/init/register3.cc
clang: error: the clang compiler does not support ‘-march=native’
scons: *** [build/src/release/macos/10.16/32/x86/clang/12.0/default/protocols/init/register3.os] Error 1
scons: building terminated because of errors.
And I see that I have a new issue with clang. I do not know what to do from here please help if you can.
-
March 29, 2021 at 7:23 pm #15828Anonymous
Hey, I was able to get this working on my laptop. This is a short term fix and I need to sit down and make it so that the march flag is still used when compiling on intel based macs but ths quick and dirty fix is to just comment out two lines. I will create a branch with a long term fix this afternoon.
I would remove the change that you made to the translation dict because this is not an x86 processor and I would instead make the following changes
in options.settings add the following line to the arch dict:
“arm” : [“64”, “*”],
In the file “basic.settings” comment out the following lines.
2019 – “march=core2”
2168 – “march=native”
-
March 29, 2021 at 8:52 pm #15829Anonymous
Thank you so much taylorjones!
You’re a life saver I would have never been able to figure that out on my own. You did mention that compiling the rosetta bundle this way is a “dirty fix”, will I ever have to recompile and do it the normal way when a bug fix is released that is compatible with M1 macs? or is this version that I have compiled stable enough to carry our normal rosetta functions. sorry if this is a stupid questions.
-
March 30, 2021 at 4:27 pm #15835Anonymous
New releases of Rosetta should be installed into a new folder, not over the existing download. As such, any future release would need to be compiled from scratch, rather than recompiled from your existing one. (And the M1 fixes are getting incorporated to the development version, so hopefully you shouldn’t need to make any changes to then newly downloaded version to compile it.)
The fixes proposed are fine, and actually are (more-or-less) what the fix in the development Rosetta is going to be (just in a way which will work on non M1 platforms as well). There shouldn’t be any scientific downside for using the programs produced with the fix — the changes are just to the build system, and shouldn’t affect the workings of the program after it is compiled.
-
March 30, 2021 at 6:08 pm #15836Anonymous
Great question, it is a dirty fix because it can potentially have performance impacts on anyone using the clang compiler on other architectures.
If you are just compiling executables that you are going to use for a long time then it is totally fine.
If you are actively developing rosetta then these are changes you want to avoid committing.
I made a pull request with some cleaner changes and Rocco has checked and approved it. So the current state of the master branch should be able to compile for mac.
If you are curious about the clean fix it can be seen in this pull request: https://github.com/RosettaCommons/main/pull/5316/files
Basically instead of removing the flag for everyone using clang we just added a rule where if you were using clang on a mac with an arm processor it would remove the flag. It is making the same change that we made by commenting those lines out except it is does it in a way that avoids interfering with builds for other architectures.
Hope that was helpful,
Taylor
-
March 30, 2021 at 6:51 pm #15837Anonymous
Note that the Github link will only be accessible if you’re a RosettaCommons developer and have the appropriate permissions for access. If you get access to Rosetta via the academic or commercial licensing process, then the updates should be in included in an upcoming weekly release. (Maybe not the one for this week, but the definitely the one for next week.)
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.