Thanks! I came to that same conclusion, shortly after posting that message.
To all those who don’t like to change the path environment variable I propose the following workaround which worked for me:
origpath = ENV["PATH"]
let sep = Sys.iswindows() ? ';' : ':'
if ! occursin(Regex("\\Q$(Sys.BINDIR)\\E($sep|\$)", Sys.iswindows() ? "i" : ""), ENV["PATH"])
ENV["PATH"] = rstrip(ENV["PATH"], sep) * sep * Sys.BINDIR
end
end
using Cairo_jll
origpath = ENV["PATH"]
You may even discard the origpath lines and keep the path appended, in case that other libs have similar problems.
These kind of issues are giving new resolve to push for Add LOAD_LIBRARY_SEARCH_USER_DIRS for DLL loading by mkitti · Pull Request #47775 · JuliaLang/julia · GitHub .
cc: @jameson
The real fix (GLMakie and Plots fail to precompile under Julia 1.8.4 - #31 by giordano above) looks nothing like that PR however
Sure, but we would have more options for a workaround on Windows than modifying the PATH environment variable, which has likely side effects.
same for me - needed to tick add PATH during installation. Also, needed to delete couple of .julia directories (as indicated by another user). Hopefully 1.8.5 will address the issue as it is a frustration for users trying to come to terms with the language.
I did the following:
- Added 1.8.4 to PATH manually
- Ran the terminal as admin
This removed the error related to “Cairo_jll.”
However, now I am getting a precompiling error that says:
ERROR: LoadError: InitError: UndefVarError: GR_jll not defined
Note that, I also get the same error when I try: using GR
Any guesses?
Thank you,
Santiago
You might need to force recompilation again by removing the folder .julia/compiled/v1.8/GR
.
That said the Julia 1.8.5 release is imminent. It’s been tagged on Github, so binaries should be available shortly.
Thank you. It works now
I’m glad that I could help in this instance. Welcome to Julia.
Still seeing the same problem. However, I’m on a WIN10 machine where I cannot run in admin mode.
Fresh install:
Julia Version 1.8.4
[ee78f7c6] Makie v0.19.1
[ Info: Precompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a]
ERROR: LoadError: InitError: could not load library "C:\JuliaPackages\artifacts\3aff78028a0bb2ad40ebc3ae7e465a52dcbe2730\bin\libcairo-2.dll"
Just use Julia 1.8.3 or wait for 1.8.5 which might be available tomorrow.
Unfortunately, 1.8.5 has some similar issues but now for linux: julia 1.8.5 - could not load library "libssp.so.0" (`linux`) · Issue #48177 · JuliaLang/julia · GitHub…
The issue arises only when building with USE_SYSTEM_CSL := 1
which IIUC is not the case for official releases.
True, deps: fix broken `p7zip` url by t-bltg · Pull Request #48176 · JuliaLang/julia · GitHub also means that we cannot build the source tarballs.
Or go directly to 1.9beta2. I think the problem does not manifest there. At least not for me (I’m on Windows too), but I don’t have in 1.8.4 either so not such a good example.
Many thanks to everyone who put so much work into fixing this in 1.8.5. I’ve recently spent some time getting dll’s to work with CxxWrap and they definitely have my sympathy.