Installation of DOLFINx on Ubuntu22.04 from Source File

Hello,

I am a new user of Fenics, I was trying to build the Dolfinx on Ubuntu-22.04 from the source but getting the following issue.
Any inputs on this will be greatly appreciated.

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find UFCx: Found unsuitable version “0.3.0”, but required is at
least “0.5” (found /usr/lib/python3/dist-packages/ffcx/codegeneration)

  Reason given by package: UFCx could not be found.

Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindUFCx.cmake:63 (find_package_handle_standard_args)
CMakeLists.txt:215 (find_package)

Hi,

Could you provide more details on the steps you followed for the installation? It seems you have an old version of ufcx.

Hello,

I followed the steps mentioned in the installation as mentioned in this link
https://docs.fenicsproject.org/dolfinx/main/python/installation.html#source

I have first installed the requirement for C++ core.

After that, I tried to run the command cmake …/ but failed.
For UCFx, I used `this command
``
sudo apt-get -y install python-ffcx-doc

After that, I also ran the command sudo apt-get dist-upgrade and could not upgrade the version of UCFx on Ubuntu22.04.

Please let me know how to update the version of UCFx. 

TIA,
Surabhi

Try to install FFCx (and therefore UFCx) by following the official installation instructions, that you can find here.

Hello CastriMik,

Thank you very much for the input. Now, I am getting another error

make[2]: *** No rule to make target ‘/home/surabhi/opt/pugixml-master/libpugixml.a’, needed by ‘dolfinx/libdolfinx.so.0.5.1.0’. Stop.
make[1]: *** [CMakeFiles/Makefile2:304: dolfinx/CMakeFiles/dolfinx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

related to pugixml.

I have downloaded pugixml from this link;
https://github.com/zeux/pugixml, that I am getting the above error.
I am not sure about the “/libpugixml.a’”

Please let me know how to solve this issue.

TIA,
Surabhi

How did you install pugixml? Please also consider to install DOLFINx with one of the other suggested ways, since installation from source can require a lot of troubleshooting, especially if you have never done it before.

Hi,

Thanks fro the reply, I am able to install it from the source file.
I will write in future for the help/suggestions on computation.

With regards,
Surabhi

I ran into the same series of issues, but with required UFCx of version 0.6 while https://pypi.org/project/fenics-ffcx/#history gave a 0.5.0 download. I was able to fix the “libpugixml.a” error by removing my current pugixml, cloning the above github repo, and running cmake . and sudo make install within the repo.