JuliaInterop / Clang.jl

C binding generator and Julia interface to libclang
https://juliainterop.github.io/Clang.jl/
MIT License
220 stars 68 forks source link

failed to setup environment due to missing dirs #375

Closed mkitti closed 4 months ago

mkitti commented 2 years ago
(jl_ek7nY5) pkg> st
      Status `C:\Users\kittisopikulm\AppData\Local\Temp\jl_ek7nY5\Project.toml`
  [40e3b903] Clang v0.15.7

julia> using Clang

julia> using Clang.Generators

julia> get_default_args()
ERROR: AssertionError: failed to setup environment due to missing dirs, please file an issue at https://github.com/JuliaInterop/Clang.jl/issues.
Stacktrace:
 [1] get_system_dirs(triple::String, version::VersionNumber)
   @ Clang.JLLEnvs C:\Users\kittisopikulm\.julia\packages\Clang\tldR9\src\shards\JLLEnvs.jl:189
 [2] get_system_dirs
   @ C:\Users\kittisopikulm\.julia\packages\Clang\tldR9\src\shards\JLLEnvs.jl:116 [inlined]
 [3] get_default_args(triple::String) (repeats 2 times)
   @ Clang.Generators C:\Users\kittisopikulm\.julia\packages\Clang\tldR9\src\generator\context.jl:233
 [4] top-level scope
   @ REPL[22]:1

julia> Clang.Generators.get_triple()
"x86_64-w64-mingw32"
mkitti commented 2 years ago

I think my artifact had gotten corrupted somehow during some garbage collection phase. Only one of the folders were present.

Only the sysroot folder and subfolders were still present. I renamed the artifact folder with a .bak suffix, and allowed Artifacts to redownload it.

Gnimuc commented 2 years ago

It could happen when something goes wrong during the download&unzip phase. Maybe we should validate the artifacts before throwing this error.