Repository navigation
Description
The build of the the scipy extension of SciPy-bundle v2024.05 failed in #1210 with:
In file included from ../scipy/scipy-1.13.1/scipy/io/_fast_matrix_market/src/_fmm_core_read_coo.cpp:5:
../scipy/scipy-1.13.1/scipy/io/_fast_matrix_market/src/_fmm_core.hpp:14:10: fatal error: pybind11/pybind11.h: No such file or directory
14 | #include <pybind11/pybind11.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
This looks rather strange and I started wondering if it could be related to switching to search-path-cpp-headers = include_paths for 2025.06. While inspecting the log, I noticed that right before the build started the following C_INCLUDE_PATH was used.
== 2025-10-01 08:55:18,072 environment.py:95 INFO Environment variable CPLUS_INCLUDE_PATH set to /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas
(previous value: '/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenBLAS/0.3.27-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pybind11/2.12.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Boost/1.85.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/ICU/75.1-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/zstd/1.5.6-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/lz4/1.9.4-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pkgconf/2.2.0-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Python/3.12.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenSSL/3/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/libffi/3.4.5-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/SQLite/3.45.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Tcl/8.6.14-GCCcore-13.3.0/include')
So it somehow overwrote the existing C_INCLUDE_PATH (which already included paths to FFTW and FlexiBLAS, but also to all other deps incl pybind11) by paths to only FFTW and FlexiBLAS. That definitely doesn't look right.
To confirm that it's really related to this setting, I did another build without this new search-path-cpp-headers setting (unset EASYBUILD_SEARCH_PATH_CPP_HEADERS), and that worked fine. Furthermore, jumping into the EB interactive shell and manually adding the path to the pybind11 header files indeed also solves the issue. So, why is it overwriting the correct CPLUS_INCLUDE_PATH by one that, apparently (?), only contains paths to the toolchain components?
Some more relevant lines from the log file, all just before the build starts:
os.environ["CPLUS_INCLUDE_PATH"] = "/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenBLAS/0.3.27-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pybind11/2.12.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Boost/1.85.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/ICU/75.1-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/zstd/1.5.6-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/lz4/1.9.4-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pkgconf/2.2.0-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Python/3.12.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenSSL/3/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/libffi/3.4.5-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/SQLite/3.45.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Tcl/8.6.14-GCCcore-13.3.0/include";
This is still correct. But then toolchain.py is changing the build environment:
== 2025-10-01 08:55:18,060 toolchain.py:1170 DEBUG Adding header paths to toolchain variable 'CPLUS_INCLUDE_PATH': /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0
== 2025-10-01 08:55:18,064 toolchain.py:1170 DEBUG Adding header paths to toolchain variable 'CPLUS_INCLUDE_PATH': /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0
== 2025-10-01 08:55:18,066 toolchain.py:1170 DEBUG Adding header paths to toolchain variable 'CPLUS_INCLUDE_PATH': /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0
== 2025-10-01 08:55:18,072 toolchain.py:1206 DEBUG _setenv_variables: setting environment variable CPLUS_INCLUDE_PATH to /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas
== 2025-10-01 08:55:18,072 environment.py:95 INFO Environment variable CPLUS_INCLUDE_PATH set to /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas (previous value: '/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenBLAS/0.3.27-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pybind11/2.12.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Boost/1.85.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/ICU/75.1-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/zstd/1.5.6-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/lz4/1.9.4-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pkgconf/2.2.0-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Python/3.12.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/OpenSSL/3/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/libffi/3.4.5-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/SQLite/3.45.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Tcl/8.6.14-GCCcore-13.3.0/include')
== 2025-10-01 08:55:18,072 environment.py:95 INFO Environment variable EBVARCPLUS_INCLUDE_PATH set to /cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas (previously undefined)
Right after the build failure (between 8:56 and 9:00), EB also detects that the variable was changed:
== 2025-10-01 09:00:23,541 environment.py:168 DEBUG Key in new environment found that is not in old one: CPLUS_INCLUDE_PATH (/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/Python/3.12.3-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pybind11/2.12.0-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/pkgconf/2.2.0-GCCcore-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FFTW/3.3.10-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include:/cvmfs/software.eessi.io/versions/2025.06/software/linux/x86_64/amd/zen2/software/FlexiBLAS/3.4.4-GCC-13.3.0/include/flexiblas)
I suspect that the environment gets changed by https://github.com/easybuilders/easybuild-framework/blob/easybuild-framework-v5.1.2/easybuild/tools/toolchain/toolchain.py#L901, but I'm not sure why it doesn't take the existing environment variables into account here, and simply overwrites them.
Activity
bedroge commentedon Oct 3, 2025
Tried to reproduce this with a simple easyconfig:
But this worked fine. Some relevant lines from the log file:
So, here the environment variable is constructed in the right way... maybe it's specific to the MesonNinja easyblock?
bedroge commentedon Oct 6, 2025
Actually, it does reproduce the issue. The log messages in my previous message were from the easyconfig itself, right after that it's going to redo this for the extension, and then you do see the same issue again:
So I guess it's an issue for extensions, they seem to ignore the current value of the variables and reset/override them.
bedroge commentedon Oct 7, 2025
I was not too familiar with this part of the framework, so I'm not sure if I got everything right, but I think this is what used to happen in the old situation (with older EB versions / without the new
--search-path-cpp-headers=include_paths):Now in the new situation, where we use a new EB and set
--search-path-cpp-headers=include_pathsand--module-search-path-headers=include_paths, there is one really big difference: when the the build environment is reset for the extension, the modules of dependencies are still loaded and these setCPLUS_INCLUDE_DIRS, but then toolchain.py calls_setenv_variables, and this overrides that environment variable with paths pointing only to the toolchain components (as in the old situation, extensions still don't seem to have dependencies).In other words: the main issue is that in the past we had two different environment variables next to each other ($CPATH and $CPPFLAGS), one coming from module files and (an incomplete?) one set by toolchain.py, but now we only use a single one that is set by both the modules and (again) by toolchain.py. Since the latter does not know about dependencies for extensions, it sets the wrong value.
boegel commentedon Oct 9, 2025
I looked into this problem together with @bedroge, and we figured out that it was essentially a bug in EasyBuild framework, which only manifests when
--search-path-cpp-headers=include_pathsis used, which is fixed by:toolchain.preparewhen setting up build environment for extensions easybuilders/easybuild-framework#5023The list of dependencies was not passed down to
toolchain.preparewhen the build environment is being set up for (building and) installing an extension.That led to the toolchain only taking toolchain components into account when (hard) setting the
$C_INCLUDE_PATHenvironment variable, and hence the path to$EBROOTPYBIND11/includewas no longer listed there, which led topybind11/pybind11.hnot being found.This problem doesn't occur when the default configuration (
--search-path-cpp-headers=flags) is being used, because then only$CPPFLAGSis being set bytoolchain.prepare, and the$CPATHvariable which gets populated by the modules that are loaded for the dependencies if left untouched.bedroge commentedon Oct 29, 2025
This has been solved by easybuilders/easybuild-framework#5023, which was applied as patch to the existing EB 5.1.2 installation in EESSI (#1267 and #1268). So, the issue can be closed.