-
Notifications
You must be signed in to change notification settings - Fork 211
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
Porting an application to Mac M1 #502
Comments
Hello @runburg! Thanks for your interest in SSE2NEON Project. Take smartdenovo for example. It can be ported to Apple M1 easily with SSE2NEON. Here are the instructions: git clone https://github.com/ruanjue/smartdenovo
cd smartdenovo
wget https://raw.githubusercontent.com/spack/spack/95ad5b882c990971e74d04261a665ba680f7c4be/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch
patch -p1 < aarch64.patch
wget https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
make Then, you will get several executable files such as
The above were verified on macOS Monterey. Please submit the corresponding issues if any. |
Sorry. I think my comment was not very clear or maybe I'm misunderstanding your comment. I am trying to do the port myself (change includes and add the header files). What I'm confused about is why I'm seeing the unsupported target message. It seems that I haven't defined certain macros (clang for example) correctly, but I'm new to these kinds of projects so I don't understand where or to what I'm supposed set these macros as. |
Can you show me the instructions to reproduce? |
I'll try to come up with a MWE but it may take me a while since the project is pretty sprawling and I don't know which parts are creating this error. The error I'm getting is from line 118 of sse2neon.h. From what I can tell the macros are not getting defined correctly so the target is not being set correctly. I don't know how the macros should be set on M1 Mac using clang. |
Hint: You can get the predefined macros by running |
❯ clang -dM -E - < /dev/null | grep -i arm ❯ xcode-select -v I'm on Big Sur 11.6 if that's necessary |
It seems to be fine according to the above results. Then, we need a test program to reproduce. Please provide for further investigation. |
I've encountered almost the same issues with clang; using gcc+11 compiler instead of clang solved them. |
@dropdeadrus, Can you share the instructions to reproduce clang specific issues? Thanks. |
No further information. Closing. |
FYI I just got this error due to trying to do a universal build (x86_64 and arm64). Switching to a strictly arm64 build fixed it. |
Added sse2neon for arm compilation.
Hi, So I don't know very much about this so my question might be really straightforward to solve. I'm trying to port a cpp to Mac M1 and ran into the issue of not having <mmintrin.h>. So I found this project and thought it would be as straightforward as adding the header file and the compilation flag for ARMv8. But so far I've been thwarted.
I'm getting a bunch of errors. The first one is
Unsupported target. Must be either ARMv7-A+NEON or ARMv8-A.
. From what I can tell, this is getting thrown because I haven't defined the target correctly, but I'm a little mystified by what this means. Can someone point me to a resource to understand this? I'm on Mac M1 using clang v13 if that's useful.I'm also getting a lot of
unknown type name
s anduse of undeclared identifier
s. Any help is much appreciated thanks!The text was updated successfully, but these errors were encountered: