Trouble installing p4est from candi M1 mac

31 views
Skip to first unread message

Matteo Malvestiti

unread,
Apr 6, 2023, 6:25:13 AM4/6/23
to deal.II User Group
Good afternoon.
I’m truly sorry to bother you, but I’ve spent a lot of time trying to fix this problem, without any success.
I’m trying to install dealii on my M1 macbook air with MacOs Ventura.
Ive been following the guide on https://github.com/dealii/dealii/wiki/Apple-ARM-M1-OSX

I installed brew
I verified I have mac developer tools updated
Using brew I installed cmake and openmpi.
Using brew, with much more effort and not complete certainty of success, I installed gcc11.

I cloned candi git repo.
I set the following env variables, to use clang instead of gcc11:
export CC=mpicc; export CXX=mpicxx; export FC=mpifort; export FF=mpifort; \
  OMPI_CC=clang; export OMPI_CXX=clang++; export OMPI_FC=gfortran-1

I began installing the packages together but had troubles.

So I proceeded doing them one by one.
hdf5 went fine
But p4est exits with the following error:

Build FAST version in /Users/matteom/dealii-candi/tmp/build/p4est-2.3.2/FAST
/Users/######/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: error: in `/Users/######/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

Note: I even tried to switch to Master branch, but nothing changed.


Do you have any clue what I could try next?

Thanks for your cooperation.
Best wishes,
Matteo Malvestiti

blais...@gmail.com

unread,
Apr 7, 2023, 7:11:30 AM4/7/23
to deal.II User Group
What I would suggest is to not use GCC, but instead use the clang compiler native with the Mac M1.
At least this is how I did it on my apple M1 macbook pro computer

Luca Heltai

unread,
Apr 7, 2023, 7:36:20 AM4/7/23
to dea...@googlegroups.com
Can you try if the mac package for M1 Ventura (9.4.0) works for you?

Luca

Il giorno 7 apr 2023, alle ore 14:11, blais...@gmail.com <blais...@gmail.com> ha scritto:

What I would suggest is to not use GCC, but instead use the clang compiler native with the Mac M1.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/24357a2e-1b43-4ed3-b841-19760e650d96n%40googlegroups.com.

Matteo Malvestiti

unread,
Apr 7, 2023, 11:07:34 AM4/7/23
to dea...@googlegroups.com
Hi! I looked out for what you are suggesting, but I don’t understand.

Here I read that dealii version 9.4.0 is just for Intel macs (and for MacOs Monterey)

Moreover on the guide for M1 mac installations it results that the only way to install the library is through candi, isn’t it?
Is there a way to chose the version there?

Matteo Malvestiti

unread,
Apr 7, 2023, 11:22:47 AM4/7/23
to dea...@googlegroups.com
I think I finally understood what you meant. I changed branch in the git repo with

git checkout v9.4.0-r2


Unfortunately, same issue as always...


Il giorno 7 apr 2023, alle ore 17:07, Matteo Malvestiti <malve...@gmail.com> ha scritto:

Hi! I looked out for what you are suggesting, but I don’t understand.

Matteo Malvestiti

unread,
Apr 10, 2023, 8:25:23 AM4/10/23
to dea...@googlegroups.com
Hi, thanks for your response!
Could you please tell me how to compile with clang instead of gcc?
Unfortunately I’m a beginner at using the command line...

I’ve done this:

export CC=clang; export CXX=clang++; export FC=mpifort; export FF=mpifort; \

        OMPI_CC=clang; export OMPI_CXX=clang++; export OMPI_FC=gfortran-1


But I still get the same error:

Build FAST: /Users/######/dealii-candi/tmp/build/p4est-2.3.2/FAST

Build DEBUG: /Users/######/dealii-candi/tmp/build/p4est-2.3.2/DEBUG

Install FAST: /Users/######/dealii-candi/p4est-2.3.2/FAST

Install DEBUG: /Users/######/dealii-candi/p4est-2.3.2/DEBUG

Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG

See output in files .../config.output and .../make.output


Build FAST version in /Users/######/dealii-candi/tmp/build/p4est-2.3.2/FAST

/Users/######/dealii-candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected

configure: error: in `/Users/######/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


Great thanks in advance!
Matteo

Daniel Arndt

unread,
Apr 10, 2023, 9:59:57 AM4/10/23
to dea...@googlegroups.com
Matteo,

what happens if you just use p4est CMake installation interface instead of our scripts? You probably only need to make sure to enable MPI support.

Best,
Daniel

Reply all
Reply to author
Forward
0 new messages