manylinux icon indicating copy to clipboard operation
manylinux copied to clipboard

OpenBLAS cannot be found by pkg-config

Open vhaasteren opened this issue 1 year ago • 5 comments

This may be related to this scipy issue. My Python package requires scipy. However, when trying to build the package with (python -m build), it turns out that the blas library cannot be found.

First of course tried a yum install -y openblas-devel

Full output below:

[root@5b483ecc5dbe /]# python3.10 -m pip install scipy Collecting scipy Downloading scipy-1.10.1.tar.gz (42.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.4/42.4 MB 37.9 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [40 lines of output] The Meson build system Version: 1.1.0 Source dir: /tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94 Build dir: /tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94/.mesonpy-ojytqqsl/build Build type: native build Project name: SciPy Project version: 1.10.1 C compiler for the host machine: cc (gcc 8.3.1 "cc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)") C linker for the host machine: cc ld.bfd 2.30-55 C++ compiler for the host machine: c++ (gcc 8.3.1 "c++ (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)") C++ linker for the host machine: c++ ld.bfd 2.30-55 Cython compiler for the host machine: cython (cython 0.29.34) Host machine cpu family: x86_64 Host machine cpu: x86_64 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 Compiler for C supports arguments -Wno-incompatible-pointer-types: YES Library m found: YES Fortran compiler for the host machine: gfortran (gcc 8.3.1 "GNU Fortran (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)") Fortran linker for the host machine: gfortran ld.bfd 2.30-55 Compiler for Fortran supports arguments -Wno-conversion: YES Checking if "-Wl,--version-script" : links: YES Program cython found: YES (/tmp/pip-build-env-4r3c975u/overlay/bin/cython) Program python found: YES (/usr/local/bin/python3.10) Found pkg-config: /usr/bin/pkg-config (0.23) Program pythran found: YES (/tmp/pip-build-env-4r3c975u/overlay/bin/pythran) Run-time dependency threads found: YES Library npymath found: YES Library npyrandom found: YES Found CMake: /usr/local/bin/cmake (3.23.3) WARNING: CMake Toolchain: Failed to determine CMake compilers state Run-time dependency openblas found: NO (tried pkgconfig and cmake) Run-time dependency openblas found: NO (tried pkgconfig and cmake)

  ../../scipy/meson.build:134:7: ERROR: Dependency "OpenBLAS" not found, tried pkgconfig and cmake
  
  A full log can be found at /tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94/.mesonpy-ojytqqsl/build/meson-logs/meson-log.txt
  + meson setup --prefix=/opt/_internal/cpython-3.10.6 /tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94 /tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94/.mesonpy-ojytqqsl/build --native-file=/tmp/pip-install-2hoxu3sl/scipy_1a369e84062c41a59732e5f05ae60f94/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

vhaasteren avatar Apr 26 '23 06:04 vhaasteren