# Seemingly Random Precompilation Errors: "does not support precompilation but is imported by a module that does"

**URL:** https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360
**Category:** General Usage
**Created:** [November 16, 2016, 4:49pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360 "2016-11-16T16:49:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [November 16, 2016, 4:49pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/1 "2016-11-16T16:49:15Z")

</div>

Something that has been happening to me for awhile is that, every once in awhile, I have things no working due to this kind of precompilation error:

```julia
INFO: Recompiling stale cache file /home/crackauc/.julia/lib/v0.5/DataStructures.ji for module DataStructures.
WARNING: Module Compat with uuid 1020441384454244 is missing from the cache.
This may mean module Compat does not support precompilation but is imported by a module that does.
ERROR: LoadError: Declaring __precompile__ (false) is not allowed in files that are being precompiled.
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
while loading /home/crackauc/.julia/v0.5/DataStructures/src/DataStructures.jl, in expression starting on line 5

```

It usually ends up with Compat being the problem (and I would be surprised if it really is?), while sometimes it’s other packages. Sometimes there are two packages which both precompile and require Compat, but one gives this error and the other does not. Sometimes I wait a day or `Pkg.update()` with nothing really happening, but it magically disappears.

Does anyone know what’s going on here? Is there a quick fix (a cache to delete)?

---

<div class="post-metadata">

### Author: ![swt30](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swt30/32/4667_2.png) [@swt30](https://discourse.julialang.org/u/swt30)
#### Post date: [November 16, 2016, 8:29pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/2 "2016-11-16T20:29:57Z")

</div>

I have had success deleting the relevant packages from `~/.julia/lib`, the precompilation cache, when I’ve run across these errors in the past.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [November 16, 2016, 8:46pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/3 "2016-11-16T20:46:34Z")

</div>

> [@swt30](#):
>
> I have had success deleting the relevant packages from ~/.julia/lib, the precompilation cache, when I’ve run across these errors in the past.

I’ve had that not work before, which utterly confuses me (maybe it still used it from the recycle bin?). That’s why I can’t pin down what exactly it is.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [November 16, 2016, 8:52pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/4 "2016-11-16T20:52:25Z")

</div>

Could this be [error loading just-precompiled module if an imported module was loaded before precompiling · Issue #12508 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/12508)? If so, the workaround is just to relaunch Julia and try again to import the module.

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [November 16, 2016, 8:52pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/5 "2016-11-16T20:52:31Z")

</div>

Killing all running julia processes and then trying to precompile again has worked pretty well for me.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [November 16, 2016, 9:18pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/6 "2016-11-16T21:18:59Z")

</div>

Do tests (`Pkg.test`) run in a separate process that stay open? I’ve had it before where I couldn’t get tests to not mess up like this, even though I had quit out of the REPL/Atom.

Good to see I’m not alone on this though. I thought it might’ve just been me 🙂

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [November 16, 2016, 9:35pm UTC](https://discourse.julialang.org/t/seemingly-random-precompilation-errors-does-not-support-precompilation-but-is-imported-by-a-module-that-does/360/7 "2016-11-16T21:35:59Z")

</div>

They run in separate processes, I think, but shouldn’t stay open afterwards. I think this _might_ happen sometimes when precompilation fails in Juno and there are multiple processes open in a failed state or something, but that’s mostly speculation…
