Then I create a new directory within that folder with mkdir -p build
Change directory then build with:
cd build
cmake ..
I get error:
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find UFCx: Found unsuitable version “0.4.2”, but required is at
least “0.5” (found /usr/lib/python3/dist-packages/ffcx/codegeneration)
I tried to update the version for UFCx but it’s included with fenics-ffcx which latest version is 0.4.2. Why is the dolfinx build trying to demand a version that doesn’t exist yet and how can I change it? Is there a separate installation for UFCx?
I am not totally sure, but I guess your error is not complaining about the ffcx version but about the ufcx version, which is defined in the ufcx.h file as 0.5.1 to date.
Anyway, ffcx has been just updated with the 0.5.0 release, so a local build of ffcx should solve the problem.
I tried reinstalling from source and now I’m getting:
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from fenics-ffcx==0.5.1.dev0) (59.6.0)
ERROR: Could not find a version that satisfies the requirement fenics-ufl<2022.4.0,>=2022.3.0.dev0 (from fenics-ffcx) (from versions: 2017.1.0.post1, 2017.2.0, 2018.1.0, 2019.1.0, 2022.1.0.post0)
ERROR: No matching distribution found for fenics-ufl<2022.4.0,>=2022.3.0.dev0
I tried pulling and reinstalling fenics-ufl from source but the latest version seems to be 2022.1.0 is there a later version between 2022.3.0<=version<=2022.4.0?
Since the dolfinx version was updated 2 hours ago I seem to have managed to get everything to be compatible now.
So the solution seemed to be:
Uninstall and remove ufl, fffx and dolfinx.
clone the repositories (the ufl documentation took me to a bitbucket link but this seemed to be behind the git repository so removing that and clone from github gave me the latest verion. All of them are at Fenics-Github
build each module and pip install . inside each source directory.
Pull dolfinx and build inside the cpp directory of the dolfinx source.
install dolfinx.
Commands:
git clone --recursive https://github.com/FEniCS/ffcx .ffcx
git clone --recursive https://github.com/FEniCS/ufl .ufl
git clone --recursive https://github.com/FEniCS/basix .basix
git clone --recursive https://github.com/FEniCS/dolfinx .dolfinx
mkdir -p .basix/cpp/build
mkdir -p .dolfinx/cpp/build
cd ~/.basix/cpp/build
cmake ..
make install
cd ~/.basix
pip install .
cd .ffcx/
pip install .
cd ~/.ufl
pip install .
cd ~/.dolfinx/cpp/build
cmake ..
make install
My intial problem was that I was trying to install the latest versions but the packages were clashing. This seemed to get rectified but removing all the packages that had clashes then reinstalling, since the updating one by one wasn’t working with the old versions there.
Hope this helps anyone else with a similar problem.