Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

The SLICOT_jll-v5.8 fails to link with Julia 1.8.0

Open andreasvarga opened this issue 3 years ago • 8 comments
trafficstars

Recently the SLICOT library has been updated to v5.8 and the corresponding SLICOT_jll has been generated by courtesy of Ralph Smith. I uploaded the package and it works fine locally with Julia 1.7.2. However, running some CI tests, I got complaints of version incompatibility (see below) (e.g., on Julia ^1.8.0-0 - ubuntu-latest - x64 )

 
Run julia --color=yes --project=@. -e 'using Pkg; if VERSION >= v"1.1.0-rc1"; Pkg.build(verbose=true); else Pkg.build(); end'
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: Unsatisfiable requirements detected for package libblastrampoline_jll [8e850b90]:
 libblastrampoline_jll [8e850b90] log:
 ├─possible versions are: 5.1.0 or uninstalled
 └─found to have no compatible versions left with SLICOT_jll [545525a2]

I am not sure what this means, but looking to compatibilities of SLICOT_jll, there is libblastrampoline_jll = "3.0.4" I wonder if this covers all later versions (e.g., 5.1.0 mentioned above).

Note that with with Julia 1.7.3 the tests run correctly!

andreasvarga avatar Jun 01 '22 08:06 andreasvarga

Someone should do something like #4770 (for lack of better options at the moment)

giordano avatar Jun 05 '22 15:06 giordano

Since this wraps a Fortran library we also have the proliferation of gfortran versions. Is there any way to avoid combinatorial explosion?

RalphAS avatar Jun 05 '22 23:06 RalphAS

Not really, sadly.

giordano avatar Jun 05 '22 23:06 giordano

A question: As I remember, with SLICOT_jll for v5.7, I executed all tests with both Julia 1.7 and 1.8 without problems. What is essentially different now with the version for v5.8?

andreasvarga avatar Jun 07 '22 08:06 andreasvarga

As I remember, with SLICOT_jll for v5.7, I executed all tests with both Julia 1.7 and 1.8 without problems.

I doubt it, as SLICOT_jll v5.7 was already linking to libblastrampoline.

giordano avatar Jun 07 '22 08:06 giordano

I posted 4 (four) releases of PeriodicSystems. Releases v0.1, v0.2 and v0.3 were based on SLICOT_jll_v5.7 and I switched to SLICOT_jll_v5.8 in Release v0.3.1. I extracted below from the history of CI.yml files the relevant settings for tests.

Release v0.1 was succesfully tested using

      matrix:
        version:
          - '1.7' 
          # - '1' 
          - 'nightly' 
        os:  [ubuntu-latest]

Releases v0.2 and v0.3 were succesfully tested using

      matrix:
        version:
          - '1.7' 
          # - '1' 
          - '^1.8.0-0'
          # - 'nightly' 
        os:  
          - ubuntu-latest
          - windows-latest

but the nightly test failed because of ApproxFun.jl. (see the ci.yml file of ApproxFun.jl which led to my new test setting).

Release v0.3.1 was succesfully tested using

      matrix:
        version:
          - '1.7' 
          # - '1' 
          # - '^1.8.0-0'
          # - 'nightly' 
        os:  
          - ubuntu-latest
          - windows-latest

but failed with

      matrix:
        version:
          - '1.7' 
          # - '1' 
          - '^1.8.0-0'
          # - 'nightly' 
        os:  
          - ubuntu-latest
          - windows-latest

So, my understanding is that SLICOT_jll_v5.7 was succesfully running with Julia 1.7, 1.8 and Julia nightly.

andreasvarga avatar Jun 07 '22 10:06 andreasvarga

At least on Linux, Julia v1.8 includes symlink libblastrampoline.so, as well as the (new) numbered LBT.so.5, so the old references will resolve. (With the old LBT BinaryBuilder just put the unnumbered SO in the link tables.) SLICOT only links to Fortran symbols in LBT, so the part of the ABI which changed does not affect it.

When I instantiate a project using SLICOT in a Julia v1.8 session, I get v5.7 (with some complaints) but my tests run successfully. If I try to insist on v5.8 it fails as indicated above.

RalphAS avatar Jun 08 '22 02:06 RalphAS

This issue has been partly resolved. The generated tarball for SLICOT_jll contains guarantedly valid libraries for Julia 1.7 (under Linux and Windows) and for Julia 1.8 (only under Linux). However, for Julia 1.8 under Window, the generated library is somehow corrupted, causing Julia to crash. Is any way to check the integrity of currently loaded SLICOT_jll? Any hint how to debug this issue would be very helpful.

andreasvarga avatar Sep 22 '22 10:09 andreasvarga

I tried to find a comparable library, e.g. ARPACK, which has similar bindings as SLICOT to the underlying linear algebra libraries BLAS and LAPACK. By inspecting the Windows related tarbals for the last versions of ARPACK and SLICOT, there is a discrepancy between the number of generated assets 94 for ARPACK and 370 for SLICOT. The tests of ARPACK with Julia 1.8 under Windows run without errors as can be seen here. I wonder if a similar approach for SLICOT would also work?

andreasvarga avatar Nov 20 '22 11:11 andreasvarga

I did some investigation on Wine over at https://github.com/JuliaLang/julia/issues/47638#issuecomment-1321235754

It seems we are linking against libblastrampoline-5-0-2.dll and Julia dllopen's libblastrampoline.dll on every other system these are symlinked, but on Windows they are distinct.

vchuravy@odin ~/b/julia-1.8.3-win64> ls -la bin/
total 290828
drwxr-xr-x 1 vchuravy vchuravy      1622 Nov 14 17:25 ./
drwxr-xr-x 1 vchuravy vchuravy        76 Nov 14 17:25 ../
-rwxr-xr-x 1 vchuravy vchuravy    153197 Nov 14 17:08 julia.exe*
-rwxr-xr-x 1 vchuravy vchuravy    160796 Nov 14 17:07 libamd.dll*
-rwxr-xr-x 1 vchuravy vchuravy    287131 Nov 14 17:07 libatomic-1.dll*
-rwxr-xr-x 1 vchuravy vchuravy   2207543 Nov 14 17:07 libblastrampoline-5-0-2.dll*
-rwxr-xr-x 1 vchuravy vchuravy   2207543 Nov 14 17:07 libblastrampoline-5.dll*
-rwxr-xr-x 1 vchuravy vchuravy   2207543 Nov 14 17:07 libblastrampoline.dll*

vchuravy avatar Nov 20 '22 20:11 vchuravy

And the true villain here is libblastrampoline_jll on v4 only has libblastrampoline.dll whereas v5.0.2 has all variants.

vchuravy avatar Nov 20 '22 20:11 vchuravy

Also https://github.com/JuliaLinearAlgebra/libblastrampoline/issues/89

vchuravy avatar Nov 20 '22 21:11 vchuravy

Hopefully old. Please reopen if not.

ViralBShah avatar Feb 05 '24 22:02 ViralBShah