FS#58221 - [julia] eigs/svds functions relying on arpack dependency not working

Attached to Project: Community Packages
Opened by Jeff (jeffersyno) - Friday, 13 April 2018, 20:01 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 19 April 2018, 09:06 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
The standard library functions 'eigs' and 'svds' that internally use routines defined by arpack do not work as expected. The example provided below works fine when using the binaries from the Julia website. The binaries from the Julia website include their own libarpack.so, while the [community] Julia package uses the system's arpack.

Additional info:
* julia 2:0.6.2-4
* arpack 3.5.0-3

Steps to reproduce:
start Julia, in Julia's REPL:
julia> A = spdiagm(1:25);
julia> eigs(A)
ERROR: Base.LinAlg.ARPACKException("unexpected behavior")
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Thursday, 19 April 2018, 09:06 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Monday, 16 April 2018, 13:21 GMT
Thanks for reporting. There were issues with arpack "eigs" in combination with octave, that were fixed.

The fix in arpack probably caused this issue with Julia.

Any chance of convincing the Julia developers of testing with the latest version of arpack (that will become 3.6.0), so that they can release a patch that we can use?

I will add the julia arpack library into the julia package in the mean time, even though I'm not really fond of the approach of every binary including all of their own libraries.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 17 April 2018, 09:34 GMT
I still get the error after building with USE_SYSTEM_ARPACK=0.

Please test with julia 2:0.6.2-5 in [community] and report the bug upstream to the Julia developers if you also still get ERROR: Base.LinAlg.ARPACKException("unexpected behavior").
Comment by Luciano Lorenti (lucianolorenti) - Tuesday, 17 April 2018, 14:06 GMT
I'm still having the same error with julia 2:0.6.2-5
Comment by Luciano Lorenti (lucianolorenti) - Tuesday, 17 April 2018, 14:11 GMT
I reported the bug to Julia developers but they couldn't reproduce it.

https://github.com/JuliaLang/julia/issues/26830
Comment by Antonio Rojas (arojas) - Tuesday, 17 April 2018, 19:59 GMT
The RPATH of libjulia.so is wrong

> chrpath /usr/lib/libjulia.so
/usr/lib/libjulia.so: RPATH=$ORIGIN:$ORIGIN/julia

so julia 0.6.2-5 is still using system arpack if you have it installed. Workaround:

chrpath -r '/usr/lib/julia/' /lib/libjulia.so.0.6.2
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 18 April 2018, 08:21 GMT
@arojas Nicely figured out, thanks!

Rebuilding, testing and updating the package now.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 18 April 2018, 09:35 GMT
Added the chrpath workaround, and it works!

But the whole package with PKGBUILD and sysfix.install is pretty horrible right now. I wish Julia could just use CMake or Meson like normal human beings.
Comment by Luciano Lorenti (lucianolorenti) - Wednesday, 18 April 2018, 11:52 GMT
Thank you!
Comment by Eli Schwartz (eschwartz) - Wednesday, 18 April 2018, 12:03 GMT
Don't blame the Julia devs because you thought it would be a good idea to move package() steps like chrpath into the install script.

Which is broken BTW since you listed chrpath as a makedepends, not a depends, but then modify /usr with it at runtime....
Comment by Eli Schwartz (eschwartz) - Wednesday, 18 April 2018, 15:16 GMT
I've uploaded a fixed package that does this properly.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 19 April 2018, 09:06 GMT
I blame the Julia devs for requiring this many steps to package it.

Thanks for the fix for the missing makedepends.

Loading...