Skip to content

Commit 17dc730

Browse files
authored
Add macOS compiler failure to install FAQ (#4345)
1 parent 16e086e commit 17dc730

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

docs/source/install.rst

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,23 +262,23 @@ No such file or directory: '/tmp/.../petsc/conf/petscvariables'
262262

263263
If you encounter the error:
264264

265-
.. code-block:: text
266-
267-
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.../petsc/conf/petscvariables'
265+
.. code-block:: text
268266
269-
when running the ``pip install`` instruction this is usually a sign that the
270-
environment variables ``PETSC_DIR`` or ``PETSC_ARCH`` are not set correctly.
271-
You can check this by making sure that you can run the following command
272-
without error::
273-
274-
$ ls $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
267+
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.../petsc/conf/petscvariables'
275268
276-
If this raises an error then you should re-``export`` the variables necessary to
277-
build Firedrake as described :ref:`above<install_firedrake>`::
269+
when running the ``pip install`` instruction this is usually a sign that either:
270+
you are using a cached version of petsc4py that is linked incorrectly, or that
271+
the environment variables ``PETSC_DIR`` or ``PETSC_ARCH`` are not set correctly.
272+
To fix this we suggest purging the pip cache before re-exporting the environment
273+
variables::
278274

275+
$ pip cache purge
279276
$ export $(python3 firedrake-configure --show-env)
280277

281-
and try the install again.
278+
You can check that ``PETSC_DIR`` and ``PETSC_ARCH`` are set correctly by making
279+
sure that you can run the following command without error::
280+
281+
$ ls $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables
282282

283283
Missing symbols post install
284284
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -291,13 +291,34 @@ the wrong compiled library. This is usually caused by issues with caching.
291291
To resolve the problem you should first remove any existing cached packages::
292292

293293
$ pip uninstall -y h5py mpi4py petsc4py slepc4py
294-
$ pip cache remove h5py
295-
$ pip cache remove mpi4py
296-
$ pip cache remove petsc4py
297-
$ pip cache remove slepc4py
294+
$ pip cache purge
298295

299296
before re-running the instruction to install Firedrake.
300297

298+
Unable to configure PETSc on macOS
299+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300+
301+
If you are running on macOS and encounter error messages during PETSc
302+
``configure`` like the following:
303+
304+
.. code-block:: text
305+
306+
*********************************************************************************************
307+
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
308+
---------------------------------------------------------------------------------------------
309+
Cannot use scalapack without Fortran, make sure you do NOT have --with-fc=0
310+
*********************************************************************************************
311+
312+
then this is usually a sign that your Homebrew and/or Xcode are too old. We
313+
recommend making sure that they are both up-to-date before trying again.
314+
315+
For Homebrew it is sometimes useful to run the command::
316+
317+
$ brew doctor
318+
319+
as this can flag issues with your system that should be resolved before
320+
installing Firedrake.
321+
301322
.. _customising:
302323

303324
Customising Firedrake

0 commit comments

Comments
 (0)