Skip to content

Commit 44164a4

Browse files
Give a very clear and strong error message for 64-bit builds with 32-bit BLAS (#796)
* Give a very clear and strong error message for 64-bit builds with 32-bit BLAS This should make #790 a lot less likely * Update src/LinearSolve.jl * Update src/LinearSolve.jl
1 parent 79196ca commit 44164a4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/LinearSolve.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ import Krylov
4646

4747
const CRC = ChainRulesCore
4848

49+
if Int === Int64 && !Base.USE_BLAS64
50+
error("Invalid installation of Julia detected.\n\n Detected that Julia was built in 64-bit version but with a 32-bit BLAS. This gives issues" *
51+
" in LinearAlgebra.jl and LinearSolve.jl which can be unrecoverable and are thus not supported. Most likely this is due to a bad build" *
52+
" of Julia, with the common reasons being an incorrect build script in the NixOS and ArchLinux package managers (and old versions of homebrew)." *
53+
" To fix this issue, and many other potentially small issues that may be undetected, use get a valid version of Julia with the correct BLAS and" *
54+
" LLVM versions by either installing via juliaup (recommended), or downloading the appropriate binary from https://julialang.org/install/" *
55+
" If using a Unix machine with a bash terminal, `curl -fsSL https://install.julialang.org` | sh will install juliaup and `juliaup add latest` will" *
56+
" then give the latest version.\n\n If you wish to help fix the incorrect package manager build, share the discussion on fixing the homebrew build" *
57+
" https://github.com/Homebrew/homebrew-core/issues/246702 with the package manager of interest in order to improve the ecosystem.")
58+
end
59+
4960
@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686
5061
if Preferences.@load_preference("LoadMKL_JLL",
5162
!occursin("EPYC", Sys.cpu_info()[1].model))

0 commit comments

Comments
 (0)