Problems finding MPFR

Looks like this issue has come up before, but quite a while ago. Over the weekend I attempted a new build of psi4 after a git pull. This is on a linux box with cmake v.3-17.1 and I’m not using conda. The configure error message is (note: the mpfr library is in my LD_LIBRARY_PATH env variable):

[ 45%] Performing configure step for ‘libint2_external’
loading initial cache file /home/kipeters/psi4/ale/external/upstream/libint2/libint2_external-prefix/tmp/libint2_external-cache-Release.cmake
– Version: Full 2.7.0-beta.6 Numeric 2.7.0
– SO Version: Full 2:3:0 Major 2
– Setting option CMAKE_BUILD_TYPE: Release
– Setting option BUILD_SHARED: OFF
– Setting option BUILD_STATIC: ON
– Setting option ENABLE_CXX11API: ON
– Setting option ENABLE_FORTRAN: OFF
– Setting option BUILD_TESTING: ON
– Setting option LIBINT2_SHGAUSS_ORDERING: gaussian
– Setting option LIBINT2_CARTGAUSS_ORDERING: standard (read-only from generation-time)
– Setting option LIBINT2_SHELL_SET: standard (read-only from generation-time)
– Setting option ENABLE_XHOST: ON
– Performing Test CMAKE_CXX_FLAGS [-xHost] - Failed
– Performing Test CMAKE_CXX_FLAGS [-march=native] - Failed
– Performing Test CMAKE_CXX_FLAGS [/arch:AVX2] - Failed
CMake Warning at cmake/psi4OptionsTools.cmake:71 (message):
Option unfulfilled as none of -xHost;-march=native;/arch:AVX2 valid
Call Stack (most recent call first):
cmake/psi4OptionsTools.cmake:123 (add_C_or_CXX_flags)
cmake/psi4OptionsTools.cmake:148 (add_CXX_flags)
cmake/psi4OptionsTools.cmake:163 (add_flags)
CMakeLists.txt:61 (option_with_flags)

– Setting option BUILD_FPIC: ON
– Setting option CMAKE_INSTALL_LIBDIR: lib
CMake Error at /home/kipeters/src/cmake-3.17.1/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
Could NOT find MPFR (missing: MPFR_INCLUDE MPFR_LIBRARY MPFR_VERSION_OK)
(Required is at least version “1.0.0”)
Call Stack (most recent call first):
/home/kipeters/src/cmake-3.17.1/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
cmake/FindMPFR.cmake:84 (find_package_handle_standard_args)
CMakeLists.txt:96 (find_package)

– Configuring incomplete, errors occurred!

My cmake commands are:

cmake -H. -Bale
-DCMAKE_C_COMPILER=/share/apps/gcc10/bin/gcc
-DCMAKE_CXX_COMPILER=/share/apps/gcc10/bin/g++
-DCMAKE_Fortran_COMPILER=gfortran
-DMPFR_LIBRARY=/share/apps/lib
-DPYTHON_EXECUTABLE=/share/apps/anaconda3/bin/python
-DMAX_AM_ERI=6
-DCMAKE_INSTALL_PREFIX=/share/apps/psi4/ale
-DENABLE_dkh=ON
-DBLAS_TYPE=MKL
-DLAPACK_LIBRARIES=/share/apps/intel/mkl/lib/intel64/libmkl_rt.so
-DOpenMP_LIBRARY_DIRS=/share/apps/intel/lib/intel64/
-DLAPACK_INCLUDE_DIRS=/share/apps/intel/mkl/include/

Build problems are for @loriab.

You’re probably already aware, but conda makes installs easier.

I’d like to avoid yet another package to learn and keep updating, hence my reluctance to jump into conda

I decided to jump into a conda build, but after following the instructions in the docs, executing psi4-path-advisor -gcc gives me:

python: /lib64/libc.so.6: version `GLIBC_2.15’ not found (required by python)

python: /lib64/libc.so.6: version `GLIBC_2.14’ not found (required by python)

python: /lib64/libc.so.6: version `GLIBC_2.17’ not found (required by python)

so I seem to be dead (again). I’m running CentOS 6.3 and upgrading really isn’t an option right now.

Ah yes, I was hit by that too. Try conda install gxx_linux-64=7.5.

I don’t know the details of your environment, but conda should handle a lot of the “packages to keep updating” for you.

As for your original problem, all I can do is ping @loriab.

I think I have some success tonight with a non-conda build (although I used conda to satisfy a bunch of dependencies). The trick was finding the CMakeLists.txt file for libint2 and seeing which environment variable needed to be set to find MPFR. Turns out MPFR_ROOT was the magic one. Then I just had to point that to the anaconda directory where the lib also held other problems like gmpxx, etc. Seems to be building now. I assumed Lori might be on vacation, so I didn’t want to ping her directly.

Sorry, I guess I need a hammer more than a ping. This is sort of like Build fails due to missing Eigen3 · Issue #2046 · psi4/psi4 · GitHub . I don’t have dependencies of dependencies ironed out in CMake for Libint2 for arbitrary (or system) locations. But, yes, as Jonathon says, psi4-dev and psi4-path-advisor will handle this: psi4meta/psi4DepsCache.cmake at master · psi4/psi4meta · GitHub .

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.