Skip to content

Can't build on M1 Mac #28

Description

@RyannDaGreat

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions