Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Unable to build SciPy locally due to mysterious conflation between scipy.signal and stdlib signal module #20709

Closed
steppi opened this issue May 13, 2024 · 4 comments
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS defect A clear bug or issue that prevents SciPy from being installed or used as expected

Comments

@steppi
Copy link
Contributor

steppi commented May 13, 2024

Describe your issue.

Following up from #20612 (comment),

Myself and @czgdp1807 both observed that we cannot build SciPy locally.

The full meson log appears here

Build started at 2024-05-13T16:20:13.739399
Main binary: /home/birbir/.virtualenvs/scipy-dev/bin/python
Build Options: -Dprefix=/home/birbir/scipy/build-install
Python system: Linux
The Meson build system
Version: 1.4.0
Source dir: /home/birbir/scipy
Build dir: /home/birbir/scipy/build
Build type: native build
Project name: scipy
Project version: 1.14.0.dev0
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 11.4.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb9Qceu.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /home/birbir/scipy/build/meson-private/sanitycheckc.exe
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
-----------
Detecting archiver via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
-----------
Detecting compiler via: `c++ --version` -> 0
stdout:
c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: c++ -E -dM -
-----
-----------
Detecting linker via: `c++ -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 11.4.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccsuoLNN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. --version -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /home/birbir/scipy/build/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the host machine: c++ ld.bfd 2.38
-----------
Detecting compiler via: `cython -V` -> 0
stdout:
Cython version 3.0.10
-----------
stderr:
Cython version 3.0.10
-----------
Running compile:
Working directory:  /tmp/tmp3jfeh557
Code:
 print("hello world")
-----------
Command line: `cython /tmp/tmp3jfeh557/testfile.pyx -o /tmp/tmp3jfeh557/output.exe --fast-fail` -> 0
stderr:
/home/birbir/.virtualenvs/scipy-dev/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmp3jfeh557/testfile.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
-----------
Cython compiler for the host machine: cython (cython 3.0.10)
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 11.4.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccnYRgsm.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /home/birbir/scipy/build/meson-private/sanitycheckc.exe
C compiler for the build machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the build machine: cc ld.bfd 2.38
-----------
Detecting archiver via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
-----------
Detecting compiler via: `c++ --version` -> 0
stdout:
c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: c++ -E -dM -
-----
-----------
Detecting linker via: `c++ -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 11.4.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccbm3mbc.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. --version -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /home/birbir/scipy/build/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the build machine: c++ ld.bfd 2.38
-----------
Detecting compiler via: `cython -V` -> 0
stdout:
Cython version 3.0.10
-----------
stderr:
Cython version 3.0.10
-----------
Using cached compile:
Cached command line:  cython /tmp/tmp3jfeh557/testfile.pyx -o /tmp/tmp3jfeh557/output.exe --fast-fail 

Code:
 print("hello world")
Cached compiler stdout:
 
Cached compiler stderr:
 /home/birbir/.virtualenvs/scipy-dev/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/tmp3jfeh557/testfile.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

Cython compiler for the build machine: cython (cython 3.0.10)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program python3 found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/python)
Searching for 'python-3.11' via pkgconfig lookup in LIBPC
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.2
Determining dependency 'python-3.11' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_LIBDIR]: /usr/local/lib/pkgconfig
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --modversion python-3.11` -> 0
stdout:
3.11
-----------
env[PKG_CONFIG_LIBDIR]: /usr/local/lib/pkgconfig
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --cflags python-3.11` -> 0
stdout:
-I/usr/local/include/python3.11
-----------
env[PKG_CONFIG_LIBDIR]: /usr/local/lib/pkgconfig
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --libs python-3.11` -> 0
env[PKG_CONFIG_LIBDIR]: /usr/local/lib/pkgconfig
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --libs python-3.11` -> 0
Run-time dependency python found: YES 3.11
Program cython found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/cython)
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpx2rbwzek
Code:
 extern int i;
int i;

-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpx2rbwzek/testfile.c -o /home/birbir/scipy/build/meson-private/tmpx2rbwzek/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Wunused-but-set-variable -Wno-unused-but-set-variable` -> 0
Compiler for C supports arguments -Wno-unused-but-set-variable: YES 
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpaxh16bre
Code:
 extern int i;
int i;

-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpaxh16bre/testfile.c -o /home/birbir/scipy/build/meson-private/tmpaxh16bre/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Wunused-function -Wno-unused-function` -> 0
Compiler for C supports arguments -Wno-unused-function: YES 
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpqduasscl
Code:
 extern int i;
int i;

-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpqduasscl/testfile.c -o /home/birbir/scipy/build/meson-private/tmpqduasscl/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Wconversion -Wno-conversion` -> 0
Compiler for C supports arguments -Wno-conversion: YES 
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmp8_m6wfk8
Code:
 extern int i;
int i;

-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmp8_m6wfk8/testfile.c -o /home/birbir/scipy/build/meson-private/tmp8_m6wfk8/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Wmisleading-indentation -Wno-misleading-indentation` -> 0
Compiler for C supports arguments -Wno-misleading-indentation: YES 
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpigvxa1u7
Code:
 int main(void) { return 0; }

-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpigvxa1u7/testfile.c -o /home/birbir/scipy/build/meson-private/tmpigvxa1u7/output.exe -D_FILE_OFFSET_BITS=64 -O0 -lm -Wl,--allow-shlib-undefined` -> 0
Library m found: YES
-----------
Detecting compiler via: `gfortran --version` -> 0
stdout:
GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: gfortran -E -dM -
-----
-----------
Detecting linker via: `gfortran -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 11.4.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccfuC9iJ.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o
-----------
Sanity testing Fortran compiler: gfortran
Is cross compiler: False.
Sanity check compiler command line: gfortran sanitycheckf.f90 -o sanitycheckf.exe
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command:  /home/birbir/scipy/build/meson-private/sanitycheckf.exe
Fortran compiler for the host machine: gfortran (gcc 11.4.0 "GNU Fortran (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
Fortran linker for the host machine: gfortran ld.bfd 2.38
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpvt8wd6cv
Code:
 stop; end program
-----------
Command line: `gfortran /home/birbir/scipy/build/meson-private/tmpvt8wd6cv/testfile.f90 -o /home/birbir/scipy/build/meson-private/tmpvt8wd6cv/output.obj -D_FILE_OFFSET_BITS=64 -c -O0 -Wconversion -Wno-conversion` -> 0
Compiler for Fortran supports arguments -Wno-conversion: YES 
Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpgper20ny
Code:
 
-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpgper20ny/testfile.c -o /home/birbir/scipy/build/meson-private/tmpgper20ny/output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=c17 -shared -Wl,--version-script=/home/birbir/scipy/scipy/_build_utils/link-version-pyinit.map` -> 0
Checking if "-Wl,--version-script" : links: YES 
Program tools/generate_f2pymod.py found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/python /home/birbir/scipy/tools/generate_f2pymod.py)
Program scipy/_build_utils/tempita.py found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/python /home/birbir/scipy/scipy/_build_utils/tempita.py)
Running command: /home/birbir/.virtualenvs/scipy-dev/bin/pythran --version
--- stdout ---
0.15.0

--- stderr ---


Program pythran found: YES 0.15.0 0.15.0 (/home/birbir/.virtualenvs/scipy-dev/bin/pythran)
Determining dependency 'xsimd' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --modversion xsimd` -> 1
stderr:
Package xsimd was not found in the pkg-config search path.
Perhaps you should add the directory containing `xsimd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xsimd' found
-----------
CMake binary for host machine is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: /usr/bin/cmake (3.22.1)
Extracting basic cmake information
CMake Toolchain: Calling CMake once to generate the compiler state
Calling CMake (['/usr/bin/cmake']) in /home/birbir/scipy/build/meson-private/__CMake_compiler_info__ with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-G"
  - "Ninja"
  - "-DCMAKE_TOOLCHAIN_FILE=/home/birbir/scipy/build/meson-private/__CMake_compiler_info__/CMakeMesonTempToolchainFile.cmake"
  - "."
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Try CMake generator: auto
Calling CMake (['/usr/bin/cmake']) in /home/birbir/scipy/build/meson-private/cmake_xsimd with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-DCMAKE_TOOLCHAIN_FILE=/home/birbir/scipy/build/meson-private/cmake_xsimd/CMakeMesonToolchainFile.cmake"
  - "."
  -- Module search paths:    ['/', '/opt', '/usr', '/usr/local']
  -- CMake root:             /usr/share/cmake-3.22
  -- CMake architectures:    ['i386-linux-gnu', 'x86_64-linux-gnu']
  -- CMake lib search paths: ['lib', 'lib32', 'lib64', 'libx32', 'share', '', 'lib/i386-linux-gnu', 'lib/x86_64-linux-gnu']
Preliminary CMake check failed. Aborting.
Run-time dependency xsimd found: NO (tried pkgconfig and cmake)
Run-time dependency threads found: YES
Running command: /home/birbir/.virtualenvs/scipy-dev/bin/python -c 'import os
os.chdir(os.path.join("..", "tools"))
import numpy as np
try:
  incdir = os.path.relpath(np.get_include())
except Exception:
  incdir = np.get_include()
print(incdir)
  '
--- stdout ---
../../.virtualenvs/scipy-dev/lib/python3.11/site-packages/numpy/core/include

--- stderr ---


Running command: /home/birbir/.virtualenvs/scipy-dev/bin/python -c 'import os; os.chdir(".."); import numpy; print(numpy.get_include())'
--- stdout ---
/home/birbir/.virtualenvs/scipy-dev/lib/python3.11/site-packages/numpy/core/include

--- stderr ---


Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpjfj5y1cc
Code:
 
        #include<stddef.h>
        #include<stdio.h>
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        }
-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpjfj5y1cc/testfile.c -o /home/birbir/scipy/build/meson-private/tmpjfj5y1cc/output.exe -D_FILE_OFFSET_BITS=64 -O0` -> 0
Program stdout:

8

Program stderr:


Running compile:
Working directory:  /home/birbir/scipy/build/meson-private/tmpwxnt2l1c
Code:
 
-----------
Command line: `cc /home/birbir/scipy/build/meson-private/tmpwxnt2l1c/testfile.c -o /home/birbir/scipy/build/meson-private/tmpwxnt2l1c/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 --print-search-dirs` -> 0
stdout:
install: /usr/lib/gcc/x86_64-linux-gnu/11/
programs: =/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/bin/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/bin/
libraries: =/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/11/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/11/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/
-----------
Library npymath found: YES
Determining dependency 'pybind11' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]: 
env[PKG_CONFIG]: /usr/bin/pkg-config
-----------
Called: `/usr/bin/pkg-config --modversion pybind11` -> 1
stderr:
Package pybind11 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pybind11.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pybind11' found
-----------
pybind11-config binary missing from cross or native file, or env var undefined.
Trying a default pybind11-config fallback at pybind11-config
pybind11-config found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/pybind11-config) 2.12.0
-----------
Called: `/home/birbir/.virtualenvs/scipy-dev/bin/pybind11-config --includes` -> 0
stdout:
-I/usr/local/include/python3.11 -I/home/birbir/.virtualenvs/scipy-dev/lib/python3.11/site-packages/pybind11/include
-----------
Run-time dependency pybind11 found: YES 2.12.0
Running command: /home/birbir/.virtualenvs/scipy-dev/bin/python -c 'import os
os.chdir(os.path.join("..", "tools"))
import pythran
try:
  incdir = os.path.relpath(pythran.get_include())
except Exception:
  incdir = pythran.get_include()
print(incdir)
'
--- stdout ---
../../.virtualenvs/scipy-dev/lib/python3.11/site-packages/pythran

--- stderr ---


Program f2py found: YES (/home/birbir/.virtualenvs/scipy-dev/bin/f2py)
Running command: /home/birbir/.virtualenvs/scipy-dev/bin/f2py -v
--- stdout ---

--- stderr ---
Traceback (most recent call last):
  File "/home/birbir/.virtualenvs/scipy-dev/bin/f2py", line 5, in <module>
    from numpy.f2py.f2py2e import main
  File "/home/birbir/.virtualenvs/scipy-dev/lib/python3.11/site-packages/numpy/f2py/__init__.py", line 14, in <module>
    import subprocess
  File "/usr/local/lib/python3.11/subprocess.py", line 49, in <module>
    import signal
  File "/home/birbir/scipy/scipy/signal/__init__.py", line 307, in <module>
    from . import _sigtools, windows
ImportError: cannot import name '_sigtools' from partially initialized module 'signal' (most likely due to a circular import) (/home/birbir/scipy/scipy/signal/__init__.py)



scipy/meson.build:156:15: ERROR: Command `/home/birbir/.virtualenvs/scipy-dev/bin/f2py -v` failed with status 1.

My platform us Ubuntu 22.04 on x86_64. GCC version 11.4.0. Python version 3.11.8 in a virtual environment.
Output of pip freeze:

accessible-pygments==0.0.4
alabaster==0.7.15
anyio==4.3.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
array_api_strict==1.1.1
arrow==1.3.0
asttokens==2.4.1
asv==0.6.3
asv_runner==0.2.1
attrs==23.2.0
Babel==2.14.0
backports.tarfile==1.1.1
beautifulsoup4==4.12.2
beniget==0.4.1
bleach==6.1.0
breathe==4.35.0
build==1.2.1
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.0.0
comm==0.2.1
contourpy==1.2.0
coverage==7.4.0
cryptography==42.0.7
cupy==13.1.0
cycler==0.12.1
Cython==3.0.10
cython-lint==0.16.2
debugpy==1.8.0
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.14
distlib==0.3.8
docutils==0.20.1
doit==0.36.0
execnet==2.1.1
executing==2.0.1
fastjsonschema==2.19.1
fastrlock==0.8.2
filelock==3.13.1
flake8==7.0.0
fonttools==4.47.0
fqdn==1.5.1
fsspec==2023.12.2
gast==0.5.4
gitdb==4.0.11
GitPython==3.1.43
gmpy2==2.1.5
greenlet==3.0.3
hypothesis==6.81.1
idna==3.6
imagesize==1.4.1
importlib-metadata==7.0.1
incremental==22.10.0
iniconfig==2.0.0
ipykernel==6.28.0
ipython==8.23.0
isoduration==20.11.0
jaraco.classes==3.4.0
jaraco.context==5.3.0
jaraco.functools==4.0.1
jedi==0.19.1
jeepney==0.8.0
Jinja2==3.1.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.20.0
jsonschema-specifications==2023.12.1
jupyter-cache==1.0.0
jupyter-events==0.9.0
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.5
jupyter_server_terminals==0.5.2
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.3
jupyterlite-core==0.3.0
jupyterlite-pyodide-kernel==0.3.1
jupyterlite-sphinx==0.14.0
jupytext==1.16.2
keyring==25.2.1
kiwisolver==1.4.5
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib==3.8.4
matplotlib-inline==0.1.6
mccabe==0.7.0
mdit-py-plugins==0.4.0
mdurl==0.1.2
meson==1.4.0
meson-python==0.16.0
mistune==3.0.2
more-itertools==10.2.0
mpmath==1.3.0
mypy==1.10.0
mypy-extensions==1.0.0
myst-nb==1.1.0
myst-parser==2.0.0
nbclient==0.9.0
nbconvert==7.16.1
nbformat==5.9.2
nest-asyncio==1.5.8
networkx==3.2.1
nh3==0.2.17
ninja==1.11.1.1
numpy==1.26.4
numpydoc==1.4.0
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-nccl-cu12==2.18.1
nvidia-nvjitlink-cu12==12.3.101
nvidia-nvtx-cu12==12.1.105
overrides==7.7.0
packaging==23.2
pandas==2.2.0
pandocfilters==1.5.1
parso==0.8.3
Paver==1.3.4
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.2.0
pkginfo==1.9.6
platformdirs==4.1.0
pluggy==1.5.0
ply==3.11
pooch==1.8.1
prometheus_client==0.20.0
prompt-toolkit==3.0.43
psutil==5.9.7
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==15.0.0
pybind11==2.12.0
pycodestyle==2.8.0
pycparser==2.21
pydata-sphinx-theme==0.15.2
pydevtool==0.3.0
pyflakes==3.2.0
PyGithub==2.3.0
Pygments==2.17.2
PyJWT==2.8.0
Pympler==1.0.1
PyNaCl==1.5.0
pyparsing==3.1.1
pyproject-metadata==0.7.1
pyproject_hooks==1.1.0
pytest==7.4.0
pytest-cov==4.1.0
pytest-fail-slow==0.5.0
pytest-timeout==2.3.1
pytest-xdist==3.6.1
python-dateutil==2.8.2
python-json-logger==2.0.7
pythran==0.15.0
pytz==2023.3.post1
PyYAML==6.0.1
pyzmq==25.1.2
readme_renderer==43.0
referencing==0.32.1
requests==2.31.0
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3986==2.0.0
rfc3986-validator==0.1.1
rich==13.7.0
rich-click==1.8.1
rpds-py==0.16.2
ruff==0.4.4
SecretStorage==3.3.3
Send2Trash==1.8.2
six==1.16.0
smmap==5.0.1
sniffio==1.3.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
soupsieve==2.5
Sphinx==7.2.6
sphinx_design==0.5.0
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-serializinghtml==1.1.9
spin==0.8
SQLAlchemy==2.0.25
stack-data==0.6.3
sympy==1.12
tabulate==0.9.0
terminado==0.18.0
threadpoolctl==3.5.0
tinycss2==1.2.1
tokenize-rt==5.2.0
toml==0.10.2
tomli==2.0.1
torch==2.1.2
tornado==6.4
towncrier==23.11.0
traitlets==5.14.1
triton==2.1.0
twine==5.0.0
types-psutil==5.9.5.20240511
types-python-dateutil==2.8.19.20240106
typing_extensions==4.11.0
tzdata==2023.4
ufunclab @ file:///home/birbir/ufunclab
uri-template==1.3.0
urllib3==2.1.0
virtualenv==20.26.1
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
wrapt==1.16.0
zipp==3.17.0

SciPy/NumPy/Python version and system information

I cannot build SciPy, but my NumPy version is 1.26, and sys.version_info is sys.version_info(major=3, minor=11, micro=8, releaselevel='final', serial=0)

@steppi steppi added the defect A clear bug or issue that prevents SciPy from being installed or used as expected label May 13, 2024
@lucascolley lucascolley added the Build issues Issues with building from source, including different choices of architecture, compilers and OS label May 13, 2024
@lucascolley
Copy link
Member

lucascolley commented May 13, 2024

confirm that I can not reproduce on my machine (M1 Mac)

@steppi
Copy link
Contributor Author

steppi commented May 13, 2024

confirm that I can not reproduce on my machine (M1 Mac)

Ah, I forgot. I did have PYTHONPATH set to test out something locally, and forgot to unset it. Clearing that up fixed things. Do you also have PYTHONPATH set @czgdp1807?

@steppi
Copy link
Contributor Author

steppi commented May 13, 2024

I'm going to go ahead and close this. Sorry for the noise.

@steppi steppi closed this as completed May 13, 2024
@czgdp1807
Copy link
Member

Yes, after unsetting PYTHONPATH things worked out. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build issues Issues with building from source, including different choices of architecture, compilers and OS defect A clear bug or issue that prevents SciPy from being installed or used as expected
Projects
None yet
Development

No branches or pull requests

3 participants