Skip to content

make command may produce errors on Apple Silicon w/ Homebrew #5

@liamtoney

Description

@liamtoney

I recently tried installing infraGA on a new MacBook with an Apple M2 Max processor. I'm using Homebrew to install the dependencies (FFTW only, turns out that OpenMPI is one of its dependencies). Previously, on my Intel MacBook, the make command for infraGA ran w/o errors. Here, though, I got the following:

src/geoac/geoac.eqset.2d.cpp:9:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
         ^~~~~~~~~

I looked into this and on Apple Silicon Homebrew installs libraries and headers in /opt/homebrew/lib/ and /opt/homebrew/include/. Based on this SE article I modified the infraGA makefile CFLAGS to be

CFLAGS=  -Wno-write-strings -lfftw3 -L/opt/homebrew/lib/ -I/opt/homebrew/include/ 

and the make process ran without errors. Just a note to hopefully save future users time if they run into the same issue!

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