# Error when compiling DataToolkit.jl

**URL:** https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082
**Category:** Package Management
**Tags:** error
**Created:** [February 11, 2024, 9:32pm UTC](https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082 "2024-02-11T21:32:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vtfanta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vtfanta/32/48144_2.png) [@vtfanta](https://discourse.julialang.org/u/vtfanta)
#### Post date: [February 11, 2024, 9:32pm UTC](https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082/1 "2024-02-11T21:32:09Z")

</div>

Hi,  
I wanted to try the [DataToolkit.jl](https://tecosaur.github.io/DataToolkitDocs/ref/stable/) package, but I am getting this error when I try to compile (after `]add DataToolkit`). I have already tried deleting the compiled packages to force recompilation. It probably isn’t a problem of interference between other packages, since the problem prevails in a clean environment. The compilation works on my WSL though.  
What am I doing wrong?

````julia
The following 1 direct dependency failed to precompile:

DataToolkit [dc83c90b-d41d-4e55-bdb7-0fc919659999]

Failed to precompile DataToolkit [dc83c90b-d41d-4e55-bdb7-0fc919659999] to "C:\\Users\\vitfa\\.julia\\compiled\\v1.10\\DataToolkit\\jl_CC24.tmp".
ERROR: LoadError: IOError: mkdir("C:\\Users\\vitfa\\AppData\\Local\\cache\\julia\\DataToolkit\\cache"; mode=0o777): file already exists (EEXIST)
Stacktrace:
  [1] uv_error
    @ Base .\libuv.jl:100 [inlined]
  [2] mkdir(path::String; mode::UInt16)
    @ Base.Filesystem .\file.jl:185
  [3] mkdir
    @ Base.Filesystem .\file.jl:177 [inlined]
  [4] mkpath(path::String; mode::UInt16)
    @ Base.Filesystem .\file.jl:241
  [5] mkpath
    @ Base.Filesystem .\file.jl:235 [inlined]
  [6] load_inventory(path::String, create::Bool)
    @ DataToolkitCommon.Store C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\store\inventory.jl:238
  [7] load_inventory
    @ DataToolkitCommon.Store C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\store\inventory.jl:212 [inlined]
  [8] __init__ ()
    @ DataToolkitCommon.Store C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\store\Store.jl:57
  [9] macro expansion
    @ C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\precompile.jl:48 [inlined]
 [10] macro expansion
    @ C:\Users\vitfa\.julia\packages\PrecompileTools\kmH5L\src\workloads.jl:78 [inlined]
 [11] macro expansion
    @ C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\precompile.jl:47 [inlined]
 [12] macro expansion
    @ C:\Users\vitfa\.julia\packages\PrecompileTools\kmH5L\src\workloads.jl:140 [inlined]
 [13] top-level scope
    @ C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\precompile.jl:139
 [14] include(mod::Module, _path::String)
    @ Base .\Base.jl:495
 [15] include(x::String)
    @ DataToolkitCommon C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\DataToolkitCommon.jl:1
 [16] top-level scope
    @ C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\DataToolkitCommon.jl:147
 [17] include
    @ Base .\Base.jl:495 [inlined]
 [18] 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, UInt128}}, source::String)
    @ Base .\loading.jl:2216
 [19] top-level scope
    @ stdin:3
in expression starting at C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\precompile.jl:1
in expression starting at C:\Users\vitfa\.julia\packages\DataToolkitCommon\SuyzS\src\DataToolkitCommon.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile DataToolkitCommon [9e6fccbf-6142-406a-aa4c-75c1ae647f53] to "C:\\Users\\vitfa\\.julia\\compiled\\v1.10\\DataToolkitCommon\\jl_CE89.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:2462
  [3] compilecache
    @ Base .\loading.jl:2334 [inlined]
  [4] (::Base.var"#968#969"{Base.PkgId})()
    @ Base .\loading.jl:1968
  [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
  [6] #mkpidlock#6
    @ FileWatching.Pidfile C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
  [8] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base .\essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:2977
 [11] maybe_cachefile_lock
    @ Base .\loading.jl:2974 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [14] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [17] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [20] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [23] include
    @ Base .\Base.jl:495 [inlined]
 [24] 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, UInt128}}, source::Nothing)
    @ Base .\loading.jl:2216
 [25] top-level scope
    @ stdin:3
in expression starting at C:\Users\vitfa\.julia\packages\DataToolkit\QoiqL\src\DataToolkit.jl:1
in expression starting at stdin:
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Types.jl:70
  [2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{io::Base.TTY})
    @ Pkg.API C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:1656
  [3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
    @ Pkg.API C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [4] precompile
    @ Pkg.API C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:147 [inlined]
  [5] #precompile#114
    @ Pkg.API C:\Users\vitfa\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:146 [inlined]
  [6] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [7] invokelatest
    @ Base .\essentials.jl:884 [inlined]
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1957
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [10] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [11] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [13] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [14] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [16] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [17] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740```
````

---

<div class="post-metadata">

### Author: ![tecosaur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tecosaur/32/23206_2.png) [@tecosaur](https://discourse.julialang.org/u/tecosaur)
#### Post date: [February 12, 2024, 10:04am UTC](https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082/2 "2024-02-12T10:04:01Z")

</div>

Hi Vit!

It sounds like the issue you’re having is probably [Storage plugin file errors on Windows · Issue #6 · tecosaur/DataToolkitCommon.jl · GitHub](https://github.com/tecosaur/DataToolkitCommon.jl/issues/6).

Unfortunately, this seems to be a Windows-only error, and I have access to zero Windows machines 😔.

The Windows machine of the user who had that error at Julia-con kindly let me borrow his machine for half an hour to attempt to debug (and Stefan had a brief look), but that’s as far as we got.

If you’re willing to look into this at all yourself, that would be great and I’d be happy to help out with the debugging as much as I am able.

---

<div class="post-metadata">

### Author: ![vtfanta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vtfanta/32/48144_2.png) [@vtfanta](https://discourse.julialang.org/u/vtfanta)
#### Post date: [February 12, 2024, 2:23pm UTC](https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082/3 "2024-02-12T14:23:06Z")

</div>

**Temporary solution**  
Just create the mentioned `cache` folder yourself. So delete the `cache` file and create a folder of the same name in its place. Try the compilation again and it should proceed normally (or at least it did for me).

More details should follow in the aforementioned [issue](https://github.com/tecosaur/DataToolkitCommon.jl/issues/6).

---

<div class="post-metadata">

### Author: ![tecosaur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tecosaur/32/23206_2.png) [@tecosaur](https://discourse.julialang.org/u/tecosaur)
#### Post date: [February 12, 2024, 3:57pm UTC](https://discourse.julialang.org/t/error-when-compiling-datatoolkit-jl/110082/4 "2024-02-12T15:57:24Z")

</div>

Resolution: we found the issue stemmed from some Windows-specific behaviour with BaseDirs.jl, a fix has been pushed and a new version will be tagged in the next few days.
