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

Can't build on M1 Mac #28

Open
RyannDaGreat opened this issue Sep 25, 2022 · 2 comments · May be fixed by #29
Open

Can't build on M1 Mac #28

RyannDaGreat opened this issue Sep 25, 2022 · 2 comments · May be fixed by #29

Comments

@RyannDaGreat
Copy link

RyannDaGreat commented Sep 25, 2022

Hi,
When I run the command

build make -j4

I get the error

clang: error: the clang compiler does not support '-march=native'

Here's the full output:

➜ build make -j4
[  4%] Building C object core/CMakeFiles/apriltag.dir/apriltag.c.o
[  8%] Building C object core/CMakeFiles/apriltag.dir/tag25h7.c.o
[  8%] Building C object core/CMakeFiles/apriltag.dir/tag16h5.c.o
[  8%] Building C object core/CMakeFiles/apriltag.dir/apriltag_quad_thresh.c.o
clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
clang: error: the clang compiler does not support '-march=native'
make[2]: *** [core/CMakeFiles/apriltag.dir/apriltag.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [core/CMakeFiles/apriltag.dir/apriltag_quad_thresh.c.o] Error 1
make[2]: *** [core/CMakeFiles/apriltag.dir/tag25h7.c.o] Error 1
make[2]: *** [core/CMakeFiles/apriltag.dir/tag16h5.c.o] Error 1
make[1]: *** [core/CMakeFiles/apriltag.dir/all] Error 2
make: *** [all] Error 2

I'm on a M1 Mac Max 16 inch.

I tried this with two versions of clang; the first one being the one that is installed with xcode:

➜ macx-stable-diffusion > clang -v
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

and then one installed with brew via brew install llvm:

➜ build clang -v
Homebrew clang version 15.0.0
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

I was able to get this library to work on my Intel 2013 macbook, but not the 2021 16 inch Mac Max.

What am I doing wrong?

@RyannDaGreat
Copy link
Author

RyannDaGreat commented Sep 26, 2022

Update: This was solved by removing -march=native from line 11 of CMakeLists.txt. Should I make a pull request?

@RyannDaGreat RyannDaGreat linked a pull request Oct 18, 2022 that will close this issue
@RyannDaGreat
Copy link
Author

I've made a pull request #29

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

Successfully merging a pull request may close this issue.

1 participant