Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With WITH_SDFTD3=ON configure finds the external package toml-f package but built binaries aren't linked with libtoml-f.so #1040

Closed
yurivict opened this issue May 26, 2022 · 4 comments
Labels
library: s-dftd3 Related to s-dftd3 external dependency (dispersion)

Comments

@yurivict
Copy link
Contributor

Version 22.1

@awvwgk
Copy link
Member

awvwgk commented May 26, 2022

That's the expected behavior, TOML Fortran is not a dependency of the s-dftd3 library.

@awvwgk awvwgk added the library: s-dftd3 Related to s-dftd3 external dependency (dispersion) label May 26, 2022
@awvwgk
Copy link
Member

awvwgk commented May 26, 2022

See

https://github.com/dftd3/simple-dftd3/blob/598bf8c55d3aef095f958bfc3cafd79fe3fd8871/CMakeLists.txt#L50-L57

TOML Fortran is only included for the s-dftd3 binary.

@awvwgk awvwgk closed this as completed May 26, 2022
@yurivict
Copy link
Contributor Author

That's the expected behavior, TOML Fortran is not a dependency of the s-dftd3 library.

I use s-dftd3 from the external package, so it shouldn't be searched for, but it still attempts to find it:

-- toml-f: Trying to find installed package
-- toml-f: Installed package found
-- s-dftd3: Trying to find installed package
-- s-dftd3: Installed package found

IMO the order should be changed, and the conditional should be added.

@awvwgk
Copy link
Member

awvwgk commented May 26, 2022

DFTB+ tries to find all dependencies in the current order to avoid that subprojects can invoke their finders over the DFTB+ provided ones. However, since this is only relevant for submodule dependencies and not for external dependencies, we introduced

dftbplus/CMakeLists.txt

Lines 177 to 178 in c249548

# If INCLUDE_INDIRECT_DEPS is non-empty, indirect dependencies must also be explicitely treated
string(REGEX MATCH "(^|;)[Ss]ubmodule(^|;)" INCLUDE_INDIRECT_DEPS "${HYBRID_CONFIG_METHODS}")

Which will disable all transient dependencies, but requires to explicitly exclude the Submodule hybrid-dependency method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library: s-dftd3 Related to s-dftd3 external dependency (dispersion)
Projects
None yet
Development

No branches or pull requests

2 participants