Skip to content

BUG: "Value "legacy" (of type "string") for combo option "Fortran language standard to use" is not one of the choices" during scipy build #19447

@AgilentGCMS

Description

@AgilentGCMS

Describe your issue.

I am trying to build scipy to take advantage of a platform-specific compiler suite on an HPC platform (AMD's aocc compiler suite on AMD nodes). I have managed to build and install numpy on the platform. However, when I try to build scipy, I get the following meson build error.

LDFLAGS='-lblis' LIBS='-lblis' CFLAGS='-O3 -fPIC -fopenmp' CC=clang CXX=clang++ FC=flang pip3 install .
Processing /gpfsm/dnb34/sbasu1/build/scipy-1.11.3
  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
  ╰─> [28 lines of output]
      + meson setup /gpfsm/dnb34/sbasu1/build/scipy-1.11.3 /gpfsm/dnb34/sbasu1/build/scipy-1.11.3/.mesonpy-zpkcnm13 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/gpfsm/dnb34/sbasu1/build/scipy-1.11.3/.mesonpy-zpkcnm13/meson-python-native-file.ini
      The Meson build system
      Version: 1.2.3
      Source dir: /gpfsm/dnb34/sbasu1/build/scipy-1.11.3
      Build dir: /gpfsm/dnb34/sbasu1/build/scipy-1.11.3/.mesonpy-zpkcnm13
      Build type: native build
      Project name: SciPy
      Project version: 1.11.3
      C compiler for the host machine: clang (clang 16.0.3 "AMD clang version 16.0.3 (CLANG: AOCC_4.1.0-Build#270 2023_07_10)")
      C linker for the host machine: clang ld.lld 16.0.3
      C++ compiler for the host machine: clang++ (clang 16.0.3 "AMD clang version 16.0.3 (CLANG: AOCC_4.1.0-Build#270 2023_07_10)")
      C++ linker for the host machine: clang++ ld.lld 16.0.3
      Cython compiler for the host machine: cython (cython 0.29.36)
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Program python found: YES (/discover/nobackup/projects/tm5var4d/packages/python/3.12.0/bin/python3)
      Found pkg-config: /usr/bin/pkg-config (0.29.2)
      Run-time dependency python found: YES 3.12
      Program cython found: YES (/gpfsm/dnb34/tdirs/login/discover36.203087.sbasu1/pip-build-env-qwg6qf_v/overlay/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

      ../meson.build:82:0: ERROR: Value "legacy" (of type "string") for combo option "Fortran language standard to use" is not one of the choices. Possible choices are (as string): "none".

      A full log can be found at /gpfsm/dnb34/sbasu1/build/scipy-1.11.3/.mesonpy-zpkcnm13/meson-logs/meson-log.txt
      [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.

However, the log file it points to, /gpfsm/dnb34/sbasu1/build/scipy-1.11.3/.mesonpy-zpkcnm13/meson-logs/meson-log.txt, does not exist. Google did not give me a solution or even a clue. Please help.

Reproducing Code Example

LDFLAGS='-lblis' LIBS='-lblis' CFLAGS='-O3 -fPIC -fopenmp' CC=clang CXX=clang++ FC=flang pip3 install .

Error message

../meson.build:82:0: ERROR: Value "legacy" (of type "string") for combo option "Fortran language standard to use" is not one of the choices. Possible choices are (as string): "none".

SciPy/NumPy/Python version and system information

>>> sys.version_info
sys.version_info(major=3, minor=12, micro=0, releaselevel='final', serial=0)
>>> print(numpy.__version__)
1.26.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Build issuesIssues with building from source, including different choices of architecture, compilers and OSqueryA question or suggestion that requires further information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions