Eigen Not Compiling When Building From Source on Mac

Hi,

I have been attempting to install Psi4 from source on my M1 Max Macbook in order to use the Accelerate framework as my BLAS/LAPACK. Creating the build happens without any errors, but around the 96% mark (Performing build step for ‘psi4-core’) a fatal error pops up saying that the headers in the Eigen folder cannot be found:

[ 1%] Built target update_version
In file included from /Users/caracallynx/Downloads/psi4/psi4/src/psi4/libdisp/dispersion.cc:37:
/Users/caracallynx/Downloads/psi4/psi4/src/psi4/libmints/matrix.h:39:10: fatal error: eigen3/Eigen/Core: No such file or directory
39 | #include <eigen3/Eigen/Core>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.

which is strange, because the program earlier detected the Eigen include folder:

-- Found Eigen3: EIGEN3_INCLUDE_DIR=/Users/caracallynx/miniconda3/envs/bioinfo/include/eigen3

Is there something I’m doing wrong with the build? Any help would suffice. I will attach the output of the build step if that helps anyone detect the issue, and below is a list of the programs in my current conda environment:

out.txt (267.3 KB)

# packages in environment at /Users/caracallynx/miniconda3/envs/bioinfo:
#
# Name                       Version          Build                    Channel
annotated-types              0.7.0            pyhd8ed1ab_1             conda-forge
blas                         1.0              openblas
bzip2                        1.0.8            h80987f9_6
c-ares                       1.34.5           h5505292_0               conda-forge
ca-certificates              2025.12.2        hca03da5_0
cython                       3.2.2            py312haa24f5a_0
eigen                        5.0.1            h9e3ec18_0
expat                        2.7.3            h982b769_0
flexcache                    0.3              pyhd8ed1ab_1             conda-forge
flexparser                   0.4              pyhd8ed1ab_1             conda-forge
fmt                          12.0.0           h669d743_0               conda-forge
hdf5                         1.14.6           nompi_he65715a_103       conda-forge
khronos-opencl-icd-loader    2025.07.22       hd95654c_0
krb5                         1.21.3           h237132a_0               conda-forge
libaec                       1.1.4            h51d1e36_0               conda-forge
libcurl                      8.17.0           hdece5d2_0               conda-forge
libcxx                       20.1.8           hd7fd590_1
libedit                      3.1.20250104     pl5321hafb1f1b_0         conda-forge
libev                        4.33             h93a5062_2               conda-forge
libexpat                     2.7.3            haf25636_0               conda-forge
libffi                       3.4.4            hca03da5_1
libgfortran                  15.2.0           h09d7db9_1
libgfortran5                 15.2.0           hb654fa1_1
libnghttp2                   1.67.0           hc438710_0               conda-forge
libopenblas                  0.3.30           hf2bb037_2
libsqlite                    3.51.1           h9a5124b_0               conda-forge
libssh2                      1.11.1           h1590b86_0               conda-forge
libzlib                      1.3.1            h5f15de7_0
llvm-openmp                  20.1.8           he822017_0
lz4-c                        1.9.4            h313beb8_1
meson                        1.9.1            pyhcf101f3_0             conda-forge
meson-python                 0.18.0           py312hbe26d11_1
msgpack-python               1.1.1            py312h313beb8_0
ncurses                      6.5              hee39554_0
networkx                     3.5              py312hca03da5_0
ninja                        1.13.2           h49c215f_0               conda-forge
numpy                        2.5.0.dev0       pypi_0                   pypi
numpy-base                   1.26.4           py312hae06d03_1
ocl_icd_wrapper_apple        1.0.0            h27ca646_0               conda-forge
opencl-headers               2025.07.22       hc918bfe_0
openmm                       8.1.2            py312hd362c0c_3_khronos  conda-forge
openssl                      3.6.0            h5503f6c_0               conda-forge
packaging                    25.0             py312hca03da5_1
pint                         0.25.2           pyhcf101f3_0             conda-forge
pip                          25.3             pyhc872135_0
platformdirs                 4.5.0            pyhcf101f3_0             conda-forge
psutil                       7.0.0            py312haa24f5a_1
py-cpuinfo                   9.0.0            py312hca03da5_0
pybind11                     2.13.6           py312h48ca7d4_1
pybind11-abi                 5                hd3eb1b0_0
pybind11-global              2.13.6           py312h48ca7d4_1
pydantic                     2.12.5           pyhcf101f3_1             conda-forge
pydantic-core                2.41.5           py312h6ef9ec0_1          conda-forge
pyproject-metadata           0.9.0            py312hb41f31a_0
python                       3.12.8           h89a136b_0_cpython       conda-forge
python_abi                   3.12             3_cp312
readline                     8.3              h0b18652_0
scipy                        1.13.1           py312ha409365_1
setuptools                   80.9.0           py312hca03da5_0
sqlite                       3.51.0           hab6afd1_0
tk                           8.6.15           hcd8a7d5_0
typing-extensions            4.15.0           h396c80c_0               conda-forge
typing-inspection            0.4.2            pyhd8ed1ab_1             conda-forge
typing_extensions            4.15.0           pyhcf101f3_0             conda-forge
tzdata                       2025b            h04d1e81_0
wheel                        0.45.1           py312hca03da5_0
xz                           5.6.4            h80987f9_1
zlib                         1.3.1            h5f15de7_0
zstd                         1.5.7            h817c040_0

Hi SASTargetX,

My only advice is probably what you already know but it helps me compile an older Psi4 version.

  1. Install the homebrew eigen.
  2. Check the flag ‘-L/Path/To/Eigen/lib’ is in LDFLAGS. If not export LDFLAGS with this and recompile from the CMake step (to prioritise this path for CMake over other options).

Good luck!