-
Notifications
You must be signed in to change notification settings - Fork 0
Fresh Linux install fails to load without system OpenBLAS (undefined symbol: dgemm_) #128
Copy link
Copy link
Open
Description
Summary
A fresh Linux install/load fails in __init__ with undefined symbol: dgemm_ unless a BLAS library is already present in the global loader namespace.
Reproducer
I reproduced this from the current checkout with a clean temp environment:
using Pkg
temp_env = mktempdir()
Pkg.activate(temp_env)
Pkg.add(path="/path/to/SparseIR.jl")
using SparseIRI also reproduced the same failure with a local development checkout via:
using Pkg
Pkg.activate(mktempdir())
Pkg.develop(path="/path/to/SparseIR.jl")
Pkg.build("SparseIR")
using SparseIRObserved output
ERROR: InitError: could not load library ".../deps/libsparse_ir_capi.so"
.../deps/libsparse_ir_capi.so: undefined symbol: dgemm_
Environment
- Ubuntu runner
- Julia 1.12.5
- no system OpenBLAS/BLAS libraries visible from
ldconfig -p
Additional observations
using LinearAlgebra; using SparseIRstill fails with the samedgemm_error.- This workaround makes the package load successfully:
using LinearAlgebra, Libdl
Libdl.dlopen(LinearAlgebra.BLAS.libblastrampoline, Libdl.RTLD_GLOBAL | Libdl.RTLD_LAZY)
using SparseIR- The built
libsparse_ir_capi.socontains unresolveddgemm_/zgemm_symbols. - The repo's
PkgAdd.ymlworkflow installslibopenblas-devbefore its smoke test, but the README currently says the needed dependencies are installed automatically.
Expected behavior
A fresh install should load with using SparseIR on Linux without requiring an undocumented system OpenBLAS package or a manual Libdl.dlopen(..., RTLD_GLOBAL) workaround.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels