Skip to content

Compile errors on MacBook M1 #1

Open

Description

@mooming

Math-Library-Test % make
[ 25%] Building CXX object CMakeFiles/Main.dir/src/mother.cpp.o
c++: error: unsupported option '-msse2' for target 'arm64-apple-darwin24.6.0'
c++: error: unsupported option '-msse3' for target 'arm64-apple-darwin24.6.0'
c++: error: unsupported option '-mssse3' for target 'arm64-apple-darwin24.6.0'
c++: error: unsupported option '-msse4.1' for target 'arm64-apple-darwin24.6.0'
c++: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
make[2]: *** [CMakeFiles/Main.dir/src/mother.cpp.o] Error 1
make[1]: *** [CMakeFiles/Main.dir/all] Error 2
make: *** [all] Error 2

Activity

  1. mfoo commented on Aug 18, 2025

    @mfoo
    Owner

    Heya, I never tested this on Apple M CPUs so I don't know if any of the libraries I used will support being compiled for them. It looks like I was using arm 7, and i haven't tested with arm 8. You could also disable the SSE tests by providing the config options in CMakeLists.txt to set e.g -DEIGEN_TEST_NEON=on, or possibly by deleting the contents of the else body from line 77.

    This is an old project now and the libraries have probably moved on significantly in terms of performance and CPU architecture support. If I was evaluating math libraries now I'd have a look too SSE which new libraries have appeared since and then repeat the experiment on a number of my target CPUs.

    Another option for you might be to cross compile on Docker, but emulating a cpu architecture might not give you real world performance results.

    Have a nice day and good luck!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions