Closed yurivish closed 5 years ago
I am trying what @klpn suggested on Fedora, but Julia seems to hang when invoking Pkg.build("Arpack")
.
I just removed some log files and it suddenly worked...?
Also just chiming in on the whole pre-built binaries debate in this thread: at least on Fedora, the pre-built binaries don't work well with PyCall and PyPlot. I invariably run into library problems, even if I let Julia keep its own version of anaconda. I think the problem stems from poor anaconda packaging. Anaconda's matplotlib simply doesn't work on Fedora.
The only way I can use Julia with plotting capabilities is to use distro packaged (or built from source) Julia as well as distro packaged python modules. If the official recommendation is to only use "official" Julia binaries, then I won't be able to make figures.
Yeah, I'm not a big fan of depending on Conda either: for one thing its ARM support its pretty bad.
Could you open an issue on PyCall or PyPlot?
That certainly makes more sense than grousing about it here. I'll make an issue with PyPlot.
Once #43 is merged, this package will now provide GCC-multiversioned libraries, which means that from-source builds should work. Essentially, we have developed the capability to build against GCC 4.X, 7.X and 8.X (which correspond to the increments in gfortran
version number), and so when you attempt to download the Arpack.jl binaries, it will download a libarpack
that links against the proper libgfortran
that already exists on your local system.
I've merged #43 so it would be great if people could try out
pkg> add Arpack#master
and see if things work.
(v1.0) pkg> add Arpack#master
Updating git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
Updating `~/.julia/environments/v1.0/Manifest.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
(v1.0) pkg> test Arpack
Testing Arpack
Status `/tmp/tmppMe5xd/Manifest.toml`
[7d9fca2a] Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
[b99e7846] BinaryProvider v0.5.0
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
Test Summary: | Pass Total
eigs | 56 56
Test Summary: | Pass Total
real svds | 189 189
Test Summary: | Pass Total
complex svds | 7 7
Test Summary: | Pass Total
promotion | 3 3
Test Summary: | Pass Total
svds for non-AbstractMatrix | 1 1
Test Summary: | Pass Broken Total
low rank | 15 3 18
Testing Arpack tests passed
shell> gfortran --version
GNU Fortran (GCC) 8.2.1 20180831
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
julia> versioninfo()
Julia Version 1.0.2-pre.0
Commit 4aea3d2b7c (2018-09-30 15:02 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD Ryzen Threadripper 1950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, znver1)
$ rm -rf .julia
Then in julia:
(v1.0) pkg> add Arpack#master
Cloning default registries into /home/sl/.julia/registries
Cloning registry General from "https://github.com/JuliaRegistries/General.git"
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Cloning git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Updating git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Resolving package versions...
Installed BinaryProvider ─ v0.5.1
Updating `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
Updating `~/.julia/environments/v1.0/Manifest.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
[b99e7846] + BinaryProvider v0.5.1
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8ba89e20] + Distributed
[b77e0a4c] + InteractiveUtils
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`:
│ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-3/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz to /home/sl/.julia/packages/Arpack/UiiMc/deps/usr/downloads/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz...
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/sl/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/sl/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408
│ [2] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:388
│ [5] top-level scope at none:0
│ in expression starting at /home/sl/.julia/packages/Arpack/UiiMc/deps/build.jl:74
[10:39:47] ######################################################################## 100.0%
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
$ pacman -Ss '^gcc-libs$'
core/gcc-libs 8.2.1+20180831-1 (base) [installed]
Runtime libraries shipped by GCC
$ pacman -Ql gcc-libs | grep libgfortran
gcc-libs /usr/lib/libgfortran.so
gcc-libs /usr/lib/libgfortran.so.5
gcc-libs /usr/lib/libgfortran.so.5.0.0
Am I missing something?
This is a complex problem that has to do with your library layout not matching that of a typical Julia installation; a typical Julia installation has libgfortran within Julia’s “private libdir” (in this case, probably “/usr/lib/julia”). A quick fix for you will probably be to create a symlink to libgfortran in that directory that points to your global gfortran. The next big chunk of work to be done is to make this process slightly more intelligent with Julia, however that work is held up by some other design decisions in the Pkg space, so it’s going to be weeks before it’s ready, not days.
On Thu, Oct 4, 2018 at 16:47 Sébastien Lerique notifications@github.com wrote:
$ rm -rf .julia
Then in julia:
(v1.0) pkg> add Arpack#master Cloning default registries into /home/sl/.julia/registries Cloning registry General from "https://github.com/JuliaRegistries/General.git" Updating registry at
~/.julia/registries/General
Updating git-repohttps://github.com/JuliaRegistries/General.git
Cloning git-repohttps://github.com/JuliaLinearAlgebra/Arpack.jl.git
Updating git-repohttps://github.com/JuliaLinearAlgebra/Arpack.jl.git
Resolving package versions... Installed BinaryProvider ─ v0.5.1 Updating~/.julia/environments/v1.0/Project.toml
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git) Updating~/.julia/environments/v1.0/Manifest.toml
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git) [b99e7846] + BinaryProvider v0.5.1 [2a0f44e3] + Base64 [ade2ca70] + Dates [8ba89e20] + Distributed [b77e0a4c] + InteractiveUtils [76f85450] + LibGit2 [8f399da3] + Libdl [37e2e46d] + LinearAlgebra [56ddb016] + Logging [d6f4376e] + Markdown [44cfe95a] + Pkg [de0858da] + Printf [3fa0cd96] + REPL [9a3f8284] + Random [ea8e919c] + SHA [9e88b42a] + Serialization [6462fe0b] + Sockets [2f01184e] + SparseArrays [8dfed614] + Test [cf7118a7] + UUIDs [4ec0a83e] + Unicode Building Arpack →~/.julia/packages/Arpack/UiiMc/deps/build.log
┌ Error: Error buildingArpack
: │ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-3/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz to /home/sl/.julia/packages/Arpack/UiiMc/deps/usr/downloads/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz... │ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/sl/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl! │ Stacktrace: │ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/sl/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408 │ [2] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0 │ [3] top-level scope at none:0 │ [4] include(::String) at ./client.jl:388 │ [5] top-level scope at none:0 │ in expression starting at /home/sl/.julia/packages/Arpack/UiiMc/deps/build.jl:74 [10:39:47] ######################################################################## 100.0% └ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068$ pacman -Ss '^gcc-libs$' core/gcc-libs 8.2.1+20180831-1 (base) [installed] Runtime libraries shipped by GCC
$ pacman -Ql gcc-libs | grep libgfortran gcc-libs /usr/lib/libgfortran.so gcc-libs /usr/lib/libgfortran.so.5 gcc-libs /usr/lib/libgfortran.so.5.0.0
Am I missing something?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5#issuecomment-426936591, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH_aOTBGI-Nbj314p3OzqJDTd_m2rKuks5uhcs5gaJpZM4U1Wfr .
Symlinking libgfortran to either /usr/lib/julia
or ~/.julia/packages/Arpack/XXX/deps/usr/lib
has no effect for me (but thanks for answering :) ). The workaround by @klpn above does work though, but I guess that just side-steps obtaining arpack through Arpack.jl.
Did you symlink just libgfortran.so
, or did you do the versioned filenames as well?
All of them:
~ sudo ln -s /usr/lib/libgfortran.so /usr/lib/julia/ Thu 04 Oct 2018 23:40:57 CEST
[sudo] password for sl:
~ sudo ln -s /usr/lib/libgfortran.so.5 /usr/lib/julia/ 4931ms Thu 04 Oct 2018 23:41:13 CEST
~ sudo ln -s /usr/lib/libgfortran.so.5.0.0 /usr/lib/julia/ Thu 04 Oct 2018 23:41:25 CEST
~ rm -rf .julia Thu 04 Oct 2018 23:41:34 CEST
~ julia 173ms Thu 04 Oct 2018 23:41:38 CEST
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.0 (2018-08-08)
_/ |\__'_|_|_|\__'_| |
|__/ |
(v1.0) pkg> add Arpack#master
Cloning default registries into /home/sl/.julia/registries
Cloning registry General from "https://github.com/JuliaRegistries/General.git"
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Cloning git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Updating git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Resolving package versions...
Installed BinaryProvider ─ v0.5.1
Updating `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
Updating `~/.julia/environments/v1.0/Manifest.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
[b99e7846] + BinaryProvider v0.5.1
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8ba89e20] + Distributed
[b77e0a4c] + InteractiveUtils
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`:
│ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-3/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz to /home/sl/.julia/packages/Arpack/UiiMc/deps/usr/downloads/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz...
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/sl/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/sl/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408
│ [2] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:388
│ [5] top-level scope at none:0
│ in expression starting at /home/sl/.julia/packages/Arpack/UiiMc/deps/build.jl:74
[23:42:14] ######################################################################## 100.0%
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
Can you post the output of the following for me:
$ LD_DEBUG=libs julia -e 'using Pkg, Libdl; dlopen(Pkg.dir("Arpack", "deps", "usr", "lib", "libarpack.so"))'
So running this right after the set of commands from above: https://gist.github.com/wehlutyk/77ded681c17d0cb8cf0be9312335f046.
Also:
$ tree -lah .julia/packages/Arpack/UiiMc/deps/usr/lib/
.julia/packages/Arpack/UiiMc/deps/usr/lib/
├── [4.0K] cmake
├── [ 14] libarpack.so -> libarpack.so.2
├── [ 18] libarpack.so.2 -> libarpack.so.2.0.0
└── [366K] libarpack.so.2.0.0
Ah, so it did have an effect; it stopped complaining about libgfortran
and instead started complaining about libopenblas64_.so.0
. Do you have such a file on your computer? If not, what is your libopenblas
called?
Indeed, hadn't noticed that. I don't have a file named exactly that. My blas library was Arch's blas
package (which provides /usr/lib/libblas.so
, /usr/lib/libblas.so.3
, /usr/lib/libblas.so.3.8.0
, but no libopenblas), and installing openblas
instead gives me:
/usr/lib/libblas.so
/usr/lib/libblas.so.3
/usr/lib/libopenblas.so
/usr/lib/libopenblas.so.3
/usr/lib/libopenblasp-r0.3.3.so
(And the debug ouput from julia is unchanged.)
I just noticed there's also a libopenblas in /usr/lib/julia
, so installing a system-wide one wouldn't be necessary anyway:
ls -l /usr/lib/julia/libopenblas*
-rwxr-xr-x 1 root root 29168800 Sep 17 06:46 /usr/lib/julia/libopenblas.so
lrwxrwxrwx 1 root root 14 Sep 17 06:46 /usr/lib/julia/libopenblas.so.0 -> libopenblas.so
Because your OpenBLAS is named libopenblas.so
and not libopenblas64_.so
, I'm guessing that it is not an ILP64 BLAS, (which means that the indices used in matrix operations in your library are 32-bit, not 64-bit). This means that your BLAS operations will be unable to deal with matrices with more than 4.5B elements along any single axis. This may seem like an unrealistic amount, but for many Julia users that is not an unrealistic size at all.
By default, we build all BLAS libraries as ILP64 on 64-bit platforms. Many distributions lag behind us in this, because they want to provide a single BLAS that can be used by all different kinds of numerical software, but unfortunately you cannot swap out a non-ILP64 library with an ILP64 library. We jump through all sorts of hoops in the Julia language because of this, renaming symbols within OpenBLAS so as to allow our ILP64 version of OpenBLAS to peacefully co-exist within a single process as another 3rd party binary that may need a non-ILP64 BLAS might link one in, and you don't want it to accidentally start calling ILP64 functions. (That's also why we name it libopenblas64_.so
, to show that it's not the same thing as libopenblas.so
).
There are two solutions for you here:
Build Julia as we recommend, using an ILP64 configuration for OpenBLAS. You will lose the ability to swap out other BLAS implementations (note that the other BLAS library that we recommend, Intel's MKL library also provides an ILP64 interface). Assuming you're using some kind of distribution package, you'd need to change how the package is built. This is my preferred path, as a Julia limited to non-ILP64 BLAS is a fairly serious limitation for large-scale problems.
Alter the ArpackBuilder recipe to build a non-ILP64 version of Arpack on all platforms. We could auto-detect that you're using non-ILP64 BLAS libraries, and download a version of Arpack that is linked against it. This is very low on my priority list, so I won't be working on it any time soon, but if you wanted to try and do this, I would be happy to walk you through first building non-ILP64 versions of OpenBLAS within OpenBLASBuilder, then using those within an alternate ArpackBuilder, then finally working in the autodetection code within Arpack.jl that would decide which binary to install.
That's a very useful piece of context, thank you!
4.5B elements doesn't seem too far from what I might be facing if I start migrating to Flux.jl fulltime, so I think I'll just go with option 0 and use the binaries from the Julia website since I also need a non-ILP64 implementation on my system.
Thanks for debugging this for me and for the explanations!
BTW as of today Arch Linux's julia package builds against the system openblas (I finally got it to work) so toggling ILP64 for the internal, vendored copy would not be a solution.
When building Arpack.jl with Julia 1.0.1 on Arch Linux 4.18.12 x86_64 (latest update, community/julia 2:1.0.1-2
), I'm getting the following error:
(v1.0) pkg> build Arpack
Building Arpack → `~/.julia/packages/Arpack/WP3ru/deps/build.log`
┌ Error: Error building `Arpack`:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-0.2.20/ArpackBuilder.x86_64-linux-gnu.tar.gz; continuing...
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/cVlaj/src/Prefix.jl:185
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/user/.julia/packages/Arpack/WP3ru/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/user/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408
│ [2] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/user/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:395
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:388
│ [5] top-level scope at none:0
│ in expression starting at /home/user/.julia/packages/Arpack/WP3ru/deps/build.jl:40
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069
Could it be related to this issue? If not, what could I be doing wrong? TIA.
We're currently testing the solution of this problem on the latest development version of Arpack.jl
; you need to do pkg> add Arpack#master
within the Pkg REPL mode to install the latest master
version of Arpack
within your package environment. (If you've already done that, then you need to pkg> update
to get the latest version). This will no longer be necessary once a new version of Arpack
is released, however there may be other considerations than just this fix before a new release is made, I'm not sure.
@mindbound, try repackaging Arpack.jl using a symlink to the libarpack.so provided by the Arch Linux system arpack package.
Trying to use the latest development version unfortunately results in another error:
(v1.0) pkg> add Arpack#master
Updating git-repo `https://github.com/JuliaLinearAlgebra/Arpack.jl.git`
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] + Arpack v0.2.3+ #master (https://github.com/JuliaLinearAlgebra/Arpack.jl.git)
Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]
Building Arpack → `~/.julia/packages/Arpack/UiiMc/deps/build.log`
┌ Error: Error building `Arpack`:
│ [ Info: Downloading https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-3/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz to /home/user/.julia/packages/Arpack/UiiMc/deps/usr/downloads/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz...
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/user/.julia/packages/Arpack/UiiMc/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/user/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408
│ [2] (::getfield(BinaryProvider, Symbol("#kw##write_deps_file")))(::NamedTuple{(:verbose,),Tuple{Bool}}, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at ./none:0
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:388
│ [5] top-level scope at none:0
│ in expression starting at /home/user/.julia/packages/Arpack/UiiMc/deps/build.jl:74
[23:31:24] ######################################################################## 100.0%
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069
@eli-schwartz, how do I do that? I tried finding something relevant in the Julia docs but failed.
Basically, the same as what @mindbound has:
julia> versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
julia> using DifferentialEquations
[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.build("Arpack").
Currently, the build command might fail when Julia has been built from source
and the recommendation is to use the official binaries from julialang.org.
For more info see https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/5.
Stacktrace:
[1] top-level scope at /home/user/.julia/packages/Arpack/WP3ru/src/Arpack.jl:19
[2] top-level scope at none:2
in expression starting at /home/user/.julia/packages/Arpack/WP3ru/src/Arpack.jl:16
ERROR: LoadError: LoadError: Failed to precompile Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97] to /home/user/.julia/compiled/v1.0/Arpack/X5VZL.ji.
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1041
[3] include at ./sysimg.jl:29 [inlined]
[4] include(::String) at /home/user/.julia/packages/PDMats/mL7bX/src/PDMats.jl:3
[5] top-level scope at /home/user/.julia/packages/PDMats/mL7bX/src/PDMats.jl:53
[6] top-level scope at none:2
in expression starting at /home/user/.julia/packages/PDMats/mL7bX/src/pdsparsemat.jl:1
in expression starting at /home/user/.julia/packages/PDMats/mL7bX/src/PDMats.jl:52
ERROR: LoadError: Failed to precompile PDMats [90014a1f-27ba-587c-ab20-58faa44d9150] to /home/user/.julia/compiled/v1.0/PDMats/wuzEE.ji.
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/user/.julia/packages/Distributions/WHjOk/src/Distributions.jl:3
ERROR: LoadError: Failed to precompile Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] to /home/user/.julia/compiled/v1.0/Distributions/xILW0.ji.
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/user/.julia/packages/LsqFit/IsCnQ/src/LsqFit.jl:10
ERROR: LoadError: Failed to precompile LsqFit [2fda8390-95c7-5789-9bda-21331edee243] to /home/user/.julia/compiled/v1.0/LsqFit/GCdY9.ji.
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/user/.julia/packages/DiffEqParamEstim/FpD31/src/DiffEqParamEstim.jl:4
ERROR: LoadError: Failed to precompile DiffEqParamEstim [1130ab10-4a5a-5621-a13d-e4788d82bd4c] to /home/user/.julia/compiled/v1.0/DiffEqParamEstim/nWq0E.ji.
Stacktrace:
[1] top-level scope at none:2
in expression starting at /home/user/.julia/packages/DifferentialEquations/88DSk/src/DifferentialEquations.jl:19
ERROR: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to /home/user/.julia/compiled/v1.0/DifferentialEquations/UQdwS.ji.
and
julia> Pkg.build("Arpack")
Building Arpack → `~/.julia/packages/Arpack/WP3ru/deps/build.log`
┌ Error: Error building `Arpack`:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │ caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaLinearAlgebra/ArpackBuilder/releases/download/v3.5.0-0.2.20/ArpackBuilder.x86_64-linux-gnu.tar.gz; continuing...
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/cVlaj/src/Prefix.jl:185
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/user/.julia/packages/Arpack/WP3ru/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│ [1] #write_deps_file#152(::Bool, ::Function, ::String, ::Array{LibraryProduct,1}) at /home/user/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:408
│ [2] write_deps_file(::String, ::Array{LibraryProduct,1}) at /home/user/.julia/packages/BinaryProvider/cVlaj/src/Products.jl:395
│ [3] top-level scope at none:0
│ [4] include(::String) at ./client.jl:388
│ [5] top-level scope at none:0
│ in expression starting at /home/user/.julia/packages/Arpack/WP3ru/deps/build.jl:40
└ @ Pkg.Operations /build/julia/src/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1069
@eli-schwartz can you add any detail regarding your symlink suggestion? I tried the shell command ln -s /usr/local/lib/libarpack.so /home/my-user-name/.julia/packages/Arpack/UiiMc/deps/usr/libarpack
then Pkg.build("Arpack")
back in the Julia REPL. My output was no different than what @mindbound was getting. I also tried to build after editing the build.jl to look in /usr/local/lib/ directly...same error message.
For ArchLinux, you can do the following hack:
First download Julia v1.0.1 and unpack it to a dir unpacked_dir
and then, do
$ sudo ln -s unpacked_dir/lib/julia/libopenblas64_.so* /usr/lib
$ julia
] build Arpack
On MacOS 10.12.6 with Julia 1.1-dev#367aab3
and today's Arpack#master
, the cause of failure is this:
Libdl.dlopen("/Users/username/.julia/dev/Arpack/deps/usr/lib/libarpack.2.0.0.dylib"; throw_error=true)
ERROR: could not load library "/Users/username/.julia/dev/Arpack/deps/usr/lib/libarpack.2.0.0.dylib"
dlopen(/Users/username/.julia/dev/Arpack/deps/usr/lib/libarpack.2.0.0.dylib, 1):
Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /Users/username/.julia/dev/Arpack/deps/usr/lib/libarpack.2.0.0.dylib
Reason: image not found
@damiendr are you running your julia out of the build tree? E.g. you ran make
and then ran ./julia
without running make install
? If so, running make install
will bundle Julia together into a directory (named something like julia-367aab3
) and if you run Julia out of that directory it should work, as it will have collected all the necessary dependent libraries (such as libgfortran
) already. I have a PR open to do this earlier (e.g. during build time, not just during make install
time) but it unfortunately has not been merged yet.
@staticfloat correct, thanks for pointing this out! I've just run make install
but this did not fix the problem, and indeed there is no libgfortran
in julia-367aab3dc1/lib/julia
. Compared to the 1.0 official binary, that lib dir is missing libgcc
, libgfortran
and libquadmath
. But I realise I'm running an untagged dev version, maybe I should wait for the next tagged release and try again.
I'm terribly sorry, it's not make install
its make binary-dist
; that will generate a .tar.gz
that contains everything bundled up and ready for distribution. You can then unpack that anywhere you want. It's not a perfect workaround, but it should solve the issue for you.
@staticfloat that fixed it, thanks a lot! Arpack now builds & passes tests.
I've been following this issue and #7, and from what I gather this only fixes the build issue when Julia is built from source with OpenBLAS. If so, is there any way for Arpack to build from MKL with the current master? Or will this be addressed in a future PR?
@platawiec
It is much simpler for everyone if the binaries are built once, and simply distributed to users in the format they were going to compile down to anyway.
The maintainers of this software have engaged in significant, nontrivial effort to provide prebuilt libarpack.so binaries for a wide variety of possible from-source build permutations, completely ignoring the underlying issue which is that from-source builds already come with ecosystem libarpack.so that works. They're plainly uninterested in any sort of fallback mode that helps downstream choice at the expense of highly theoretical compilation woes.
Your only hope, apparently, is to add another 6 or 7 prebuilt artifacts to a giant case statement and release a new version of the software, then repeat this every time something on your system changes.
@blegat That didn't seem to work though... I still got the same errors and eventually I had to uninstall Julia and use the binary download version on Arch Linux. Using Arpack#master
didn't help either.
It's still the case for me that the only thing that works on the Mac is to run julia as:
DYLD_LIBRARY_PATH=/usr/local/opt/gcc@8/lib/gcc/8 ./julia
I've tried symlinking libgfortran.5.dylib into the Arpack deps/usr/lib
folder and that did not fix the problem.
@blakejohnson Did you try to build julia with make binary-dist
?
@andreasnoack I was running julia from the repo directory (i.e. just make
and then ./julia
)
It is quite unfortunate to know the Julia does not support compiling from source. I am surprised because arpack is such a central package for many high-level libraries.
To clarify, does this bug mean that it is currently impossible to install Arpack.jl when Julia is built from source with Intel MKL, or is there a workaround? If there is no workaround, are there any plans to support Julia + MKL?
(v1.0) pkg> test Arpack
Testing Arpack
Resolving package versions...
Status `/tmp/tmpLoS05i/Manifest.toml`
[7d9fca2a] Arpack v0.3.0+ [`~/.julia/dev/Arpack`]
[b99e7846] BinaryProvider v0.5.2
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
Test Summary: | Pass Total
eigs | 56 56
Test Summary: | Pass Total
real svds | 189 189
Test Summary: | Pass Total
complex svds | 7 7
Test Summary: | Pass Total
promotion | 3 3
Test Summary: | Pass Total
svds for non-AbstractMatrix | 1 1
Testing Arpack tests passed
julia> using LinearAlgebra
julia> BLAS.vendor()
:mkl
I think my workaround was simply to have Julia built with OpenBLAS installed and use that to install Arpack. Seems that lets me call it just fine from Julia + MKL.
Can confirm @chriselrod's workaround. Maybe Arpack.jl should just go and download Julia itself :upside_down_face:
I can confirm as well! To get it to work, I simply had to make sure that the Julia built with OpenBLAS was installing Arpack in the environment I wanted to use it in for the MKL version.
Maybe I don't understand but the "fix" doesn't work for me. If I install and build Arpack with Julia + OpenBLAS (binaries) and then use my compiled Julia + MKL to use it I get:
julia> using Arpack
[ Info: Recompiling stale cache file /gpfs/homea/hku27/hku273/.julia-mkl/compiled/v1.0/Arpack/X5VZL.ji for Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97]
julia> eigs(rand(100,100))
ERROR: error compiling aupd_wrapper: error compiling naupd: could not load library "/gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/deps/usr/lib/libarpack.so"
libopenblas64_.so.0: cannot open shared object file: No such file or directory
Stacktrace:
[1] #_eigs#17(::Int64, ::Int64, ::Symbol, ::Float64, ::Int64, ::Nothing, ::Array{Float64,1}, ::Bool, ::typeof(Arpack._eigs), ::Array{Float64,2}, ::LinearAlgebra.UniformScaling{Bool}) at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:120
[2] _eigs at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:88 [inlined]
[3] #eigs#10 at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:63 [inlined]
[4] eigs at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:63 [inlined]
[5] #eigs#9 at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:62 [inlined]
[6] eigs(::Array{Float64,2}) at /gpfs/homea/hku27/hku273/.julia-mkl/packages/Arpack/0oGDs/src/Arpack.jl:62
[7] top-level scope at none:0
Do have to use a self-compiled Julia + OpenBLAS?
Note that I also can't use Distributions.jl because of this (as it seems to depend on Arpack).
Deleting and reinstalling Homebrew fixed the issue with Arpack for me.
The problem seems to be that libarpack is linked to libopenblas64_.so
as shown in
$ ldd ~/.julia/packages/Arpack/UiiMc/deps/usr/liblibarpack.so
linux-vdso.so.1 (0x00007fff363c5000)
libopenblas64_.so.0 => not found
libgfortran.so.5 => /usr/lib/libgfortran.so.5 (0x00007f67481fe000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f6748079000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f674805f000)
libquadmath.so.0 => /usr/lib/libquadmath.so.0 (0x00007f674801c000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f6747e58000)
libz.so.1 => /usr/lib/../lib/libz.so.1 (0x00007f6747c3f000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f6748709000)
On Archlinux with community LibOpenblas, a symbolic link to libopenblas.so
fixes the issue:
# ln -s /usr/lib/libopenblas.so /usr/lib/libopenblas64_.so.0
and Arpack builds fine. (@crstnbr, this also fixes the problem with Distributions.jl).
Why is the "64_" added to the library filename?
@rsrsl Unfortunately, I don't have write access to /usr/lib
. I'm on a university cluster.
Also, for me the ouput is
$ ldd packages/Arpack/UiiMc/deps/usr/lib/libarpack.so
linux-vdso.so.1 => (0x00007ffda671f000)
libopenblas64_.so.0 => not found
libgfortran.so.5 => not found
libm.so.6 => /lib64/libm.so.6 (0x00002b1702652000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b17028d6000)
libquadmath.so.0 => not found
libc.so.6 => /lib64/libc.so.6 (0x00002b1702aed000)
/lib64/ld-linux-x86-64.so.2 (0x0000003801600000)
so apparently more than just libopenblas64_.so.0
can't be found.
Regarding the 64_
suffix, maybe this has something to do with the comment here:
Binaries designed to be compatible with Julia are regularly provided in https://github.com/staticfloat/OpenBLASBuilder/releases . Note that their 64bit builds with INTERFACE64=1 have _64 appended to the function symbol names, so your code needs to refer to e.g. gemm64 rather than gemm_
@crstnbr, you have libgfortran
missing on the cluster. Both libgfortran
and libquadmath
are provided in that package.
@rsrsl Unfortunately, I don't have write access to /usr/lib. I'm on a university cluster.
Maybe you can try
mkdir -p $HOME/usr/lib
ln -fis /usr/lib/libopenblas.so $HOME/usr/lib/libopenblas64_.so.0
LD_LIBRARY_PATH=$HOME/usr/lib julia
to set the symbolic link in your home folder, configure your LD_LIBRARY_PATH
environment variable accordingly and fire up julia. Then, ]build Arpack
should work.
IMHO the line that forces Julia's preference on the so
naming convention of OpenBLAS is the problem. It would be better if ArpackBuilder downloaded OpenBLAS from source and built it, and then built Arpack using cmake's CMAKE_PREFIX_PATH
variable to point to $prefix
to link against the OpenBLAS built from source. This way, the tarballs would be self-contained.
In principle, I think that the prebuilt binaries should (re-)distribute their dependencies without assuming how the target system is configured. But I am no expert, either :(
Why is the "64_" added to the library filename?
Because we build OpenBLAS with 64 bit integers. I think most Linux distros build with 32 bit integers.
I tried installing Arpack on 0.7 beta and saw this error trying to run
eigs
:To see if this was solved on master, I tried installing it. But this happens when I try to
develop Arpack#master
: