scipy: BLD: meson build failure - missing `xsimd.hpp`
Describe your issue.
Using environment_meson.yml
.
Ubuntu: 20.4
python 3.10
Conda: 4.11.0
Build fails with missing hpp
file
python dev.py --build-only
In file included from scipy/stats/_hypotests_pythran.cpp:24:
/home/eduardo/miniconda3/envs/scipy-meson/lib/python3.10/site-packages/pythran/pythonic/include/numpy/ceil.hpp:8:10: fatal error: xsimd/xsimd.hpp: No such file or directory
8 | #include <xsimd/xsimd.hpp>
I noticed the compilation command includes: -I"${CONDA_PREFIX}"/include/python3.10
but the xsimd
files are located at ${CONDA_PREFIX}"/include
(notice the path on command has an extra python3.10
in path).
Reproducing Code Example
python dev.py --build-only (scipy-meson)
The Meson build system
Version: 0.61.2
Source dir: /home/eduardo/work/scipy/scipy-doit
Build dir: /home/eduardo/work/scipy/scipy-doit/build
Build type: native build
Project name: SciPy
Project version: 1.9.0.dev0
C compiler for the host machine: cc (gcc 9.4.0 "cc (GCC) 9.4.0")
C linker for the host machine: cc ld.bfd 2.36.1
C++ compiler for the host machine: c++ (gcc 9.4.0 "c++ (GCC) 9.4.0")
C++ linker for the host machine: c++ ld.bfd 2.36.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Library m found: YES
Fortran compiler for the host machine: gfortran (gcc 9.4.0 "GNU Fortran (GCC) 9.4.0")
Fortran linker for the host machine: gfortran ld.bfd 2.36.1
Program cython found: YES (/home/eduardo/miniconda3/envs/scipy-meson/bin/cython)
Program pythran found: YES (/home/eduardo/miniconda3/envs/scipy-meson/bin/pythran)
Program cp found: YES (/usr/bin/cp)
Program python3 found: YES (/home/eduardo/miniconda3/envs/scipy-meson/bin/python3.10)
WARNING: Python files installed by Meson might not be found by python interpreter.
This warning can be avoided by setting "python.platlibdir" option.
WARNING: Python files installed by Meson might not be found by python interpreter.
This warning can be avoided by setting "python.purelibdir" option.
Found pkg-config: /home/eduardo/miniconda3/envs/scipy-meson/bin/pkg-config (0.29.2)
Library npymath found: YES
Library npyrandom found: YES
Run-time dependency openblas found: YES 0.3.18
Dependency openblas found: YES 0.3.18 (cached)
Program _build_utils/cythoner.py found: YES (/home/eduardo/miniconda3/envs/scipy-meson/bin/python3.10 /home/eduardo/work/scipy/scipy-doit/scipy/_build_utils/cythoner.py)
Checking for function "open_memstream" : NO
Configuring messagestream_config.h using configuration
Compiler for C++ supports arguments -fvisibility=hidden: YES
Checking for size of "void*" : 8
Run-time dependency threads found: YES
Checking for size of "void*" : 8
Dependency threads found: YES unknown (cached)
Compiler for C++ supports arguments -fvisibility=hidden: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C++ supports arguments -Wno-format-truncation: YES
Compiler for C++ supports arguments -Wno-class-memaccess: YES
Build targets in project: 196
SciPy 1.9.0.dev0
User defined options
prefix: /home/eduardo/work/scipy/scipy-doit/build-install
Error message
Meson build setup OK
ninja: Entering directory `build'
[794/1557] Compiling C++ object scipy/stats/_h....p/meson-generated_..__hypotests_pythran.cpp.o
FAILED: scipy/stats/_hypotests_pythran.cpython-310-x86_64-linux-gnu.so.p/meson-generated_..__hypotests_pythran.cpp.o
c++ -Iscipy/stats/_hypotests_pythran.cpython-310-x86_64-linux-gnu.so.p -Iscipy/stats -I../scipy/stats -I/home/eduardo/miniconda3/envs/scipy-meson/lib/python3.10/site-packages/pythran -I/home/eduardo/miniconda3/envs/scipy-meson/lib/python3.10/site-packages/numpy/core/include -I/home/eduardo/miniconda3/envs/scipy-meson/include/python3.10 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -O2 -g -fPIC -Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations -Wno-int-in-bool-context -DENABLE_PYTHON_MODULE -D__PYTHRAN__=3 -DPYTHRAN_BLAS_NONE -MD -MQ scipy/stats/_hypotests_pythran.cpython-310-x86_64-linux-gnu.so.p/meson-generated_..__hypotests_pythran.cpp.o -MF scipy/stats/_hypotests_pythran.cpython-310-x86_64-linux-gnu.so.p/meson-generated_..__hypotests_pythran.cpp.o.d -o scipy/stats/_hypotests_pythran.cpython-310-x86_64-linux-gnu.so.p/meson-generated_..__hypotests_pythran.cpp.o -c scipy/stats/_hypotests_pythran.cpp
In file included from scipy/stats/_hypotests_pythran.cpp:24:
/home/eduardo/miniconda3/envs/scipy-meson/lib/python3.10/site-packages/pythran/pythonic/include/numpy/ceil.hpp:8:10: fatal error: xsimd/xsimd.hpp: No such file or directory
8 | #include <xsimd/xsimd.hpp>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
[803/1557] Compiling C++ object scipy/sparse/s...ls.cpython-310-x86_64-linux-gnu.so.p/bsr.cxx.o
ninja: build stopped: subcommand failed.
Build failed!
SciPy/NumPy/Python version information
(1.9.0.dev0’, ‘1.22.2’, sys.version_info(major=3, minor=10, micro=2, releaselevel=‘final’, serial=0)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (18 by maintainers)
Commits related to this issue
- BLD: meson, explicitly add xsimd as dependency. Fix #15698. — committed to schettino72/scipy by schettino72 2 years ago
- BLD: meson, mark xsimd as not required (pkg-config not available on pip envs). (gh-15698) — committed to schettino72/scipy by schettino72 2 years ago
- BLD: detect `xsimd` if it's installed and add to pythran dependency Fixes `xsimd/xsimd.hpp: No such file or directory`, as reported in gh-15698 and gh-18415. — committed to rgommers/scipy by rgommers a year ago
@akhmerov No. I just used bash. My previous comment here has links to issues on conda dealing with this issue.
Thanks. So the problem is a missing
CXXFLAGS
on my env.I did activate my conda env but I was using FISH shell. It works ok when I use BASH. Checking the conda issue tracker I can see a few known issues related to these activation scripts on FISH.
https://github.com/conda/conda/issues/6820 https://github.com/conda/conda/issues/7993 https://github.com/conda/conda-build/issues/4012
I will try to dig a bit or just use BASH.