Skip to content

BUG: "BLAS alone" detection on Windows failing with 32 bit pseudo relocation out of range #1695

@maresb

Description

@maresb

Describe the issue:

Reported in #1667 (comment)

If MKL detection fails, then we see the following new error:

Mingw-w64 runtime failure:
32 bit pseudo relocation at 00007FF6E32314BC out of range, targeting 00007FF985A31600, yielding the value 00000002A2800140.

This comes from "Checking Lapack + blas" and "Checking blas alone":

DEBUG (pytensor.link.c.cmodule): Checking Lapack + blas
DEBUG (pytensor.link.c.cmodule): Compiling for 64 bit architecture
DEBUG (pytensor.link.c.cmodule): try_blas_flags of flags: ['-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\Library\\bin"', '-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test"', '-llapack', '-lblas', '-lcblas', '-lm', '-Wl,-rpath,C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\libs']
failed with error message b'Mingw-w64 runtime failure:\r\n32 bit pseudo relocation at 00007FF6E32314BC out of range, targeting 00007FF985A31600, yielding the value 00000002A2800140.\r\n'
DEBUG (pytensor.link.c.cmodule): Supplied flags '' failed to compile
DEBUG (pytensor.link.c.cmodule): Supplied flags ['-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\Library\\bin"', '-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test"', '-llapack', '-lblas', '-lcblas', '-lm', '-Wl,-rpath,C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\libs'] failed to compile
DEBUG (pytensor.link.c.cmodule): Checking blas alone
DEBUG (pytensor.link.c.cmodule): Compiling for 64 bit architecture
DEBUG (pytensor.link.c.cmodule): try_blas_flags of flags: ['-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\Library\\bin"', '-lblas', '-lcblas', '-Wl,-rpath,C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\libs']
failed with error message b'Mingw-w64 runtime failure:\r\n32 bit pseudo relocation at 00007FF7A52314BC out of range, targeting 00007FF985A31600, yielding the value 00000001E0800140.\r\n'
DEBUG (pytensor.link.c.cmodule): Supplied flags '' failed to compile
DEBUG (pytensor.link.c.cmodule): Supplied flags ['-L"C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\Library\\bin"', '-lblas', '-lcblas', '-Wl,-rpath,C:\\Users\\Ben\\micromamba\\envs\\pytensor-blas-test\\libs'] failed to compile

Reproducable code example:

import logging
logger = logging.getLogger("pytensor.link.c.cmodule")
logger.setLevel(logging.DEBUG)
import pytensor
pytensor.config.blas__ldflags

Error message:

PyTensor version information:

v2.35.0, conda-forge

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions