pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

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

Open maresb opened this issue 1 month ago • 0 comments

Describe the issue:

Reported in https://github.com/pymc-devs/pytensor/pull/1667#issuecomment-3447731251

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

maresb avatar Oct 25 '25 20:10 maresb