# A bug when installing dolfinx using spack

**URL:** <https://fenicsproject.discourse.group/t/a-bug-when-installing-dolfinx-using-spack/16905>\
**Category:** Errors\
**Tags:** dolfinx\
**Created:** [February 3, 2025, 9:32am UTC](https://fenicsproject.discourse.group/t/a-bug-when-installing-dolfinx-using-spack/16905 "2025-02-03T09:32:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WjjSteve](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/wjjsteve/32/4389_2.png) [@WjjSteve](https://fenicsproject.discourse.group/u/WjjSteve)\
**Post date:** [February 3, 2025, 9:32am UTC](https://fenicsproject.discourse.group/t/a-bug-when-installing-dolfinx-using-spack/16905/1 "2025-02-03T09:32:57Z")

</div>

Hello, I want to ask a question about the installation of dolfinx.

I installed fenicsx in a HPC machine using spack as introduced [here](https://github.com/FEniCS/dolfinx/tree/main#:~:text=git%20clone%20https%3A//github.com/spack/spack.git%0A.%20./spack/share/spack/setup%2Denv.sh%0Aspack%20env%20create%20fenicsx%2Denv%0Aspack%20env%20activate%20fenicsx%2Denv%0Aspack%20add%20fenics%2Ddolfinx%2Badios2%20py%2Dfenics%2Ddolfinx%20cflags%3D%22%2DO3%22%20fflags%3D%22%2DO3%22%0Aspack%20install), and I used the version 0.7.2. But when I tried to compile the codes in the CPP interface, it shows the following error:

> /sw/EasyBuild/rackham/software/PETSc/3.11.1-intel-2019a/include/petscsys.h:149:6: error: #error “PETSc was configured with I\_MPI but now appears to be compiling using a non-I\_MPI mpi.h”  
> 149 | # error “PETSc was configured with I\_MPI but now appears to be compiling using a non-I\_MPI mpi.h”

does any one have any suggestions for this issue? Thanks in advance!
