Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build Arpack on ArchLinux #75

Closed
tamasgal opened this issue Sep 26, 2019 · 7 comments
Closed

Cannot build Arpack on ArchLinux #75

tamasgal opened this issue Sep 26, 2019 · 7 comments

Comments

@tamasgal
Copy link

I get the following error on ArchLinux, which I reproduced in a Docker environment, see below:

(v1.2) pkg> add Arpack
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed Arpack ───────── v0.3.1
 Installed BinaryProvider ─ v0.5.6
  Updating `~/.julia/environments/v1.2/Project.toml`
  [7d9fca2a] + Arpack v0.3.1
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [7d9fca2a] + Arpack v0.3.1
  [b99e7846] + BinaryProvider v0.5.6
  [8f399da3] + Libdl 
  [37e2e46d] + LinearAlgebra 
  [56ddb016] + Logging 
  [ea8e919c] + SHA 
  Building Arpack → `~/.julia/packages/Arpack/cu5By/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 /root/.julia/packages/Arpack/cu5By/deps/usr/downloads/Arpack.v3.5.0-3.x86_64-linux-gnu-gcc8.tar.gz...
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/root/.julia/packages/Arpack/cu5By/deps/usr)") is not satisfied, cannot generate deps.jl!
│ Stacktrace:
│  [1] #write_deps_file#152(::Bool, ::typeof(write_deps_file), ::String, ::Array{LibraryProduct,1}) at /root/.julia/packages/BinaryProvider/TcAwt/src/Products.jl:414
│  [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 /root/.julia/packages/Arpack/cu5By/deps/build.jl:74
│  [4] include(::String) at ./client.jl:431
│  [5] top-level scope at none:5
│ in expression starting at /root/.julia/packages/Arpack/cu5By/deps/build.jl:74
[15:21:02] ######################################################################## 100.0% 
└ @ Pkg.Operations /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Pkg/src/backwards_compatible_isolation.jl:647

The libarpack.so are there:

[root@07301ef4fa80 /]# find / -name "libarpack.so"
/root/.julia/packages/Arpack/cu5By/deps/usr/lib/libarpack.so
/usr/lib/libarpack.so

Here is the docker environment I used:

$ docker run -it archlinux/base
root# pacman -Sy --noconfirm git arpack julia

and then the usual comnand to install Arpack.jl: ]add Arpack

@tamasgal
Copy link
Author

I just found that libarpack.so is missing libopenblas64_.so:

[root@3b226d9411f0 /]# ldd /root/.julia/packages/Arpack/cu5By/deps/usr/lib/libarpack.so
        linux-vdso.so.1 (0x00007fffa55f2000)
        libopenblas64_.so.0 => not found
        libgfortran.so.5 => /usr/lib/libgfortran.so.5 (0x00007fef4035a000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fef40214000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fef401fa000)
        libquadmath.so.0 => /usr/lib/libquadmath.so.0 (0x00007fef401af000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fef3ffec000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007fef40858000)

While on ArchLinux the files are

[root@3b226d9411f0 /]# find / -name "libopenblas*"
/usr/lib/libopenblas.so
/usr/lib/libopenblas.so.3
/usr/lib/libopenblasp-r0.3.6.so

Why is it not using libopenblas.so?

@andreasnoack
Copy link
Member

How did you install Julia?

@tamasgal
Copy link
Author

tamasgal commented Sep 27, 2019

pacman -Sy --noconfirm git arpack julia

pacman is the package manager of ArchLinux. You can reproduce it by installing docker and running these two commands as written above:

to retrieve the base image and run the container:

$ docker run -it archlinux/base

afterwards inside the container:

$ pacman -Sy --noconfirm git arpack Julia
$ julia
... ]add Arpack

@andreasnoack
Copy link
Member

Please try to install the official release. This was discussed in #5 so I'll close here.

@tamasgal
Copy link
Author

I will do so, thanks. However I think this needs to be fixed (I guess upstream from the fellows who maintain the ArchLinux package) since ArchLinux is a popular distribution and the fact that I cannot use Julia out of the box is quite annoying. Installing things like e.g. LsqFit.jl requires Arpack and many people prefer to install stuff using their distributions package manager.

@duncanam
Copy link

duncanam commented Oct 8, 2019

I'd like to reference here for anyone else that is having this problem that a work-around fix for the time being is to copy libarpack from /usr/lib to the Arpack Julia library folder. This is what I have done, starting from Julia install:

  1. Install Julia though pacman: sudo pacman -S julia
  2. In Julia REPL, try to install arpack: julia> using Pkg; Pkg.add("Arpack")
  3. This will fail, but gets us started.
  4. Install arpack through pacman: sudo pacman -S arpack
  5. Copy the file mentioned earlier so that Julia can build it:
    cp /usr/lib/libarpack.so.2.1.0 ~/.julia/packages/Arpack/cu5By/deps/usr/lib/libarpack.so.2.0.0
  6. Build Arpack in Julia: julia> using Pkg; Pkg.build("Arpack")
  7. Test: julia> using Arpack
  8. Hopefully no errors

This is what worked for me. I'm hoping that by going through this here someone else might be able to fix their Arch system for the time being.

@theferrit32
Copy link

I'm on Arch and having this problem, but the exact same issue seems to happen on both OpenSUSE Tumbleweed and Ubuntu 19.10. Interestingly, if I manually build Julia from source, either from the v1.2.0 or v1.3.0 git tags, the issue doesn't happen.

So something that apparently all major distros are doing in their build of Julia causes Arpack to not be instalable, but everything other package I've used works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants