GLMakie and Plots fail to precompile under Julia 1.8.4

I run Julia regularly (not as administrator):

julia> using CompilerSupportLibraries_jll

julia> joinpath(CompilerSupportLibraries_jll.artifact_dir, "bin", "libssp-0.dll")
"C:\\Users\\Shayan\\.julia\\juliaup\\julia-1.8.4+0.x64.w64.mingw32\\bin\\libssp-0.dll"

julia> using CompilerSupportLibraries_jll, Libdl

julia> dlopen(joinpath(CompilerSupportLibraries_jll.artifact_dir, "bin", "libssp-0.dll"))
Ptr{Nothing} @0x00007ffa93990000

How? This issue happened to me just after updating julia to 1.8.4 using Juliaup. before this, I was able to use many graphical packages!! What happened then?

1 Like

Clearly there is some change in 1.8.4 that caused this to happen for some people. The point of this discussion is to try to pin-point exactly what that was (and if there is some workaround to fix it).

Thank you. I got nervous by

we can do next to nothing about it.

I installed Julia 1.8.4 from the official website (and uninstalled Juliaup), and now I can use graphical packages as before.

Update:
I can use Plots with GR backend, but not PyPlot in the fresh installation of Julia 1.8.4:

see the error
[ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
ERROR: LoadError: ArgumentError: Path to conda environment is not valid: C:/Users/Shayan/Anaconda3/envs/3.11
Stacktrace:
 [1] prefix(path::String)
   @ Conda C:\Users\Shayan\.julia\packages\Conda\x2UxR\src\Conda.jl:42
 [2] top-level scope
   @ C:\Users\Shayan\.julia\packages\Conda\x2UxR\src\Conda.jl:47
 [3] include
   @ .\Base.jl:419 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
   @ Base .\loading.jl:1554
 [5] top-level scope
   @ stdin:1
in expression starting at C:\Users\Shayan\.julia\packages\Conda\x2UxR\src\Conda.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile Conda [8f4d0f93-b110-5947-807f-2305c1781a2d] to C:\Users\Shayan\.julia\compiled\v1.8\Conda\jl_6FFD.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:1707
  [3] compilecache
    @ .\loading.jl:1651 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1200
  [6] macro expansion
    @ .\loading.jl:1180 [inlined]
  [7] macro expansion
    @ .\lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1144
  [9] include
    @ .\Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at C:\Users\Shayan\.julia\packages\PyCall\ygXW2\src\PyCall.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to C:\Users\Shayan\.julia\compiled\v1.8\PyCall\jl_6D6D.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:1707
  [3] compilecache
    @ .\loading.jl:1651 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base .\loading.jl:1200
  [6] macro expansion
    @ .\loading.jl:1180 [inlined]
  [7] macro expansion
    @ .\lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1144
  [9] include
    @ .\Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at C:\Users\Shayan\.julia\packages\PyPlot\NsAWt\src\PyPlot.jl:2
in expression starting at stdin:1
ERROR: Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to C:\Users\Shayan\.julia\compiled\v1.8\PyPlot\jl_6C25.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base .\loading.jl:1707
 [3] compilecache
   @ .\loading.jl:1651 [inlined]
 [4] _require(pkg::Base.PkgId)
   @ Base .\loading.jl:1337
 [5] _require_prelocked(uuidkey::Base.PkgId)
   @ Base .\loading.jl:1200
 [6] macro expansion
   @ .\loading.jl:1180 [inlined]
 [7] macro expansion
   @ .\lock.jl:223 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:1144
 [9] top-level scope
   @ C:\Users\Shayan\.julia\packages\Plots\M4dfL\src\backends.jl:810
But, all safe on Julia 1.8.3

Ok, so actually combination of both suggestions did the trick for me:

  • adding 1.8.4 to PATH manually (since I got it through juliaup)
  • running the terminal as admin

Separately, they did not work.
Is there any risk of having only one version in the path?
(also just as a precaution for others - the Julia webpage is not super explicit as to what is the actual path, so first I have inserted the address without \bin at the end which led to couple of my other programs crash when executing the precompile command :wink: ).

If there would be need to do some more testing, I am up for it.

1 Like

I think you should re-read what I wrote more carefully before getting nervous:

Emphasis is mine. What the Library function shows is that, while being required by some other libraries, MSIMG32.dll isn’t loaded, but perhaps that means that the dynamic loader didn’t have a chance to try and load it at all because it failed on another library before getting to MSIMG32.dll.

Can someone please show the output of the same Library command with Julia v1.8.3? I still have no idea why libssp-0.dll is searched for with julia v1.8.4 and not v1.8.3. Also, sharing the content of the PATH environment variable with both Julia v1.8.3 and v1.8.4 (especially if you’re still experiencing the same problem) would be helpful, you can use versioninfo().

Here’s the output from 1.8.3 and 1.8.4. In both cases Julia isn’t included in PATH.

1.8.3
Library(raw"C:\Users\xxxxx\.julia\artifacts\3aff78028a0bb2ad40ebc3ae7e465a52dcbe2730\bin\libcairo-2.dll")
◼ C:\Users\xxxxx\.julia\artifacts\3aff78028a0bb2ad40ebc3ae7e465a52dcbe2730\bin\libcairo-2.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\6a5456c156251deff41ae40ac8dfbb3d8c808ffe\bin\libpixman-1-0.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libgcc_s_seh-1.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\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
  ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libgcc_s_seh-1.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\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\MSIMG32.dll
    ◼ C:\WINDOWS\System32\GDI32.dll
  ◼ C:\WINDOWS\System32\GDI32.dll
  ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libssp-0.dll
    ◼ 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\msvcrt.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\c916a560fa109a4db3d6938a8ab1a6a8b4a09731\bin\libfontconfig-1.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libgcc_s_seh-1.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\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:\Users\xxxxx\.julia\artifacts\5af028f5ee6fc5d6923b4769eca4bc199914e6bd\bin\libfreetype-6.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libz.dll
        ◼ C:\WINDOWS\System32\msvcrt.dll
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
        ◼ C:\WINDOWS\System32\KERNEL32.DLL
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\.julia\artifacts\41eb25ea50f277f03154d52354602687fb1abc84\bin\libexpat-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\5af028f5ee6fc5d6923b4769eca4bc199914e6bd\bin\libfreetype-6.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libz.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\KERNEL32.DLL
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\72037f1415327f12277eed0521c861517630a0ba\bin\libpng16.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libz.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.3\bin\libz.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll

1.8.4
◼ C:\Users\xxxxx\.julia\artifacts\3aff78028a0bb2ad40ebc3ae7e465a52dcbe2730\bin\libcairo-2.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\6a5456c156251deff41ae40ac8dfbb3d8c808ffe\bin\libpixman-1-0.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libgcc_s_seh-1.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\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
  ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libgcc_s_seh-1.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\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
  ✗ MSIMG32.dll (NOT FOUND)
  ◼ C:\WINDOWS\System32\GDI32.dll
  ✗ libssp-0.dll (NOT FOUND)
  ◼ C:\WINDOWS\System32\msvcrt.dll
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\c916a560fa109a4db3d6938a8ab1a6a8b4a09731\bin\libfontconfig-1.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libgcc_s_seh-1.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\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:\Users\xxxxx\.julia\artifacts\5af028f5ee6fc5d6923b4769eca4bc199914e6bd\bin\libfreetype-6.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libz.dll
        ◼ C:\WINDOWS\System32\msvcrt.dll
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
        ◼ C:\WINDOWS\System32\KERNEL32.DLL
          ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\.julia\artifacts\41eb25ea50f277f03154d52354602687fb1abc84\bin\libexpat-1.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\5af028f5ee6fc5d6923b4769eca4bc199914e6bd\bin\libfreetype-6.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libz.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\WINDOWS\System32\KERNEL32.DLL
    ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\.julia\artifacts\72037f1415327f12277eed0521c861517630a0ba\bin\libpng16.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libz.dll
      ◼ C:\WINDOWS\System32\msvcrt.dll
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
      ◼ C:\WINDOWS\System32\KERNEL32.DLL
        ◼ C:\WINDOWS\System32\KERNELBASE.dll
  ◼ C:\Users\xxxxx\AppData\Local\Programs\Julia-1.8.4\bin\libz.dll
    ◼ C:\WINDOWS\System32\msvcrt.dll
      ◼ C:\WINDOWS\System32\KERNELBASE.dll
    ◼ C:\WINDOWS\System32\KERNEL32.DLL
      ◼ C:\WINDOWS\System32\KERNELBASE.dll

Version info:

versioninfo()
Julia Version 1.8.4
Commit 00177ebc4f (2022-12-23 21:32 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 6 on 12 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 6
1 Like

Ok, thanks. @jaakkor2 on Slack pointed out that libssp-0.dll is loaded at Julia startup on Windows until Julia v1.8.3, but not v1.8.4+. It’s still not clear why that’s the case and what changed between the two versions which caused libssp-0.dll not to be loaded automatically anymore, but at least this explains what’s going on: until v1.8.3 this was working “by accident” because libspp-0.dll happened to be loaded automatically, but now this isn’t the case any longer and so libcairo, which requires libssp-0.dll, can’t find it unless the directory where this library is located is in the PATH. I have some possible fixes in mind, but I’d also like to track down exactly what caused this change in behaviour between v1.8.3 and v1.8.4.

1 Like

Glad it’s making more sense, @giordano. Thanks for all your efforts!

I used procmon Process Monitor - Sysinternals | Microsoft Learn to have a look what happens on startup .

I set filters as

  • “Process Name” “contains” “julia”
  • “Operation” “is” “CreateFile”
  • “Path” “contains” “dll”
    image

Julia was started as

  • julia +1.8.3 --startup-file=no (=v1.8.3)
  • julia --startup-file=no (=release=v1.8.4)

Filtered logs are in the gist procmon output of Julia v1.8.3 and Julia v1.8.4 startup on Windows · GitHub

Looks like on 1.8.3, libssp-0.dll is loaded when libLLVM-13jl.dll gets loaded, but not on 1.8.4.

cc @giordano

2 Likes

Sorry, my bad.

Can someone verify this Windows build of Julia, from [CompilerSupportLibraries_jll] Add `libssp` as product on Windows by giordano · Pull Request #48012 · JuliaLang/julia · GitHub, solves the problem? You should be able to use Plots.jl or also just Cairo.jl without having to add the directory where Julia is to the PATH environment variable (if you do that you defeat the purpose of the test).

1 Like

Hi @giordano, I think that works. I uninstalled 1.8.4, ran 1.8.3 in the test environment I was using before and did an ]update. Then I extracted, ran your build and did another ]update in the same environment. using Cairo_jll ran without a problem. I also tried adding GLMakie to the environment and plotting - that worked fine.

1 Like

Thanks for confirming it. In addition to that, if you update the registry you should get Cairo_jll v1.16.1+2 which should fix the problem also for Julia v1.8.4: now GLMakie, Plots, and all other packages depending on Cairo_jll should work out-of-the-box even without adding Julia’s directory to PATH.

1 Like

It doesn’t seem to work for me. I’ve updated to [83423d85] Cairo_jll v1.16.1+2 and get the same problem. 'using Cairo_jll` gives

ERROR: InitError: could not load library "C:\Users\xxxxx\.julia\artifacts\72e4ee45059d7ee448023a55f8dea24cc5666d81\bin\libcairo-2.dll"
%1 is not a valid Win32 application.
Stacktrace:
etc

DependencyWalker still says libssp-0.dll is not found.

Could it be, that the fix broke 1.8 windows support?

I just added Cairo_jll@1.16.1+2 in a new env, and now get:

julia> using Cairo_jll
[ Info: Precompiling Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a]
ERROR: InitError: could not load library "C:\Users\sdani\.julia\artifacts\72e4ee45059d7ee448023a55f8dea24cc5666d81\bin\libcairo-2.dll"
%1 is not a valid Win32 application.
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:117
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl .\libdl.jl:116
  [3] macro expansion

Yeah this works:

Pkg.add([(name="Cairo_jll", rev="6212f36")]) # last version
using Cairo_jll

Ok, thanks, I just yanked it. Of course the error message is awful, but hey, that’s what the operating system tells us :person_shrugging:

This is probably a dim question, but why is it that Libdl can find and open libssp-0.dll in the REPL but libcairo can’t?

using CompilerSupportLibraries_jll, Libdl
Libdl.dlopen("libssp-0.dll")
Ptr{Nothing} @0x00007fffab310000

Once it’s opened, using Cairo_jll doesn’t give an error.

Hi,

Is there a better option (or one in the works) for circumventing this issue? I actually don’t have admin rights on the machine I use Julia on the most (because it belongs to my employer). Adding Julia to PATH using IT’s admin credentials doesn’t seem to resolve the issue when I try to use Julia using my credentials.

Use Julia 1.8.3 or wait for 1.8.5.