xtb's dependency hell
xtb has multiple dependencies and those also have their own dependensies... Their versions are managed via subprojects/*.wrap files which are not unified between different deps sometimes.
To Reproduce
- clone xtb
- configure for example with cmake via command
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran - run
head -n 10 `find . -name "*.wrap" | rev | sort | rev | grep subprojects`
One will see something like:
==> ./subprojects/toml-f.wrap <==
[wrap-git]
directory = toml-f
url = https://github.com/toml-f/toml-f
revision = v0.4.1
==> ./build/_deps/s-dftd3-src/subprojects/toml-f.wrap <==
[wrap-git]
directory = toml-f
url = https://github.com/toml-f/toml-f
revision = v0.2.4
==> ./build/_deps/tblite-src/subprojects/toml-f.wrap <==
[wrap-git]
directory = toml-f
url = https://github.com/toml-f/toml-f
revision = v0.4.0
So, s-dftd3, tblite and xtb have different versions of toml-f. At build/_deps/toml-f-src, I have v0.4.0, not v0.4.1 or v0.2.4... So, it is not clear which version will be downloaded first :) I suppose for toml-f it is not so critical, but for dftd4 it is because old v3.4.0 was selected.
Expected behaviour All deps must have the same version
We should also consider pinning tblite to a release version and not to HEAD (both meson and cmake).
@thfroitzheim, please, reopen this issue. Not all places were updated properly.
One of them is here: https://github.com/grimme-lab/xtb/blob/d3f212ba83287290efafee6580670d02d7b2f49d/cmake/modules/xtb-utils.cmake#L105
We have to add the revision, which we pass for each dependency, also to the utility function similar to tblite.