Julia can't find Qt6 DLL

Hello,

This problem has been seen multiple times, however this has has not been resolved as far as I am aware.

When installing Plots by

using Pkg; Pkg.add("Plots")

the installation fails because of Qt6 library files not being found, even though there are present in the mentioned .artifacts subfolder.

  ✗ Qt6ShaderTools_jll
  ✗ GR_jll
  ✗ Qt6Declarative_jll
  ✗ GR
  ✗ Plots
  ✗ Plots → UnitfulExt
  139 dependencies successfully precompiled in 155 seconds. 7 already precompiled.
  6 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

julia> Pkg.precompile()
Precompiling project...
  ✗ Qt6ShaderTools_jll
  ✗ GR_jll
  ✗ Qt6Declarative_jll
  ✗ GR
  ✗ Plots
  ✗ Plots → UnitfulExt
  0 dependencies successfully precompiled in 37 seconds. 146 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "C:\\Users\\rs\\.julia\\compiled\\v1.9\\Plots\\jl_9782.tmp".
ERROR: LoadError: InitError: could not load library "C:\Users\rs\.julia\artifacts\762f4b366aa9d1f908b33813a6852d64a4d56bff\bin\Qt6Test.dll"
La procédure spécifiée est introuvable.

The last line can be translated by
The speficied procedure could not be found.

The Qt6Test.dll is present in the directory. Here’s the output of the DependencyWalker

julia> Library("C:\\Users\\rs\\.julia\\artifacts\\762f4b366aa9d1f908b33813a6852d64a4d56bff\\bin\\Qt6Test.dll")
◼ C:\Users\rs\.julia\artifacts\762f4b366aa9d1f908b33813a6852d64a4d56bff\bin\Qt6Test.dll
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ✗ Qt6Core.dll (NOT FOUND)
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libgcc_s_seh-1.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libstdc++-6.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libgcc_s_seh-1.dll
      ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
        ◼ C:\WINDOWS\System32\msvcrt.dll
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
        ◼ C:\WINDOWS\System32\KERNEL32.DLL
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\msvcrt.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\KERNEL32.DLL
    ◼ C:\WINDOWS\System32\KERNELBASE.dll

The Qt6Core.dll library is in the same subfolder. I tried removing the subfolder and instantiating again, but this yields the same result. The DependencyWalker gives

julia> Library("C:\Users\rs\.julia\artifacts\762f4b366aa9d1f908b33813a6852d64a4d56bff\bin\Qt6Core.dll")
◼ C:\Users\rs\.julia\artifacts\762f4b366aa9d1f908b33813a6852d64a4d56bff\bin\Qt6Core.dll
  ◼ C:\WINDOWS\System32\ole32.dll
    ◼ C:\WINDOWS\System32\RPCRT4.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\combase.dll
      ◼ C:\WINDOWS\System32\RPCRT4.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\GDI32.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\USER32.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\GDI32.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ✗ MPR.dll (NOT FOUND)
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libgcc_s_seh-1.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libstdc++-6.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libgcc_s_seh-1.dll
      ◼ C:\Julia-1.9.2\julia-1.9.2\bin\libwinpthread-1.dll
        ◼ C:\WINDOWS\System32\msvcrt.dll
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
        ◼ C:\WINDOWS\System32\KERNEL32.DLL
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\USER32.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\GDI32.dll
  ✗ AUTHZ.dll (NOT FOUND)
  ◼ C:\WINDOWS\System32\msvcrt.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\KERNEL32.DLL
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\ADVAPI32.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\RPCRT4.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\sechost.dll
      ◼ C:\WINDOWS\System32\RPCRT4.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\bcrypt.dll
  ◼ C:\WINDOWS\System32\SHELL32.dll
    ◼ C:\WINDOWS\System32\msvcp_win.dll
    ◼ C:\WINDOWS\System32\GDI32.dll
    ◼ C:\WINDOWS\System32\USER32.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\GDI32.dll
  ◼ C:\WINDOWS\SYSTEM32\WINMM.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\WS2_32.dll
    ◼ C:\WINDOWS\System32\RPCRT4.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ✗ VERSION.dll (NOT FOUND)
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll

I can locate both a mpr.dll and a authz.dll in System32.
Any idea on how to solve this problem ?

Version info:

Julia Version 1.9.2
Commit e4ee485e90 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10810U CPU @ 1.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 12 virtual cores

It appears that the library is actually found but fails to load because of linkage problems. I think the explanation is given in this issue, so the suggested solution is to upgrade to a supported version of Julia.

Yeah, most operating systems print to screen incredibly misleading and uninformative error messages: the file indicated in the error message is found, but it can’t be loaded because the dynamic loader can’t resolve a function referenced by that library, except the OS doesn’t tell you which function (which it very well knows, since the dynamic loader was looking for it).

Thank you for your answers. Unfortunately, I don’t have sudo privileges and this Julia version is the only one I can have right now. I can try to send a request to the IT team, but I may never have an answer.
Alas, as hinted in the GitHub issue, it seems upgrading is the only way forward.

Try if ControlPlots.jl or PyPlot.jl works with Julia 1.9.

PyPlot is working fine and I have been using it since this problem.
However, I have made many scripts before that now needs to be adapted, which is time consuming. Not much I can do besides that I guess.

Are you on your local computer or on a HPC cluster? If you work locally, you do not need sudo priviledges to install Julia. Just use juliaup and you can install and run any Julia version from your home directory.

I am working on a local computer, but the Windows Store is also not available, which is the common install for juliaup. I just found the following: Looking for feedback from users that currently can't install Juliaup from the Windows Store - #2 by davidanthoff
Is this what you mean by “not needing sudo privileges” for juliaup ?

Use the portable version https://julialang-s3.julialang.org/bin/winnt/x64/1.10/julia-1.10.9-win64.zip
You only have to add the bin dir to your path (or just create an icon on desktop)