dealii / candi

candi - (Compile & Install) - Downloads, configures, builds and installs deal.II
GNU Lesser General Public License v3.0
63 stars 61 forks source link

p4est on Apple Silicon #367

Closed bobmyhill closed 1 year ago

bobmyhill commented 1 year ago

After deleting and re-installing xcode and command line tools, I followed the instructions here to install deal.II: https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX

When trying to install p4est 2.3.2, candi outputs the following error:

Build FAST version in .../dealii-candi/tmp/build/p4est-2.3.2/FAST
.../dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: error: in `.../dealii-candi/tmp/build/p4est-2.3.2/FAST':
configure: error: Fortran 77 compiler cannot create executables
See `config.log' for more details
Error: Error in configure

This seems to be related to enabling mpi - the configuration of p4est runs fine without enabling mpi. (Configuration of p4est also works fine using mpich, but not open-mpi.)

My conclusion is that something has changed on my machine, but I'm struggling to figure out what it is. I've tried deleting XCode and reinstalling, deleting gfortran and reinstalling.

I'm running Ventura 13.6.1 (22G313) on an Apple M1 Pro.

bobmyhill commented 1 year ago

Problem solved; using X Code 15 requires additional fortran linker flags for p4est and trilinos: export LDFLAGS="$LDFLAGS -L/usr/local/gfortran/lib -Wl,-ld_classic,-lgfortran"