While building Psi4-1.3, I am getting such an error message:
Scanning dependencies of target cc
In file included from /home/eve/Git/psi4-1.3/psi4/src/psi4/libmints/eribase.cc:33:
/home/eve/Git/psi4-1.3/psi4/src/psi4/libmints/eri.h:33:10: fatal error: libderiv/libderiv.h: No such file or directory #include <libderiv/libderiv.h>
src/psi4/libmints/CMakeFiles/mints.dir/build.make:387: recipe for target ‘src/psi4/libmints/CMakeFiles/mints.dir/eribase.cc.o’ failed
make: *** [src/psi4/libmints/CMakeFiles/mints.dir/eribase.cc.o] Error 1
make: *** Waiting for unfinished jobs…
I have tried to find the libderiv.h file, but it does not seem that it is located somewhere in the repository. Did I miss any configuration before cmake?
I would really appreciate if anyone has any hint how to solve the problem.
What @loriab said in that discussion was to simply copy include/libderiv/libderiv.h to include/libint/libderiv.h. The current version of Psi4 has a different structure and these paths do not lead to libderiv.h. I ran the command: find -name libderiv.h to find a location of the libderiv.h, but it does not exist.
libint/libderiv isn’t in the psi4 source – it’s an external dependency that either gets detected as pre-built (you cloned and built it elsewhere or installed through a package manager) or gets cloned and built before psi4 builds. I suspect you have the former. You should find where libint is installed that it’s detecting (printed in cmake output or in Libint_DIR of <objdir>/CMakeCache.txt) and do the copying there.
Thank you for your explanation, @loriab! I checked the path which is:
so that dependencies are pulled out from the anaconda package. There are only cmake files. Does it mean that I should update anaconda? What do you think?
I just got the same string of errors today when building the last version of Psi4 but on under Linux, not MacOS. Python comes from an Anaconda3 install. I’m using gcc 9.2.1. What is the best fix for this (and why does it happen)?
For one thing, psi v1.3 uses gau2grid v1 and psi4 master uses gau2grid v2, so make you have the right lib built. Second, even if you built the right one, if the other one is still findable (LD_LIBRARY_PATH and such), it can mess up runtime. ldd -v core.*so can help reveal the current state.
Deleted everything today, did a fresh clone from the git repository, rebuilt Anaconda3, rebuilt psi4. Same issue. I’m using a much more up-to-date gcc (9.2.1) compared to the system one, which is very old. But cmake seems to find all the right paths and such.