# Precompiling error for unknown reason

**URL:** <https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073>\
**Category:** New to Julia\
**Created:** [December 3, 2023, 9:48am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073 "2023-12-03T09:48:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 9:48am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/1 "2023-12-03T09:48:59Z")

</div>

I tried to precompile CSV into julia v1.84 but failed showing error message about call.  
I thought maybe the version update is the problem so I downloaded v1.94 and again have the problem.  
From import Pkg; Pkg.precompile(), I got the following report.  
Can anyone help me with resolving the problem?

Precompiling project…  
✗ BinaryProvider  
✗ Adapt → AdaptStaticArraysExt  
✗ CSV  
✗ FFMPEG  
✗ Plots  
✗ StatsPlots  
1 dependency successfully precompiled in 12 seconds. 213 already precompiled.  
ERROR: The following 3 direct dependencies failed to precompile:

CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]

Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to “C:\Users\LG\.julia\compiled\v1.9\CSV\jl\_D1D.tmp”.  
ERROR: LoadError: ccall method definition: argument 1 type doesn’t correspond to a C type  
Stacktrace:  
[1] top-level scope  
@ C:\Users\LG.julia\packages\CSV\4GOjG\src\utils.jl:379  
[2] include(mod::Module, \_path::String)  
@ Base .\Base.jl:457  
[3] include(x::String)  
@ CSV C:\Users\LG.julia\packages\CSV\4GOjG\src\CSV.jl:1  
[4] top-level scope  
@ C:\Users\LG.julia\packages\CSV\4GOjG\src\CSV.jl:14  
[5] include  
@ .\Base.jl:457 [inlined]  
[6] 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:2049  
[7] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\CSV\4GOjG\src\utils.jl:379  
in expression starting at C:\Users\LG.julia\packages\CSV\4GOjG\src\CSV.jl:1  
in expression starting at stdin:3

StatsPlots [f3b207a7-027a-5e70-b257-86293d7955fd]

Failed to precompile StatsPlots [f3b207a7-027a-5e70-b257-86293d7955fd] to “C:\Users\LG\.julia\compiled\v1.9\StatsPlots\jl\_24F4.tmp”.  
ERROR: LoadError: FFMPEG not installed properly, run `] build FFMPEG`, restart Julia and try again  
Stacktrace:  
[1] error(s::String)  
@ Base .\error.jl:35  
[2] top-level scope  
@ C:\Users\LG.julia\packages\FFMPEG\guN1x\src\FFMPEG.jl:23  
[3] include  
@ .\Base.jl:457 [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, UInt128}}, source::String)  
@ Base .\loading.jl:2049  
[5] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\FFMPEG\guN1x\src\FFMPEG.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to “C:\Users\LG\.julia\compiled\v1.9\FFMPEG\jl\_2823.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:2294  
[3] compilecache  
@ .\loading.jl:2167 [inlined]  
[4] \_require(pkg::Base.PkgId, env::String)  
@ Base .\loading.jl:1805  
[5] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base .\loading.jl:1660  
[6] macro expansion  
@ .\loading.jl:1648 [inlined]  
[7] macro expansion  
@ .\lock.jl:267 [inlined]  
[8] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:1611  
[9] include  
@ .\Base.jl:457 [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, UInt128}}, source::String)  
@ Base .\loading.jl:2049  
[11] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\Plots\qZHsp\src\Plots.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to “C:\Users\LG\.julia\compiled\v1.9\Plots\jl\_23BE.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:2294  
[3] compilecache  
@ .\loading.jl:2167 [inlined]  
[4] \_require(pkg::Base.PkgId, env::String)  
@ Base .\loading.jl:1805  
[5] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base .\loading.jl:1660  
[6] macro expansion  
@ .\loading.jl:1648 [inlined]  
[7] macro expansion  
@ .\lock.jl:267 [inlined]  
[8] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:1611  
[9] include  
@ .\Base.jl:457 [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, UInt128}}, source::Nothing)  
@ Base .\loading.jl:2049  
[11] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\StatsPlots\BRnMU\src\StatsPlots.jl:1  
in expression starting at stdin:3

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

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to “C:\Users\LG\.julia\compiled\v1.9\Plots\jl\_185E.tmp”.  
ERROR: LoadError: FFMPEG not installed properly, run `] build FFMPEG`, restart Julia and try again  
Stacktrace:  
[1] error(s::String)  
@ Base .\error.jl:35  
[2] top-level scope  
@ C:\Users\LG.julia\packages\FFMPEG\guN1x\src\FFMPEG.jl:23  
[3] include  
@ .\Base.jl:457 [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, UInt128}}, source::String)  
@ Base .\loading.jl:2049  
[5] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\FFMPEG\guN1x\src\FFMPEG.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to “C:\Users\LG\.julia\compiled\v1.9\FFMPEG\jl\_18F0.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:2294  
[3] compilecache  
@ .\loading.jl:2167 [inlined]  
[4] \_require(pkg::Base.PkgId, env::String)  
@ Base .\loading.jl:1805  
[5] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base .\loading.jl:1660  
[6] macro expansion  
@ .\loading.jl:1648 [inlined]  
[7] macro expansion  
@ .\lock.jl:267 [inlined]  
[8] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:1611  
[9] include  
@ .\Base.jl:457 [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, UInt128}}, source::Nothing)  
@ Base .\loading.jl:2049  
[11] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\Plots\qZHsp\src\Plots.jl:1  
in expression starting at stdin:3

Stacktrace:  
[1] pkgerror(msg::String)  
@ Pkg.Types C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\Types.jl:69  
[2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; internal\_call::Bool, strict::Bool, warn\_loaded::Bool, already\_instantiated::Bool, timing::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})  
@ Pkg.API C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:1619  
[3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})  
@ Pkg.API C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:156  
[4] precompile(pkgs::Vector{Pkg.Types.PackageSpec})  
@ Pkg.API C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:145  
[5] precompile(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})  
@ Pkg.API C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:171  
[6] precompile()  
@ Pkg.API C:\Users\LG\AppData\Local\Programs\julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:162  
[7] top-level scope  
@ REPL[7]:1

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 3, 2023, 10:00am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/2 "2023-12-03T10:00:38Z")

</div>

You have a very large project there with 200+ dependencies. Consider making a smaller project environment wirh less dependencies which may have less complications.

Could you report the output of thr following?

```julia
using Pkg
Pkg.status()

```

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [December 3, 2023, 10:06am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/3 "2023-12-03T10:06:56Z")

</div>

> [@Wooheon](#):
>
> ERROR: LoadError: FFMPEG not installed properly, run `] build FFMPEG`, restart Julia and try again  
> Stacktrace:

This is likely relevant.

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 10:16am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/4 "2023-12-03T10:16:04Z")

</div>

Thank you for your reply! I never thought of project environment size.  
Can you tell me how can I do that?  
Btw the report is as following.

julia\> Pkg.status()  
Status `C:\Users\LG\.julia\environments\v1.8\Project.toml`  
[6e4b80f9] BenchmarkTools v1.3.2  
⌃ [336ed68f] CSV v0.5.23  
[35d6a980] ColorSchemes v3.24.0  
⌃ [5ae59095] Colors v0.11.2  
[861a8166] Combinatorics v1.0.2  
⌅ [a93c6f00] DataFrames v0.19.4  
⌃ [1313f7d8] DataFramesMeta v0.5.0  
⌅ [31c24e10] Distributions v0.21.12  
[f6369f11] ForwardDiff v0.10.36  
⌃ [38e38edf] GLM v1.4.2  
⌃ [09f84164] HypothesisTests v0.10.13  
⌃ [bdcacae8] LoopVectorization v0.12.99  
⌅ [91a5bcdd] Plots v0.28.4  
⌃ [c46f51b8] ProfileView v0.6.11  
[7fe0908f] Simulate v0.2.0  
[82ae8749] StatsAPI v1.7.0  
⌅ [2913bbd2] StatsBase v0.32.2  
⌃ [f3b207a7] StatsPlots v0.13.0  
[9a3f8284] Random  
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated`

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 10:17am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/5 "2023-12-03T10:17:43Z")

</div>

> [@Wooheon](#):
>
> ] build FFMPEG

Thank you for your reply.  
I have tried the ] build FFMPEG but I also got an error message.

(@v1.8) pkg\> build FFMPEG  
Building FFMPEG → `C:\Users\LG\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\9143266ba77d3313a4cf61d8333a1970e8c5d8b6\build.log`  
ERROR: Error building `FFMPEG`:  
ERROR: LoadError: Unable to open libLLVM!  
Stacktrace:  
[1] error(s::String)  
@ Base .\error.jl:35  
[2] (::BinaryProvider.var"#open\_libllvm#124")()  
@ BinaryProvider C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:652  
[3] detect\_cxx11\_string\_abi()  
@ BinaryProvider C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:655  
[4] detect\_compiler\_abi()  
@ BinaryProvider C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:668  
[5] top-level scope  
@ C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685  
[6] include(mod::Module, \_path::String)  
@ Base .\Base.jl:457  
[7] include(x::String)  
@ BinaryProvider C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1  
[8] top-level scope  
@ C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:12  
[9] include  
@ .\Base.jl:457 [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, UInt128}}, source::String)  
@ Base .\loading.jl:2049  
[11] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\PlatformNames.jl:685  
in expression starting at C:\Users\LG.julia\packages\BinaryProvider\U2dKK\src\BinaryProvider.jl:1  
in expression starting at stdin:3  
ERROR: LoadError: Failed to precompile BinaryProvider [b99e7846-7c00-51b0-8f62-c81ae34c0232] to “C:\Users\LG\.julia\compiled\v1.9\BinaryProvider\jl\_E765.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:2294  
[3] compilecache  
@ .\loading.jl:2167 [inlined]  
[4] \_require(pkg::Base.PkgId, env::String)  
@ Base .\loading.jl:1805  
[5] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
@ Base .\loading.jl:1660  
[6] macro expansion  
@ .\loading.jl:1648 [inlined]  
[7] macro expansion  
@ .\lock.jl:267 [inlined]  
[8] require(into::Module, mod::Symbol)  
@ Base .\loading.jl:1611  
[9] include(fname::String)  
@ Base.MainInclude .\client.jl:478  
[10] top-level scope  
@ none:5  
in expression starting at C:\Users\LG.julia\packages\FFMPEG\guN1x\deps\build.jl:1

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 3, 2023, 10:25am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/6 "2023-12-03T10:25:13Z")

</div>

> [@Wooheon](#):
>
> ⌃ [336ed68f] CSV v0.5.23

This is a very old version of CSV. This is a common complication of having such a large environment.

Let’s just focus on using CSV.

```julia
using Pkg
pkg"activate @csv_env" # we create a new shared environment 
pkg"add CSV" # add other packages you need for this project
using CSV

```

Next time you need CSV, you can do `] activate csv_env`. See the following for more information.

[https://pkgdocs.julialang.org/v1/environments/](https://pkgdocs.julialang.org/v1/environments/)

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 10:30am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/7 "2023-12-03T10:30:47Z")

</div>

Thanks, I’ll try to understand this and care about the environment from now on.

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 10:43am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/8 "2023-12-03T10:43:36Z")

</div>

I still get the following error message when I follow your instructions.  
Also I get “ERROR: LoadError: ccall method definition: argument 1 type doesn’t correspond to a C type” if I just try “import Pkg; Pkg.add(“CSV”)”.  
Is there anything I can do?

julia\> using CSV  
[Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]  
ERROR: LoadError: UndefVarError: `set_num_threads` not defined  
Stacktrace:  
[1] getproperty(x::Module, f::Symbol)  
@ Base .\Base.jl:31  
[2] top-level scope  
@ C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:6  
[3] top-level scope  
@ C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:6  
[4] include  
@ .\Base.jl:457 [inlined]  
[5] 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:2049  
[6] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:1  
in expression starting at stdin:3  
┌ Error: Error during loading of extension CompatLinearAlgebraExt of Compat, use `Base.retry_load_extensions()` to retry.  
│ exception =  
│ 1-element ExceptionStack:  
│ Failed to precompile CompatLinearAlgebraExt [dbe5ba0b-aecc-598a-a867-79051b540f49] to “C:\Users\LG\.julia\compiled\v1.9\CompatLinearAlgebraExt\jl\_C164.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:2294  
│ [3] compilecache  
│ @ .\loading.jl:2167 [inlined]  
│ [4] \_require(pkg::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:1805  
│ [5] \_require\_prelocked(uuidkey::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:1660  
│ [6] \_require\_prelocked(uuidkey::Base.PkgId)  
│ @ Base .\loading.jl:1658  
│ [7] run\_extension\_callbacks(extid::Base.ExtensionId)  
│ @ Base .\loading.jl:1255  
│ [8] run\_extension\_callbacks(pkgid::Base.PkgId)  
│ @ Base .\loading.jl:1290  
│ [9] run\_package\_callbacks(modkey::Base.PkgId)  
│ @ Base .\loading.jl:1124  
│ [10] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
│ @ Base .\loading.jl:1667  
│ [11] macro expansion  
│ @ .\loading.jl:1648 [inlined]  
│ [12] macro expansion  
│ @ .\lock.jl:267 [inlined]  
│ [13] require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:1611  
│ [14] include  
│ @ .\Base.jl:457 [inlined]  
│ [15] 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:2049  
│ [16] top-level scope  
│ @ stdin:3  
│ [17] eval  
│ @ .\boot.jl:370 [inlined]  
│ [18] include\_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  
│ @ Base .\loading.jl:1903  
│ [19] include\_string  
│ @ .\loading.jl:1913 [inlined]  
│ [20] exec\_options(opts::Base.JLOptions)  
│ @ Base .\client.jl:305  
│ [21] \_start()  
│ @ Base .\client.jl:522  
└ @ Base loading.jl:1261  
ERROR: LoadError: UndefVarError: `set_num_threads` not defined  
Stacktrace:  
[1] getproperty(x::Module, f::Symbol)  
@ Base .\Base.jl:31  
[2] top-level scope  
@ C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:6  
[3] top-level scope  
@ C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:6  
[4] include  
@ .\Base.jl:457 [inlined]  
[5] 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:2049  
[6] top-level scope  
@ stdin:3  
in expression starting at C:\Users\LG.julia\packages\Compat\en4bK\ext\CompatLinearAlgebraExt.jl:1  
in expression starting at stdin:3  
┌ Error: Error during loading of extension CompatLinearAlgebraExt of Compat, use `Base.retry_load_extensions()` to retry.  
│ exception =  
│ 1-element ExceptionStack:  
│ Failed to precompile CompatLinearAlgebraExt [dbe5ba0b-aecc-598a-a867-79051b540f49] to “C:\Users\LG\.julia\compiled\v1.9\CompatLinearAlgebraExt\jl\_CACD.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:2294  
│ [3] compilecache  
│ @ .\loading.jl:2167 [inlined]  
│ [4] \_require(pkg::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:1805  
│ [5] \_require\_prelocked(uuidkey::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:1660  
│ [6] \_require\_prelocked(uuidkey::Base.PkgId)  
│ @ Base .\loading.jl:1658  
│ [7] run\_extension\_callbacks(extid::Base.ExtensionId)  
│ @ Base .\loading.jl:1255  
│ [8] run\_extension\_callbacks(pkgid::Base.PkgId)  
│ @ Base .\loading.jl:1290  
│ [9] run\_package\_callbacks(modkey::Base.PkgId)  
│ @ Base .\loading.jl:1124  
│ [10] \_tryrequire\_from\_serialized(modkey::Base.PkgId, build\_id::UInt128)  
│ @ Base .\loading.jl:1357  
│ [11] \_tryrequire\_from\_serialized(pkg::Base.PkgId, path::String, ocachepath::String)  
│ @ Base .\loading.jl:1435  
│ [12] \_require(pkg::Base.PkgId, env::String)  
│ @ Base .\loading.jl:1816  
│ [13] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
│ @ Base .\loading.jl:1660  
│ [14] macro expansion  
│ @ .\loading.jl:1648 [inlined]  
│ [15] macro expansion  
│ @ .\lock.jl:267 [inlined]  
│ [16] require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:1611  
│ [17] include  
│ @ .\Base.jl:457 [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::Nothing)  
│ @ Base .\loading.jl:2049  
│ [19] top-level scope  
│ @ stdin:3  
│ [20] eval  
│ @ .\boot.jl:370 [inlined]  
│ [21] include\_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)  
│ @ Base .\loading.jl:1903  
│ [22] include\_string  
│ @ .\loading.jl:1913 [inlined]  
│ [23] exec\_options(opts::Base.JLOptions)  
│ @ Base .\client.jl:305  
│ [24] \_start()  
│ @ Base .\client.jl:522  
└ @ Base loading.jl:1261

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 3, 2023, 10:51am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/9 "2023-12-03T10:51:06Z")

</div>

Could you try my commands in a fresh Julia session, please? You seem to already have LinearAlgebra loaded and perhaps an outdated Compat.

---

<div class="post-metadata">

**Author:** ![Wooheon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wooheon/32/206569_2.png) [@Wooheon](https://discourse.julialang.org/u/Wooheon)\
**Post date:** [December 3, 2023, 10:51am UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/10 "2023-12-03T10:51:51Z")

</div>

Oh, never mind, I ran it again, and it now works.  
I don’t understand how I got that error message.  
But thanks! I can now run CSV!

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 3, 2023, 11:09pm UTC](https://discourse.julialang.org/t/precompiling-error-for-unknown-reason/107073/11 "2023-12-03T23:09:32Z")

</div>

Great. The problem is that packages can interfere with each other and wjth more packages the chance of something going wrong increases super-linearly.

In this case there were several issues. One is that you have a package that is holding back the versions of other packages. Pkg has a `why` command to diagnose this. Because some of the packages are outdated they do not function properly or may contain known bugs.

It is better to create individual project environments for separate tasks or projects to avoid these issues.
