tblite is unusable in python at the moment, failing with
Traceback (most recent call last):
File "/nix/store/pzbm5ci2h0qlnrzkqxhdm9f0vwr5kal6-python3.10-tblite-0.3.0/lib/python3.10/site-packages/tblite/library.py", line 28, in <module>
from ._libtblite import ffi, lib
ImportError: /nix/store/pzbm5ci2h0qlnrzkqxhdm9f0vwr5kal6-python3.10-tblite-0.3.0/lib/python3.10/site-packages/tblite/_libtblite.cpython-310-x86_64-linux-gnu.so: undefined symbol: __dftd3_model_MOD___vtab_dftd3_model_D3_model
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/nix/store/pzbm5ci2h0qlnrzkqxhdm9f0vwr5kal6-python3.10-tblite-0.3.0/lib/python3.10/site-packages/tblite/interface.py", line 26, in <module>
from . import library
File "/nix/store/pzbm5ci2h0qlnrzkqxhdm9f0vwr5kal6-python3.10-tblite-0.3.0/lib/python3.10/site-packages/tblite/library.py", line 30, in <module>
raise ImportError("tblite C extension unimportable, cannot use C-API")
ImportError: tblite C extension unimportable, cannot use C-API
prefix=/nix/store/8irr24ds1c3r08wclk11gpxp3c7f0p7w-toml-f-0.3.1
libdir=${prefix}/lib
includedir=${prefix}/include
Name: toml-f
Description: A TOML parser implementation for data serialization and deserialization in Fortran
Version: 0.3.1
Libs: -L${libdir} -ltoml-f
Cflags: -I${includedir} -I${includedir}/toml-f/GNU-12.2.0
Describe the bug
tblite is unusable in python at the moment, failing with
I think this is due to incorrect pkgconfig setups - look at https://github.com/NixOS/nixpkgs/blob/e608c90a1cf381dde6ac9e0f085337150f2af3e2/pkgs/development/libraries/toml-f/default.nix#L26
which is correct and outputs
vs
https://github.com/NixOS/nixpkgs/blob/e608c90a1cf381dde6ac9e0f085337150f2af3e2/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix#L27 which is missing the trailing
/
Which results in a pkgconfig of
Steps To Reproduce
Steps to reproduce the behavior:
import tblite.interface as tb
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
@sheepforce
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.