Arpack.jl install error with MKL

I can’t test, because Distributions doesn’t work for me on 0.7, due to this error building Arpack:

(v0.7) pkg> build Arpack
  Building Arpack → `~/.julia/packages/Arpack/OpIo/deps/build.log`
┌ Error: Error building `Arpack`: 
│ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-0.2.20/ArpackBuilder.x86_64-linux-gnu.tar.gz to /home/chris/.julia/packages/Arpack/OpIo/deps/usr/downloads/ArpackBuilder.x86_64-linux-gnu.tar.gz...
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │   caller = macro expansion at OutputCollector.jl:63 [inlined]
│ └ @ Core OutputCollector.jl:63
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │   caller = wait(::OutputCollector) at OutputCollector.jl:160
│ └ @ BinaryProvider OutputCollector.jl:160
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │   caller = wait(::OutputCollector) at OutputCollector.jl:161
│ └ @ BinaryProvider OutputCollector.jl:161
│ ┌ Warning: `wait(t::Task)` is deprecated, use `fetch(t)` instead.
│ │   caller = wait(::OutputCollector) at OutputCollector.jl:165
│ └ @ BinaryProvider OutputCollector.jl:165
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/chris/.julia/packages/Arpack/OpIo/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] error at ./error.jl:33 [inlined]
│  [2] #write_deps_file#134(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/chris/.julia/packages/BinaryProvider/mWAR/src/Products.jl:392
│  [3] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/chris/.julia/packages/BinaryProvider/mWAR/src/Products.jl:379
│  [4] top-level scope at none:0
│  [5] include at ./boot.jl:317 [inlined]
│  [6] include_relative(::Module, ::String) at ./loading.jl:1034
│  [7] include(::Module, ::String) at ./sysimg.jl:29
│  [8] include(::String) at ./client.jl:393
│  [9] top-level scope at none:0
│ in expression starting at /home/chris/.julia/packages/Arpack/OpIo/deps/build.jl:40
[05:21:09] ######################################################################## 100.0%
└ @ Pkg.Operations Operations.jl:993

The error says

ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/chris/.julia/packages/Arpack/OpIo/deps/usr)") is not satisfied, cannot generate deps.jl!

Checking, I do have libarpack.so in /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib.

EDIT:

julia> satisfied(products[1], verbose = true)
[ Info: Found a valid dl path libarpack.so while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so cannot be dlopen'ed
[ Info: Found a valid dl path libarpack.so.2 while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2 matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2 cannot be dlopen'ed
[ Info: Found a valid dl path libarpack.so.2.0.0 while looking for libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2.0.0 matches our search criteria of libarpack
[ Info: /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib/libarpack.so.2.0.0 cannot be dlopen'ed
[ Info: Could not locate libarpack inside /home/chris/.julia/packages/Arpack/OpIo/deps/usr/lib
false

Okay, so satisfied did find the files, but could not open them.

julia> using Libdl

julia> libarpack = Libdl.dlopen("usr/lib/libarpack.so")
ERROR: could not load library "usr/lib/libarpack.so"
libgfortran.so.4: cannot open shared object file: No such file or directory
Stacktrace:
 [1] dlopen(::String, ::UInt32) at /home/chris/Documents/prog/julia-reg/usr/share/julia/stdlib/v0.7/Libdl/src/Libdl.jl:99 (repeats 2 times)
 [2] top-level scope at none:0

Apparently I am missing libgfortran.so.4. Starting with gcc-8, it is now libgfortran.so.5. This is the default on popular distributions like Arch and Fedora.
EDIT:
And when Julia is built with MKL:

ERROR: could not load library "lib/libarpack.so"
libopenblas64_.so.0: cannot open shared object file: No such file or directory

I think this is Libraries cannot load · Issue #2 · JuliaLinearAlgebra/OpenBLASBuilder · GitHub.

Unfortunately, the only solutions at the moment seem to be either “use a prebuilt Julia binary” or “rebuild OpenBLAS with gfortran-7”?
Lots of Linux distributions, such as Arch and Fedora, have already moved on to gfortran-8. So I imagine this problem will be fairly common.
That solution also precludes using MKL.

Would be nice if there were an easy option to support just building it yourself.
When I need Arpack, or something dependent on it, I’ll try that and sticking a symlink in the correct place.

We may want to revisit the dependence of PDMats on Arpack, which is how Distributions ends up depending on Arpack. Arpack code is used only for a corner case in PDMats which then ends up precluding the simultaneous use of Distributions and MKL. That’s a big price to pay for such a corner case.

We’re considering the same thing for LightGraphs - we use it for eigs in only 3 or 4 places.

Any update on this? I can’t run my code with Julia+MKL because of this dependency.

Sorry to say that I don’t know of any updates on this.

I have the same issue on Fedora 27.

Is Arpack really needed? There are some native Julia alternatives by now.

Maybe this could be a substitute.