Skip to content

compile error on M1 chip

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6328
    lollipopcorn
    Participant

    Dear developer,

    I got the following error:

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

    when compiling the example “thermal/porousPlate2d” on Macbook air with M1 (2020). Is this error exclusive to M1 chip? Do you have any plan on fixing this in the future?

    Thanks
    John

    #6329
    Adrian
    Keymaster

    Thanks for your report. However, this likely is not something that we can fix on our end – a quick web search suggests that the “march=native” flag only works on architectures where defaults are provided by clang. You can check if something marching A1 is available via “clang –print-supported-cpus” in more recent clang versions.

    Alternatively you may also drop the “march=native” flag completely as it is not required to get a working build (e.g. it is not included in the default debug flags).

    I’d be interested in hearing if something breaks after that as I have not yet had the chance to test OpenLB on M1.

    #6333
    lollipopcorn
    Participant

    Thanks for your prompt reply.
    Just an update. I removed “march=native” flag and now it works on M1.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.