# Precompilation warning - in which package should it be fixed?

**URL:** <https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520>\
**Category:** General Usage\
**Tags:** question, package, mkl\
**Created:** [August 23, 2024, 7:19am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520 "2024-08-23T07:19:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 23, 2024, 7:19am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/1 "2024-08-23T07:19:45Z")

</div>

If I run the following script:

```julia
#!/bin/bash -eu
rm -rf /tmp/testdepot
mkdir /tmp/testdepot
rm -rf /tmp/test
mkdir /tmp/test
cd /tmp/test
export JULIA_DEPOT_PATH=/tmp/testdepot 
julia --project="." -e "using Pkg; Pkg.add(\"LinearSolve\"); using LinearSolve"
cd ..

```

I get the following output:

```julia
Precompiling project...
  99 dependencies successfully precompiled in 46 seconds
  1 dependency had output during precompilation:
┌ MKL_jll
│ Downloading artifact: MKL
│  
│ [pid 37681] waiting for IO to finish:
│ Handle type uv_handle_t->data
│ timer 0x140ead0->0x73bd1b5c4460
│ This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│  
│ [pid 37681] waiting for IO to finish:
│ Handle type uv_handle_t->data
│ timer 0x140ead0->0x73bd1b5c4460
│ This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.

```

Is this a bug in `mkl_jll`, or in `LinearSolve`, or in `Pkg`?

I filed a bug report: [mkl\_jll hangs during precompilation · Issue #9281 · JuliaPackaging/Yggdrasil · GitHub](https://github.com/JuliaPackaging/Yggdrasil/issues/9281)

and was told that the bug would have been fixed in `Pkg` already, but it is not fixed.

Any idea?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [August 23, 2024, 7:59am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/2 "2024-08-23T07:59:44Z")

</div>

You were referred to [JuliaLang/Pkg.jl#3950](https://github.com/JuliaLang/Pkg.jl/pull/3950), which backported a fix to the 1.10 branch on July 13. Since 1.10.4 was released on June 4 it’s obviously not included there but presumably will be in a forthcoming 1.10.5.

Since it was backported from 1.11 the fix should be in 1.11.0-rc2 as well.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 23, 2024, 11:38am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/3 "2024-08-23T11:38:21Z")

</div>

> [@GunnarFarneback](#):
>
> Since it was backported from 1.11 the fix should be in 1.11.0-rc2 as well.

Just tested it with 1.11.0-rc2 (2024-07-29), and the issue is NOT fixed.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [August 23, 2024, 11:56am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/4 "2024-08-23T11:56:04Z")

</div>

That’s unfortunate. Either the fix wasn’t working as well as expected or it has broken again later. At any rate it’s a `Pkg` bug.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [August 23, 2024, 12:30pm UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/5 "2024-08-23T12:30:46Z")

</div>

I can confirm (on Linux) that the problem persists on 1.11.0-rc2 and 1.12.0-DEV.1085 but a [source build of the 1.10 branch](https://discourse.julialang.org/t/julia-1-10-5-testing-period/118138) works fine, so it does look like this will indeed be fixed for 1.10.5.

That 1.11.0-rc2 has the problem is bad of course.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 23, 2024, 8:19pm UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/6 "2024-08-23T20:19:31Z")

</div>

I tried a source build of the 1.10 branch.

I get this output:

```julia
Precompiling project...
  99 dependencies successfully precompiled in 41 seconds
  1 dependency had output during precompilation:
┌ MKL_jll
│ Downloading artifact: MKL
└  

```

This is much better than before, but is this message needed? I mean, it gets printed a long time after the download has finished, so it is not so very useful. Other packages do not print anything when they are downloading artifacts.

And which branch could I try to test the upcoming 1.11 release?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [August 23, 2024, 10:11pm UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/7 "2024-08-23T22:11:12Z")

</div>

> [@ufechner7](#):
>
> Other packages do not print anything when they are downloading artifacts.

Because they don’t download them during precompilation but during installation. MKL\_jll is a particular artifact because it’s lazy (there aren’t many lazy artifacts, so you don’t see this frequently).

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [August 24, 2024, 3:14am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/8 "2024-08-24T03:14:54Z")

</div>

Could you please open an issue with Pkg about this warning persisting on v1.11?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 24, 2024, 6:14am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/9 "2024-08-24T06:14:11Z")

</div>

Done: [Precompliation warning on 1.11rc2 · Issue #55577 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/55577)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 3, 2024, 10:36am UTC](https://discourse.julialang.org/t/precompilation-warning-in-which-package-should-it-be-fixed/118520/10 "2024-09-03T10:36:47Z")

</div>

[Avoid side effects when precompiling `find_artifact_dir` by giordano · Pull Request #66 · JuliaPackaging/JLLWrappers.jl · GitHub](https://github.com/JuliaPackaging/JLLWrappers.jl/pull/66) might have helped with this as well.
