xtb icon indicating copy to clipboard operation
xtb copied to clipboard

xtb's dependency hell

Open foxtran opened this issue 1 year ago • 3 comments

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

  1. clone xtb
  2. 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
  3. 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

foxtran avatar Oct 26 '24 05:10 foxtran

We should also consider pinning tblite to a release version and not to HEAD (both meson and cmake).

marvinfriede avatar Feb 11 '25 14:02 marvinfriede

@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

foxtran avatar Jun 20 '25 13:06 foxtran

We have to add the revision, which we pass for each dependency, also to the utility function similar to tblite.

thfroitzheim avatar Jun 29 '25 15:06 thfroitzheim