Need help: precompilation terminates Julia

I recently added a branch to PSSFSS.jl to add a new feature and saw that CI was failing. PSSFSS would no longer compile due to failure to compile one of its dependencies, TicraUtilities.jl, another one of my packages that I haven’t made any changes to recently. I did a Pkg.update() on TicraUtilities locally and tried to precompile it and it now precompilation results in terminating the Julia thread that is apparently separately launched by Package. This of course results in precompilation failure. I could use some help in debugging this–I’m not sure how to proceed. TIA!

Edit 1: I pinned all dependencies to the minimum acceptable version listed in the Compat section of the Project.toml file, under the assumption that some change is dependency is responsible. The error persists, but after several more tries (following removal of the .julia/compiled/v1.11 directory) I got the following error message during the unsuccessful precompilation:

Precompiling project...
  ✗ TicraUtilities
  75 dependencies successfully precompiled in 52 seconds. 35 already precompiled.
  1 dependency had output during precompilation:
┌ Unitful
│  WARNING: could not import Intrinsics.rem_float_fast into Unitful
│  WARNING: could not import FastMath.libm into Unitful
└  

This is after pinning Unitful to version 1.0, so not sure if I’ve introduced a new problem or not.

I’m still looking for some help in fixing this!

Edit 2: When I free Unitful I don’t see the above warnings. After re-pinning Unitful to 1.0, I also don’t see those warnings.

Here is my version info:

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)
Environment:
  JULIA_EDITOR = "C:\Program Files\Microsoft VS Code\Code.exe"
  JULIA_NUM_THREADS = 8

and here is my package status (after pinning):

(TicraUtilities) pkg> st
Project TicraUtilities v1.1.1
Status `D:\peter\Documents\julia\packages\TicraUtilities\Project.toml`
  [2119f1ac] AssociatedLegendrePolynomials v1.0.1
  [717857b8] DSP v0.8.0 ⚲
⌃ [82cc6244] DataInterpolations v6.1.0 ⚲
  [39dd38d3] Dierckx v0.5.3 ⚲
  [7a1cc6ca] FFTW v1.8.0
⌃ [f6369f11] ForwardDiff v0.10.36 ⚲
⌃ [6fe1bfb0] OffsetArrays v1.14.2 ⚲
⌃ [5ad8b20f] PhysicalConstants v0.2.3 ⚲
  [aea7be01] PrecompileTools v1.2.1
⌃ [1fd47b50] QuadGK v2.10.1 ⚲
  [3cdcf5f2] RecipesBase v1.3.4
⌃ [90137ffa] StaticArrays v1.9.3 ⚲
⌃ [1986cc42] Unitful v1.0.0
  [ade2ca70] Dates v1.11.0 ⚲
  [37e2e46d] LinearAlgebra v1.11.0
  [de0858da] Printf v1.11.0

Starting Julia with --debug-info=2 provided enough information to locate the source of the problem. The debug output showed the offending line in TicraUtilities.jl. It was the start of the @compile_workload block. Bisection revealed the offending line, and I was finally able to trace the problem to the integrate method of the Dierckx.jl package, which is called by TicraUtilities. I’ll try to create a MWE and create an issue for it in the Dierckx repo.

Edit: Issue created here.

1 Like