Reputation: 41
I'm trying to install fftw-2.1.5 as it is required by the GADGET3 code version I need to use. I had no issues building it on my Linux machine (running Ubuntu 22.04), but on my M1 MacBook Pro (running macOS Monterey 12.4) it crashes at the configure step.
Running:
./configure --prefix=path/to/local/install \
--enable-mpi \
--enable-type-prefix \
--with-gcc
I got the following error message:
checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin21.5.0 failed
It seems that the configure script is not properly parsing the details of the MacBook, hence it crashes before testing the rest of the dependencies...
Upvotes: 1
Views: 885
Reputation: 41
Disclaimer: I am fairly new to macOS and I have never had to use autotools before.
I found a similar issue here, so credits to the people that documented it there. I am unsure if all the following steps are required but they certainly solved my issue:
$ patch < patch_filename
in the main fftw-2.1.5 directory. As I renamed configure.in to configure.ac, when applying patch 05_ac_define_syntax.diff it will prompt the user to specify the path to the file to patch, i.e. configure.ac.omp_enabler="$CC -fopenmp"
and CFLAGS="$save_CFLAGS -fopenmp"
, where CC=gcc in my case.$ autoupdate
followed by $ autoreconf -vfi
in the main fftw-2.1.5 directory.$ ./configure --prefix=path/to/local/install \
--enable-mpi \
--enable-type-prefix \
--with-gcc \
LDFLAGS=-L/opt/homebrew/lib \
CFLAGS=-I/opt/hombrew/include
make
into make check
and make install
did the trickUpvotes: 2