Dolfinx_Installation from Source (C++/Cpp build)

I have followed the installation steps provided on the official page for installing DolfinX from the source: Installation — DOLFINx 0.10.0.0 documentation

However, I am encountering an error during the installation process. Specifically, I am facing an issue while trying to install dolfinx from the source.


I have uploaded a screenshot of the error message I am getting for your reference.

Please help me to solve this error.

As stated in the aforementioned link:

there are several dependencies that you need to install:

Required

  • C++ compiler (supporting the C++20 standard)
  • Basix C++ core
  • Boost, with the following compiled Boost components
    • timer
  • CMake [build dependency]
  • HDF5 (with MPI support enabled)
  • MPI supporting MPI standard version 3 or above.
  • pkg-config
  • pugixml
  • spdlog
  • UFCx [ufcx.h, provided by FFCx package or FFCx UFCx CMake install at ffcx/cmake/*]
  • At least one of ParMETIS 2, KaHIP or PT-SCOTCH 2

See for instance: dolfinx/docker/Dockerfile.test-env at main · FEniCS/dolfinx · GitHub
for instructions on how to install these on linux.

Thank you for your response, I will try to follow the above instructions. Just want to know whether I can install Fenics on VIrtual machine ?, Is this possible ?


I am getting this error, I have managed to install few dependicies, I am stuck here, I have installed HDF5,

Please verify whether my installation is correct in the above image

Yes, it is possible.
Is there a reason you want to install from source and not use the Debian package, conda, spack or docker on your system?

As far as I can tell from the screenshot, it looks like that you have an mpi build of hdf5 installed.

However, it might be that dolfinx picks up another hdf5 installation on your system. What is your HDF5_DIR or HDF5_ROOT variable? And how did you install hdf5?

I want to do some open source contributions, so I am building it from source, is there any alternative to do so please let me know, I am kind of exahusted in doing this installation.

I have installed HDF5 from the source. Please help me to set the vairbales, I have attached picture for your reference.

I usually work with DOLFINx through docker (even when developing).
I start from ghcr.io/fenics/dolfinx/dev-env:current
(Package dolfinx/dev-env · GitHub)
and only install ufl, basix, ffcx and dolfinx from source.

What do you mean by this? What explicit commands did you call when install HDF5?

Hi,

I am installing dolfinx from source as I am using Manjaro Linux instead of Debian or Ubunto (*). With the latest release of dolfinx (tagged v0.9.0.post1) I get the following error message:

Could not find a configuration file for package "Basix" that is compatible with requested version "0.10".

The following configuration files were considered but not accepted:

/some-path/lib/python3.13/site-packages/basix/lib/cmake/basix/BasixConfig.cmake, version: 0.9.0

So it seems like dolfinx is looking for a version of basix that is not released yet - when I check the repository the latest version is tagged v0.9.0.

Which version of dolfinx should I use to avoid this dependency conflict?

(*) it would be nice if this software would be released as an Arch or Manjaro package as well :innocent:

Are you sure you are on the correct tag?
Looking at the source code
: dolfinx/cpp/CMakeLists.txt at v0.9.0.post1 · FEniCS/dolfinx · GitHub it states 0.9

Apparantly I was not. I now checked out git checkout v0.9.0.post1 and the CMakeList.txt says indeed version 0.9.0 for basix. Somehow I thought upon cloning the repository it would be at the latest tag by default. My bad.

Thanks for the help!