scipy: BUG: Build fails on latest commit
Describe your issue.
I am trying to build SciPy, it worked well, now it throws the following error when I try to build.
Reproducing Code Example
git clone https://github.com/scipy/scipy
cd scipy
git checkout 41c61b2de9a2dbef6705f961fe6836f1b5916d31
mamba env create -f environment.yml --force
conda activate scipy-dev
git submodule update --init
python dev.py build
Error message
% python dev.py build
💻 meson setup /Users/pranavchiku/repos/scipy/build --prefix /Users/pranavchiku/repos/scipy/build-install
The Meson build system
Version: 1.2.1
Source dir: /Users/pranavchiku/repos/scipy
Build dir: /Users/pranavchiku/repos/scipy/build
Build type: native build
Project name: SciPy
Project version: 1.12.0.dev0
C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 15.0.7 "clang version 15.0.7")
C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 609
C++ compiler for the host machine: arm64-apple-darwin20.0.0-clang++ (clang 15.0.7 "clang version 15.0.7")
C++ linker for the host machine: arm64-apple-darwin20.0.0-clang++ ld64 609
Cython compiler for the host machine: cython (cython 3.0.1)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python3 found: YES (/Users/pranavchiku/mambaforge/envs/scipy-dev/bin/python3.11)
Found pkg-config: /Users/pranavchiku/mambaforge/envs/scipy-dev/bin/pkg-config (0.29.2)
Run-time dependency python found: YES 3.11
Program cython found: YES (/Users/pranavchiku/mambaforge/envs/scipy-dev/bin/cython)
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Library m found: YES
Fortran compiler for the host machine: /Users/pranavchiku/mambaforge/envs/scipy-dev/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
Fortran linker for the host machine: /Users/pranavchiku/mambaforge/envs/scipy-dev/bin/arm64-apple-darwin20.0.0-gfortran ld64 609
Compiler for Fortran supports arguments -Wno-conversion: YES
Checking if "-Wl,--version-script" : links: NO
Program pythran found: YES (/Users/pranavchiku/mambaforge/envs/scipy-dev/bin/pythran)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency xsimd found: NO (tried pkgconfig, framework and cmake)
Run-time dependency threads found: YES
Library npymath found: YES
Library npyrandom found: YES
Run-time dependency pybind11 found: YES 2.11.1
Run-time dependency openblas found: YES 0.3.23
Dependency openblas found: YES 0.3.23 (cached)
Compiler for C supports arguments -Wno-maybe-uninitialized: NO
Compiler for C supports arguments -Wno-discarded-qualifiers: NO
Compiler for C supports arguments -Wno-empty-body: YES
Compiler for C supports arguments -Wno-implicit-function-declaration: YES
Compiler for C supports arguments -Wno-parentheses: YES
Compiler for C supports arguments -Wno-switch: YES
Compiler for C supports arguments -Wno-unused-label: YES
Compiler for C supports arguments -Wno-unused-variable: YES
Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
Compiler for C++ supports arguments -Wno-cpp: YES
Compiler for C++ supports arguments -Wno-deprecated-declarations: YES
Compiler for C++ supports arguments -Wno-class-memaccess: NO
Compiler for C++ supports arguments -Wno-format-truncation: NO
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-sign-compare: YES
Compiler for C++ supports arguments -Wno-switch: YES
Compiler for C++ supports arguments -Wno-terminate: NO
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES
Compiler for C++ supports arguments -Wno-unused-function: YES
Compiler for C++ supports arguments -Wno-unused-local-typedefs: YES
Compiler for C++ supports arguments -Wno-unused-variable: YES
Compiler for C++ supports arguments -Wno-int-in-bool-context: YES
Compiler for Fortran supports arguments -Wno-argument-mismatch: YES
Compiler for Fortran supports arguments -Wno-conversion: YES (cached)
Compiler for Fortran supports arguments -Wno-intrinsic-shadow: YES
Compiler for Fortran supports arguments -Wno-maybe-uninitialized: YES
Compiler for Fortran supports arguments -Wno-surprising: YES
Compiler for Fortran supports arguments -Wno-uninitialized: YES
Compiler for Fortran supports arguments -Wno-unused-dummy-argument: YES
Compiler for Fortran supports arguments -Wno-unused-label: YES
Compiler for Fortran supports arguments -Wno-unused-variable: YES
Compiler for Fortran supports arguments -Wno-tabs: YES
Compiler for Fortran supports arguments -Wno-argument-mismatch: YES (cached)
Compiler for Fortran supports arguments -Wno-conversion: YES (cached)
Compiler for Fortran supports arguments -Wno-maybe-uninitialized: YES (cached)
Compiler for Fortran supports arguments -Wno-unused-dummy-argument: YES (cached)
Compiler for Fortran supports arguments -Wno-unused-label: YES (cached)
Compiler for Fortran supports arguments -Wno-unused-variable: YES (cached)
Compiler for Fortran supports arguments -Wno-tabs: YES (cached)
Checking if "Check atomic builtins without -latomic" : links: YES
Configuring __config__.py using configuration
Checking for function "open_memstream" : YES
Configuring messagestream_config.h using configuration
Compiler for Fortran supports arguments -w: YES
Checking for size of "void*" : 8
Compiler for C supports arguments -Wno-unused-variable: YES (cached)
Compiler for C supports arguments -Wno-parentheses: YES (cached)
Compiler for C supports arguments -Wno-unused-label: YES (cached)
Compiler for C supports arguments -Wno-implicit-function-declaration: YES (cached)
Compiler for C supports arguments -Wno-switch: YES (cached)
Compiler for Fortran supports arguments -w: YES (cached)
Checking for size of "void*" : 8 (cached)
Build targets in project: 244
SciPy 1.12.0.dev0
User defined options
prefix: /Users/pranavchiku/repos/scipy/build-install
Found ninja-1.11.1 at /Users/pranavchiku/mambaforge/envs/scipy-dev/bin/ninja
Meson build setup OK
💻 ninja -C /Users/pranavchiku/repos/scipy/build -j8
ninja: Entering directory `/Users/pranavchiku/repos/scipy/build'
[12/1588] Linking target scipy/_lib/_fpumode.cpython-311-darwin.so
ld: warning: -pie being ignored. It is only used when linking a main executable
[13/1588] Linking target scipy/_lib/_test_ccallback.cpython-311-darwin.so
ld: warning: -pie being ignored. It is only used when linking a main executable
[52/1588] Compiling C object scipy/special/libcephes.a.p/cephes_airy.c.o
../scipy/special/cephes/airy.c:256:5: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
int airy(x, ai, aip, bi, bip)
^
.....
WARNING: Overriding pythran description with argspec information for: numpy.random.standard_normal
WARNING: Overriding pythran description with argspec information for: numpy.random.uniform
WARNING: Overriding pythran description with argspec information for: numpy.random.weibull
[1202/1588] Compiling C object scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/meson-generated__upfirdn_apply.c.o
FAILED: scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/meson-generated__upfirdn_apply.c.o
arm64-apple-darwin20.0.0-clang -Iscipy/signal/_upfirdn_apply.cpython-311-darwin.so.p -Iscipy/signal -I../scipy/signal -I../../../mambaforge/envs/scipy-dev/lib/python3.11/site-packages/numpy/core/include -I/Users/pranavchiku/mambaforge/envs/scipy-dev/include/python3.11 -fvisibility=hidden -fcolor-diagnostics -Wall -Winvalid-pch -std=c99 -O2 -g -Wno-unused-but-set-variable -Wno-unused-function -Wno-conversion -Wno-misleading-indentation -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/pranavchiku/mambaforge/envs/scipy-dev/include -D_FORTIFY_SOURCE=2 -isystem /Users/pranavchiku/mambaforge/envs/scipy-dev/include -DCYTHON_CCOMPLEX=0 -Wno-cpp -MD -MQ scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/meson-generated__upfirdn_apply.c.o -MF scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/meson-generated__upfirdn_apply.c.o.d -o scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/meson-generated__upfirdn_apply.c.o -c scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/_upfirdn_apply.c
scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/_upfirdn_apply.c:26466:25: error: initializing '__pyx_t_float_complex' with an expression of incompatible type 'int'
__pyx_t_float_complex __pyx_v_cval = 0;
^ ~
scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/_upfirdn_apply.c:26944:20: error: assigning to '__pyx_t_float_complex' from incompatible type 'int'
__pyx_v_cval = 0;
^ ~
scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/_upfirdn_apply.c:27598:26: error: initializing '__pyx_t_double_complex' with an expression of incompatible type 'int'
__pyx_t_double_complex __pyx_v_cval = 0;
^ ~
scipy/signal/_upfirdn_apply.cpython-311-darwin.so.p/_upfirdn_apply.c:28076:20: error: assigning to '__pyx_t_double_complex' from incompatible type 'int'
__pyx_v_cval = 0;
^ ~
4 errors generated.
[1209/1588] Compiling C object scipy/signal/_sosfilt.cpython-311-darwin.so.p/meson-generated__sosfilt.c.o
ninja: build stopped: subcommand failed.
Build failed!
SciPy/NumPy/Python version and system information
Apple mac m2 air
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 19 (17 by maintainers)
Links to this issue
Commits related to this issue
- MAINT: signal: Remove the cval parameter from the private function _pad_test. The parameter `cval` in the private helper function `_pad_test` is not used, so remove it. This change is inspired by a ... — committed to WarrenWeckesser/scipy by WarrenWeckesser 10 months ago
- MAINT: signal: Remove the cval parameter from the private function _pad_test. The parameter `cval` in the private helper function `_pad_test` is not used, so remove it. This change is inspired by a ... — committed to tylerjereddy/scipy by WarrenWeckesser 10 months ago
BTW Cython 3.0.2 was released with the issue fixed: https://github.com/cython/cython/releases/tag/3.0.2
I did a
git bisectof Cython between tags3.0.0and3.0.1, on the ability to build SciPymain:I mean, a man can only dream I guess
cc @matusvalo perhaps
Cython
3.0.1was released 7 hours ago, but not yet on PyPI it seems, but you are using it above.I confirmed locally that we build with
3.0.0but not3.0.1in standard Ubuntu Linuxvenv. We’ve had Cython folks helping us out recently so I imagine we can ping someone.